From c1a12f8cd99938ae6fda2687f082e58c1f4cedf7 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Tue, 18 Mar 2025 18:19:57 +0100 Subject: [PATCH 01/28] Cleaning up for new test cases --- src/test/java/burp/Test.java | 19 - src/test/java/burp/TestRMLCC.java | 133 - src/test/java/burp/TestRMLCore.java | 216 -- ...tRMLCoreGM.java => TestRMLCoreGM.java.old} | 0 ...reMySQL.java => TestRMLCoreMySQL.java.old} | 0 ...QL.java => TestRMLCorePostgreSQL.java.old} | 0 ...{TestRMLFNML.java => TestRMLFNML.java.old} | 0 ...ava => TestRMLFNMLGrellFunctions.java.old} | 0 src/test/java/burp/TestRMLIOSource.java | 100 - src/test/java/burp/TestRMLIOTarget.java | 106 - .../rml-cc/RMLTC-CC-0001-Alt/data.json | 26 - .../rml-cc/RMLTC-CC-0001-Alt/default.nq | 17 - .../rml-cc/RMLTC-CC-0001-Alt/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0001-Bag/data.json | 26 - .../rml-cc/RMLTC-CC-0001-Bag/default.nq | 15 - .../rml-cc/RMLTC-CC-0001-Bag/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0001-List/data.json | 26 - .../rml-cc/RMLTC-CC-0001-List/default.nq | 23 - .../rml-cc/RMLTC-CC-0001-List/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0001-Seq/data.json | 26 - .../rml-cc/RMLTC-CC-0001-Seq/default.nq | 15 - .../rml-cc/RMLTC-CC-0001-Seq/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0002-Bag/data.json | 26 - .../rml-cc/RMLTC-CC-0002-Bag/default.nq | 15 - .../rml-cc/RMLTC-CC-0002-Bag/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0002-List/data.json | 26 - .../rml-cc/RMLTC-CC-0002-List/default.nq | 21 - .../rml-cc/RMLTC-CC-0002-List/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0003-EB/data.json | 14 - .../rml-cc/RMLTC-CC-0003-EB/default.nq | 7 - .../rml-cc/RMLTC-CC-0003-EB/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0003-EL-BN/data.json | 14 - .../rml-cc/RMLTC-CC-0003-EL-BN/default.nq | 8 - .../rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl | 29 - .../rml-cc/RMLTC-CC-0003-EL-Named/data.json | 14 - .../rml-cc/RMLTC-CC-0003-EL-Named/default.nq | 8 - .../rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl | 29 - .../rml-cc/RMLTC-CC-0003-EL/data.json | 14 - .../rml-cc/RMLTC-CC-0003-EL/default.nq | 8 - .../rml-cc/RMLTC-CC-0003-EL/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0003-NEB/data.json | 14 - .../rml-cc/RMLTC-CC-0003-NEB/default.nq | 5 - .../rml-cc/RMLTC-CC-0003-NEB/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0003-NEL/data.json | 14 - .../rml-cc/RMLTC-CC-0003-NEL/default.nq | 7 - .../rml-cc/RMLTC-CC-0003-NEL/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0003-NELb/data.json | 14 - .../rml-cc/RMLTC-CC-0003-NELb/default.nq | 7 - .../rml-cc/RMLTC-CC-0003-NELb/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0004-SM1/data.json | 18 - .../rml-cc/RMLTC-CC-0004-SM1/default.nq | 14 - .../rml-cc/RMLTC-CC-0004-SM1/mapping.ttl | 25 - .../rml-cc/RMLTC-CC-0004-SM2/data.json | 18 - .../rml-cc/RMLTC-CC-0004-SM2/default.nq | 12 - .../rml-cc/RMLTC-CC-0004-SM2/mapping.ttl | 20 - .../rml-cc/RMLTC-CC-0004-SM3/data.json | 14 - .../rml-cc/RMLTC-CC-0004-SM3/default.nq | 6 - .../rml-cc/RMLTC-CC-0004-SM3/mapping.ttl | 20 - .../rml-cc/RMLTC-CC-0004-SM4/data.json | 18 - .../rml-cc/RMLTC-CC-0004-SM4/default.nq | 10 - .../rml-cc/RMLTC-CC-0004-SM4/mapping.ttl | 25 - .../rml-cc/RMLTC-CC-0004-SM5/data.json | 14 - .../rml-cc/RMLTC-CC-0004-SM5/default.nq | 4 - .../rml-cc/RMLTC-CC-0004-SM5/mapping.ttl | 20 - .../rml-cc/RMLTC-CC-0005-App1/data.json | 23 - .../rml-cc/RMLTC-CC-0005-App1/default.nq | 16 - .../rml-cc/RMLTC-CC-0005-App1/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0005-App2/data.json | 23 - .../rml-cc/RMLTC-CC-0005-App2/default.nq | 18 - .../rml-cc/RMLTC-CC-0005-App2/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0005-Car1/data.json | 23 - .../rml-cc/RMLTC-CC-0005-Car1/default.nq | 35 - .../rml-cc/RMLTC-CC-0005-Car1/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0005-Car2/data.json | 21 - .../rml-cc/RMLTC-CC-0005-Car2/default.nq | 23 - .../rml-cc/RMLTC-CC-0005-Car2/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0006-IT0/data.json | 23 - .../rml-cc/RMLTC-CC-0006-IT0/default.nq | 17 - .../rml-cc/RMLTC-CC-0006-IT0/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0006-IT1/data.json | 23 - .../rml-cc/RMLTC-CC-0006-IT1/default.nq | 15 - .../rml-cc/RMLTC-CC-0006-IT1/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0006-IT2/data.json | 34 - .../rml-cc/RMLTC-CC-0006-IT2/default.nq | 25 - .../rml-cc/RMLTC-CC-0006-IT2/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0007-NES/data.json | 23 - .../rml-cc/RMLTC-CC-0007-NES/default.nq | 29 - .../rml-cc/RMLTC-CC-0007-NES/mapping.ttl | 36 - .../rml-cc/RMLTC-CC-0008-ROMa/default.nq | 13 - .../rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0008-ROMa/student.csv | 4 - .../rml-cc/RMLTC-CC-0008-ROMb/default.nq | 9 - .../rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0008-ROMb/student.csv | 4 - .../rml-cc/RMLTC-CC-0009-DUP-Bag/data.json | 26 - .../rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq | 15 - .../rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0009-DUP-List/data.json | 26 - .../rml-cc/RMLTC-CC-0009-DUP-List/default.nq | 23 - .../rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl | 27 - .../rml-cc/RMLTC-CC-0010-List/data.json | 23 - .../rml-cc/RMLTC-CC-0010-List/default.nq | 10 - .../rml-cc/RMLTC-CC-0010-List/mapping.ttl | 28 - .../rml-cc/RMLTC-CC-0010-Listb/data.json | 23 - .../rml-cc/RMLTC-CC-0010-Listb/default.nq | 9 - .../rml-cc/RMLTC-CC-0010-Listb/mapping.ttl | 29 - .../rml-core/RMLTC0000-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0000-CSV/output.nq | 1 - .../rml-core/RMLTC0000-CSV/student.csv | 1 - .../rml-core/RMLTC0000-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0000-JSON/output.nq | 1 - .../rml-core/RMLTC0000-JSON/student.json | 3 - .../rml-core/RMLTC0000-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0000-MySQL/output.nq | 1 - .../rml-core/RMLTC0000-MySQL/resource.sql | 5 - .../rml-core/RMLTC0000-PostgreSQL/mapping.ttl | 25 - .../rml-core/RMLTC0000-PostgreSQL/output.nq | 1 - .../RMLTC0000-PostgreSQL/resource.sql | 4 - .../rml-core/RMLTC0000-SPARQL/mapping.ttl | 28 - .../rml-core/RMLTC0000-SPARQL/output.nq | 0 .../rml-core/RMLTC0000-SPARQL/resource.ttl | 1 - .../rml-core/RMLTC0000-SQLServer/mapping.ttl | 25 - .../rml-core/RMLTC0000-SQLServer/output.nq | 1 - .../rml-core/RMLTC0000-SQLServer/resource.sql | 7 - .../rml-core/RMLTC0000-XML/mapping.ttl | 21 - .../rml-core/RMLTC0000-XML/output.nq | 1 - .../rml-core/RMLTC0000-XML/student.xml | 5 - .../rml-core/RMLTC0001a-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0001a-CSV/output.nq | 2 - .../rml-core/RMLTC0001a-CSV/student.csv | 2 - .../rml-core/RMLTC0001a-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0001a-JSON/output.nq | 2 - .../rml-core/RMLTC0001a-JSON/student.json | 5 - .../rml-core/RMLTC0001a-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0001a-MySQL/output.nq | 1 - .../rml-core/RMLTC0001a-MySQL/resource.sql | 6 - .../RMLTC0001a-PostgreSQL/mapping.ttl | 25 - .../rml-core/RMLTC0001a-PostgreSQL/output.nq | 1 - .../RMLTC0001a-PostgreSQL/resource.sql | 5 - .../rml-core/RMLTC0001a-SPARQL/mapping.ttl | 29 - .../rml-core/RMLTC0001a-SPARQL/output.nq | 1 - .../rml-core/RMLTC0001a-SPARQL/resource.ttl | 4 - .../rml-core/RMLTC0001a-SQLServer/mapping.ttl | 25 - .../rml-core/RMLTC0001a-SQLServer/output.nq | 1 - .../RMLTC0001a-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0001a-XML/mapping.ttl | 21 - .../rml-core/RMLTC0001a-XML/output.nq | 2 - .../rml-core/RMLTC0001a-XML/student.xml | 7 - .../rml-core/RMLTC0001b-CSV/mapping.ttl | 21 - .../rml-core/RMLTC0001b-CSV/output.nq | 2 - .../rml-core/RMLTC0001b-CSV/student.csv | 2 - .../rml-core/RMLTC0001b-JSON/mapping.ttl | 22 - .../rml-core/RMLTC0001b-JSON/output.nq | 2 - .../rml-core/RMLTC0001b-JSON/student.json | 5 - .../rml-core/RMLTC0001b-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0001b-MySQL/output.nq | 1 - .../rml-core/RMLTC0001b-MySQL/resource.sql | 6 - .../RMLTC0001b-PostgreSQL/mapping.ttl | 25 - .../rml-core/RMLTC0001b-PostgreSQL/output.nq | 1 - .../RMLTC0001b-PostgreSQL/resource.sql | 5 - .../rml-core/RMLTC0001b-SPARQL/mapping.ttl | 29 - .../rml-core/RMLTC0001b-SPARQL/output.nq | 1 - .../rml-core/RMLTC0001b-SPARQL/resource.ttl | 4 - .../rml-core/RMLTC0001b-SQLServer/mapping.ttl | 25 - .../rml-core/RMLTC0001b-SQLServer/output.nq | 1 - .../RMLTC0001b-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0001b-XML/mapping.ttl | 22 - .../rml-core/RMLTC0001b-XML/output.nq | 2 - .../rml-core/RMLTC0001b-XML/student.xml | 7 - .../rml-core/RMLTC0002a-CSV/mapping.ttl | 27 - .../rml-core/RMLTC0002a-CSV/output.nq | 4 - .../rml-core/RMLTC0002a-CSV/student.csv | 2 - .../rml-core/RMLTC0002a-JSON/mapping.ttl | 28 - .../rml-core/RMLTC0002a-JSON/output.nq | 4 - .../rml-core/RMLTC0002a-JSON/student.json | 6 - .../rml-core/RMLTC0002a-MySQL/mapping.ttl | 32 - .../rml-core/RMLTC0002a-MySQL/output.nq | 3 - .../rml-core/RMLTC0002a-MySQL/resource.sql | 8 - .../RMLTC0002a-PostgreSQL/mapping.ttl | 32 - .../rml-core/RMLTC0002a-PostgreSQL/output.nq | 3 - .../RMLTC0002a-PostgreSQL/resource.sql | 7 - .../rml-core/RMLTC0002a-SPARQL/mapping.ttl | 38 - .../rml-core/RMLTC0002a-SPARQL/output.nq | 3 - .../rml-core/RMLTC0002a-SPARQL/resource.ttl | 6 - .../rml-core/RMLTC0002a-SQLServer/mapping.ttl | 32 - .../rml-core/RMLTC0002a-SQLServer/output.nq | 3 - .../RMLTC0002a-SQLServer/resource.sql | 10 - .../rml-core/RMLTC0002a-XML/mapping.ttl | 28 - .../rml-core/RMLTC0002a-XML/output.nq | 4 - .../rml-core/RMLTC0002a-XML/student.xml | 8 - .../rml-core/RMLTC0002b-CSV/mapping.ttl | 21 - .../rml-core/RMLTC0002b-CSV/output.nq | 2 - .../rml-core/RMLTC0002b-CSV/student.csv | 2 - .../rml-core/RMLTC0002b-JSON/mapping.ttl | 22 - .../rml-core/RMLTC0002b-JSON/output.nq | 2 - .../rml-core/RMLTC0002b-JSON/student.json | 6 - .../rml-core/RMLTC0002b-MySQL/mapping.ttl | 26 - .../rml-core/RMLTC0002b-MySQL/output.nq | 2 - .../rml-core/RMLTC0002b-MySQL/resource.sql | 7 - .../RMLTC0002b-PostgreSQL/mapping.ttl | 26 - .../rml-core/RMLTC0002b-PostgreSQL/output.nq | 1 - .../RMLTC0002b-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002b-SPARQL/mapping.ttl | 32 - .../rml-core/RMLTC0002b-SPARQL/output.nq | 1 - .../rml-core/RMLTC0002b-SPARQL/resource.ttl | 6 - .../rml-core/RMLTC0002b-SQLServer/mapping.ttl | 26 - .../rml-core/RMLTC0002b-SQLServer/output.nq | 2 - .../RMLTC0002b-SQLServer/resource.sql | 9 - .../rml-core/RMLTC0002b-XML/mapping.ttl | 22 - .../rml-core/RMLTC0002b-XML/output.nq | 2 - .../rml-core/RMLTC0002b-XML/student.xml | 8 - .../rml-core/RMLTC0002c-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0002c-CSV/student.csv | 2 - .../rml-core/RMLTC0002c-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0002c-MySQL/resource.sql | 7 - .../RMLTC0002c-PostgreSQL/mapping.ttl | 25 - .../RMLTC0002c-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002c-SQLServer/mapping.ttl | 25 - .../RMLTC0002c-SQLServer/resource.sql | 9 - .../rml-core/RMLTC0002d-MySQL/mapping.ttl | 26 - .../rml-core/RMLTC0002d-MySQL/output.nq | 1 - .../rml-core/RMLTC0002d-MySQL/resource.sql | 7 - .../RMLTC0002d-PostgreSQL/mapping.ttl | 26 - .../rml-core/RMLTC0002d-PostgreSQL/output.nq | 1 - .../RMLTC0002d-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002d-SQLServer/mapping.ttl | 26 - .../rml-core/RMLTC0002d-SQLServer/output.nq | 1 - .../RMLTC0002d-SQLServer/resource.sql | 9 - .../rml-core/RMLTC0002e-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0002e-CSV/student.csv | 2 - .../rml-core/RMLTC0002e-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0002e-JSON/student.json | 6 - .../rml-core/RMLTC0002e-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0002e-MySQL/resource.sql | 7 - .../RMLTC0002e-PostgreSQL/mapping.ttl | 25 - .../RMLTC0002e-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002e-SQLServer/mapping.ttl | 25 - .../RMLTC0002e-SQLServer/resource.sql | 9 - .../rml-core/RMLTC0002e-XML/mapping.ttl | 21 - .../rml-core/RMLTC0002e-XML/student.xml | 8 - .../rml-core/RMLTC0002f-MySQL/mapping.ttl | 32 - .../rml-core/RMLTC0002f-MySQL/resource.sql | 7 - .../RMLTC0002f-PostgreSQL/mapping.ttl | 32 - .../RMLTC0002f-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002f-SQLServer/mapping.ttl | 32 - .../RMLTC0002f-SQLServer/resource.sql | 7 - .../rml-core/RMLTC0002g-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0002g-JSON/student.json | 6 - .../rml-core/RMLTC0002g-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0002g-MySQL/resource.sql | 7 - .../RMLTC0002g-PostgreSQL/mapping.ttl | 25 - .../RMLTC0002g-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002g-SPARQL/mapping.ttl | 31 - .../rml-core/RMLTC0002g-SPARQL/resource.ttl | 6 - .../rml-core/RMLTC0002g-SQLServer/mapping.ttl | 25 - .../RMLTC0002g-SQLServer/resource.sql | 9 - .../rml-core/RMLTC0002h-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0002h-MySQL/resource.sql | 7 - .../RMLTC0002h-PostgreSQL/mapping.ttl | 25 - .../RMLTC0002h-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002h-SPARQL/mapping.ttl | 30 - .../rml-core/RMLTC0002h-SPARQL/resource.ttl | 6 - .../rml-core/RMLTC0002h-SQLServer/mapping.ttl | 25 - .../RMLTC0002h-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0002i-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0002i-MySQL/resource.sql | 7 - .../RMLTC0002i-PostgreSQL/mapping.ttl | 25 - .../RMLTC0002i-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002i-SQLServer/mapping.ttl | 25 - .../RMLTC0002i-SQLServer/resource.sql | 9 - .../rml-core/RMLTC0002j-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0002j-MySQL/resource.sql | 7 - .../RMLTC0002j-PostgreSQL/mapping.ttl | 25 - .../RMLTC0002j-PostgreSQL/resource.sql | 6 - .../rml-core/RMLTC0002j-SQLServer/mapping.ttl | 25 - .../RMLTC0002j-SQLServer/resource.sql | 9 - .../rml-core/RMLTC0003a-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0003a-MySQL/resource.sql | 8 - .../RMLTC0003a-PostgreSQL/mapping.ttl | 25 - .../RMLTC0003a-PostgreSQL/resource.sql | 7 - .../rml-core/RMLTC0003a-SQLServer/mapping.ttl | 25 - .../RMLTC0003a-SQLServer/resource.sql | 10 - .../rml-core/RMLTC0003b-MySQL/mapping.ttl | 26 - .../rml-core/RMLTC0003b-MySQL/output.nq | 1 - .../rml-core/RMLTC0003b-MySQL/resource.sql | 8 - .../RMLTC0003b-PostgreSQL/mapping.ttl | 26 - .../rml-core/RMLTC0003b-PostgreSQL/output.nq | 1 - .../RMLTC0003b-PostgreSQL/resource.sql | 7 - .../rml-core/RMLTC0003b-SQLServer/mapping.ttl | 26 - .../rml-core/RMLTC0003b-SQLServer/output.nq | 1 - .../RMLTC0003b-SQLServer/resource.sql | 10 - .../rml-core/RMLTC0003c-CSV/mapping.ttl | 21 - .../rml-core/RMLTC0003c-CSV/output.nq | 1 - .../rml-core/RMLTC0003c-CSV/student.csv | 2 - .../rml-core/RMLTC0003c-JSON/mapping.ttl | 22 - .../rml-core/RMLTC0003c-JSON/output.nq | 1 - .../rml-core/RMLTC0003c-JSON/student.json | 7 - .../rml-core/RMLTC0003c-MySQL/mapping.ttl | 26 - .../rml-core/RMLTC0003c-MySQL/output.nq | 1 - .../rml-core/RMLTC0003c-MySQL/resource.sql | 9 - .../RMLTC0003c-PostgreSQL/mapping.ttl | 26 - .../rml-core/RMLTC0003c-PostgreSQL/output.nq | 1 - .../RMLTC0003c-PostgreSQL/resource.sql | 7 - .../rml-core/RMLTC0003c-SPARQL/mapping.ttl | 33 - .../rml-core/RMLTC0003c-SPARQL/output.nq | 1 - .../rml-core/RMLTC0003c-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0003c-SQLServer/mapping.ttl | 26 - .../rml-core/RMLTC0003c-SQLServer/output.nq | 1 - .../RMLTC0003c-SQLServer/resource.sql | 10 - .../rml-core/RMLTC0003c-XML/mapping.ttl | 22 - .../rml-core/RMLTC0003c-XML/output.nq | 1 - .../rml-core/RMLTC0003c-XML/student.xml | 9 - .../rml-core/RMLTC0004a-CSV/mapping.ttl | 41 - .../rml-core/RMLTC0004a-CSV/output.nq | 5 - .../rml-core/RMLTC0004a-CSV/student_sport.csv | 2 - .../rml-core/RMLTC0004a-JSON/mapping.ttl | 43 - .../rml-core/RMLTC0004a-JSON/output.nq | 5 - .../RMLTC0004a-JSON/student_sport.json | 6 - .../rml-core/RMLTC0004a-MySQL/mapping.ttl | 44 - .../rml-core/RMLTC0004a-MySQL/output.nq | 5 - .../rml-core/RMLTC0004a-MySQL/resource.sql | 8 - .../RMLTC0004a-MySQL/student_sport.csv | 2 - .../RMLTC0004a-PostgreSQL/mapping.ttl | 44 - .../rml-core/RMLTC0004a-PostgreSQL/output.nq | 4 - .../RMLTC0004a-PostgreSQL/resource.sql | 7 - .../RMLTC0004a-PostgreSQL/student_sport.csv | 2 - .../rml-core/RMLTC0004a-SPARQL/mapping.ttl | 66 - .../rml-core/RMLTC0004a-SPARQL/output.nq | 4 - .../rml-core/RMLTC0004a-SPARQL/resource.ttl | 8 - .../rml-core/RMLTC0004a-SQLServer/mapping.ttl | 44 - .../rml-core/RMLTC0004a-SQLServer/output.nq | 5 - .../RMLTC0004a-SQLServer/resource.sql | 7 - .../RMLTC0004a-SQLServer/student_sport.csv | 2 - .../rml-core/RMLTC0004a-XML/mapping.ttl | 43 - .../rml-core/RMLTC0004a-XML/output.nq | 5 - .../rml-core/RMLTC0004a-XML/student_sport.xml | 8 - .../rml-core/RMLTC0004b-CSV/mapping.ttl | 21 - .../rml-core/RMLTC0004b-CSV/student.csv | 2 - .../rml-core/RMLTC0004b-JSON/mapping.ttl | 22 - .../rml-core/RMLTC0004b-JSON/student.json | 5 - .../rml-core/RMLTC0004b-MySQL/mapping.ttl | 26 - .../rml-core/RMLTC0004b-MySQL/resource.sql | 6 - .../RMLTC0004b-PostgreSQL/mapping.ttl | 26 - .../RMLTC0004b-PostgreSQL/resource.sql | 5 - .../rml-core/RMLTC0004b-SPARQL/mapping.ttl | 36 - .../rml-core/RMLTC0004b-SPARQL/resource.ttl | 4 - .../rml-core/RMLTC0004b-SQLServer/mapping.ttl | 26 - .../RMLTC0004b-SQLServer/resource.sql | 6 - .../rml-core/RMLTC0004b-XML/mapping.ttl | 22 - .../rml-core/RMLTC0004b-XML/student.xml | 7 - .../rml-core/RMLTC0005a-CSV/ious.csv | 4 - .../rml-core/RMLTC0005a-CSV/mapping.ttl | 22 - .../rml-core/RMLTC0005a-CSV/output.nq | 5 - .../rml-core/RMLTC0005a-JSON/ious.json | 19 - .../rml-core/RMLTC0005a-JSON/mapping.ttl | 23 - .../rml-core/RMLTC0005a-JSON/output.nq | 5 - .../rml-core/RMLTC0005a-MySQL/mapping.ttl | 27 - .../rml-core/RMLTC0005a-MySQL/output.nq | 5 - .../rml-core/RMLTC0005a-MySQL/resource.sql | 9 - .../RMLTC0005a-PostgreSQL/mapping.ttl | 27 - .../rml-core/RMLTC0005a-PostgreSQL/output.nq | 5 - .../RMLTC0005a-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0005a-SQLServer/mapping.ttl | 27 - .../rml-core/RMLTC0005a-SQLServer/output.nq | 5 - .../RMLTC0005a-SQLServer/resource.sql | 10 - .../rml-core/RMLTC0005a-XML/ious.xml | 19 - .../rml-core/RMLTC0005a-XML/mapping.ttl | 23 - .../rml-core/RMLTC0005a-XML/output.nq | 5 - .../rml-core/RMLTC0005b-MySQL/mapping.ttl | 36 - .../rml-core/RMLTC0005b-MySQL/output.nq | 9 - .../rml-core/RMLTC0005b-MySQL/resource.sql | 9 - .../RMLTC0005b-PostgreSQL/mapping.ttl | 36 - .../rml-core/RMLTC0005b-PostgreSQL/output.nq | 9 - .../RMLTC0005b-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0005b-SQLServer/mapping.ttl | 36 - .../rml-core/RMLTC0005b-SQLServer/output.nq | 9 - .../RMLTC0005b-SQLServer/resource.sql | 9 - .../rml-core/RMLTC0006a-CSV/mapping.ttl | 25 - .../rml-core/RMLTC0006a-CSV/output.nq | 1 - .../rml-core/RMLTC0006a-CSV/student.csv | 2 - .../rml-core/RMLTC0006a-JSON/mapping.ttl | 26 - .../rml-core/RMLTC0006a-JSON/output.nq | 1 - .../rml-core/RMLTC0006a-JSON/student.json | 7 - .../rml-core/RMLTC0006a-MySQL/mapping.ttl | 30 - .../rml-core/RMLTC0006a-MySQL/output.nq | 1 - .../rml-core/RMLTC0006a-MySQL/resource.sql | 9 - .../RMLTC0006a-PostgreSQL/mapping.ttl | 30 - .../rml-core/RMLTC0006a-PostgreSQL/output.nq | 1 - .../RMLTC0006a-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0006a-SPARQL/mapping.ttl | 39 - .../rml-core/RMLTC0006a-SPARQL/output.nq | 1 - .../rml-core/RMLTC0006a-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0006a-SQLServer/mapping.ttl | 30 - .../rml-core/RMLTC0006a-SQLServer/output.nq | 1 - .../RMLTC0006a-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0006a-XML/mapping.ttl | 26 - .../rml-core/RMLTC0006a-XML/output.nq | 1 - .../rml-core/RMLTC0006a-XML/student.xml | 9 - .../rml-core/RMLTC0007a-CSV/mapping.ttl | 19 - .../rml-core/RMLTC0007a-CSV/output.nq | 2 - .../rml-core/RMLTC0007a-CSV/student.csv | 2 - .../rml-core/RMLTC0007a-JSON/mapping.ttl | 20 - .../rml-core/RMLTC0007a-JSON/output.nq | 2 - .../rml-core/RMLTC0007a-JSON/student.json | 7 - .../rml-core/RMLTC0007a-MySQL/mapping.ttl | 24 - .../rml-core/RMLTC0007a-MySQL/output.nq | 2 - .../rml-core/RMLTC0007a-MySQL/resource.sql | 9 - .../RMLTC0007a-PostgreSQL/mapping.ttl | 24 - .../rml-core/RMLTC0007a-PostgreSQL/output.nq | 2 - .../RMLTC0007a-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0007a-SPARQL/mapping.ttl | 31 - .../rml-core/RMLTC0007a-SPARQL/output.nq | 2 - .../rml-core/RMLTC0007a-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0007a-SQLServer/mapping.ttl | 24 - .../rml-core/RMLTC0007a-SQLServer/output.nq | 2 - .../RMLTC0007a-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0007a-XML/mapping.ttl | 20 - .../rml-core/RMLTC0007a-XML/output.nq | 2 - .../rml-core/RMLTC0007a-XML/student.xml | 9 - .../rml-core/RMLTC0007b-CSV/mapping.ttl | 26 - .../rml-core/RMLTC0007b-CSV/output.nq | 3 - .../rml-core/RMLTC0007b-CSV/student.csv | 2 - .../rml-core/RMLTC0007b-JSON/mapping.ttl | 27 - .../rml-core/RMLTC0007b-JSON/output.nq | 3 - .../rml-core/RMLTC0007b-JSON/student.json | 7 - .../rml-core/RMLTC0007b-MySQL/mapping.ttl | 31 - .../rml-core/RMLTC0007b-MySQL/output.nq | 3 - .../rml-core/RMLTC0007b-MySQL/resource.sql | 9 - .../RMLTC0007b-PostgreSQL/mapping.ttl | 31 - .../rml-core/RMLTC0007b-PostgreSQL/output.nq | 3 - .../RMLTC0007b-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0007b-SPARQL/mapping.ttl | 38 - .../rml-core/RMLTC0007b-SPARQL/output.nq | 3 - .../rml-core/RMLTC0007b-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0007b-SQLServer/mapping.ttl | 31 - .../rml-core/RMLTC0007b-SQLServer/output.nq | 3 - .../RMLTC0007b-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0007b-XML/mapping.ttl | 27 - .../rml-core/RMLTC0007b-XML/output.nq | 3 - .../rml-core/RMLTC0007b-XML/student.xml | 9 - .../rml-core/RMLTC0007c-CSV/mapping.ttl | 27 - .../rml-core/RMLTC0007c-CSV/output.nq | 5 - .../rml-core/RMLTC0007c-CSV/student.csv | 2 - .../rml-core/RMLTC0007c-JSON/mapping.ttl | 28 - .../rml-core/RMLTC0007c-JSON/output.nq | 5 - .../rml-core/RMLTC0007c-JSON/student.json | 7 - .../rml-core/RMLTC0007c-MySQL/mapping.ttl | 32 - .../rml-core/RMLTC0007c-MySQL/output.nq | 5 - .../rml-core/RMLTC0007c-MySQL/resource.sql | 9 - .../RMLTC0007c-PostgreSQL/mapping.ttl | 32 - .../rml-core/RMLTC0007c-PostgreSQL/output.nq | 5 - .../RMLTC0007c-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0007c-SPARQL/mapping.ttl | 34 - .../rml-core/RMLTC0007c-SPARQL/output.nq | 4 - .../rml-core/RMLTC0007c-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0007c-SQLServer/mapping.ttl | 32 - .../rml-core/RMLTC0007c-SQLServer/output.nq | 5 - .../RMLTC0007c-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0007c-XML/mapping.ttl | 28 - .../rml-core/RMLTC0007c-XML/output.nq | 5 - .../rml-core/RMLTC0007c-XML/student.xml | 9 - .../rml-core/RMLTC0007d-CSV/mapping.ttl | 33 - .../rml-core/RMLTC0007d-CSV/output.nq | 5 - .../rml-core/RMLTC0007d-CSV/student.csv | 2 - .../rml-core/RMLTC0007d-JSON/mapping.ttl | 34 - .../rml-core/RMLTC0007d-JSON/output.nq | 5 - .../rml-core/RMLTC0007d-JSON/student.json | 7 - .../rml-core/RMLTC0007d-MySQL/mapping.ttl | 38 - .../rml-core/RMLTC0007d-MySQL/output.nq | 5 - .../rml-core/RMLTC0007d-MySQL/resource.sql | 9 - .../RMLTC0007d-PostgreSQL/mapping.ttl | 38 - .../rml-core/RMLTC0007d-PostgreSQL/output.nq | 5 - .../RMLTC0007d-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0007d-SPARQL/mapping.ttl | 40 - .../rml-core/RMLTC0007d-SPARQL/output.nq | 4 - .../rml-core/RMLTC0007d-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0007d-SQLServer/mapping.ttl | 38 - .../rml-core/RMLTC0007d-SQLServer/output.nq | 5 - .../RMLTC0007d-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0007d-XML/mapping.ttl | 34 - .../rml-core/RMLTC0007d-XML/output.nq | 5 - .../rml-core/RMLTC0007d-XML/student.xml | 9 - .../rml-core/RMLTC0007e-CSV/mapping.ttl | 28 - .../rml-core/RMLTC0007e-CSV/output.nq | 4 - .../rml-core/RMLTC0007e-CSV/student.csv | 2 - .../rml-core/RMLTC0007e-JSON/mapping.ttl | 29 - .../rml-core/RMLTC0007e-JSON/output.nq | 4 - .../rml-core/RMLTC0007e-JSON/student.json | 6 - .../rml-core/RMLTC0007e-MySQL/mapping.ttl | 33 - .../rml-core/RMLTC0007e-MySQL/output.nq | 4 - .../rml-core/RMLTC0007e-MySQL/resource.sql | 9 - .../RMLTC0007e-PostgreSQL/mapping.ttl | 33 - .../rml-core/RMLTC0007e-PostgreSQL/output.nq | 4 - .../RMLTC0007e-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0007e-SPARQL/mapping.ttl | 29 - .../rml-core/RMLTC0007e-SPARQL/output.nq | 2 - .../rml-core/RMLTC0007e-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0007e-SQLServer/mapping.ttl | 33 - .../rml-core/RMLTC0007e-SQLServer/output.nq | 4 - .../RMLTC0007e-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0007e-XML/mapping.ttl | 29 - .../rml-core/RMLTC0007e-XML/output.nq | 4 - .../rml-core/RMLTC0007e-XML/student.xml | 8 - .../rml-core/RMLTC0007f-CSV/mapping.ttl | 31 - .../rml-core/RMLTC0007f-CSV/output.nq | 4 - .../rml-core/RMLTC0007f-CSV/student.csv | 2 - .../rml-core/RMLTC0007f-JSON/mapping.ttl | 32 - .../rml-core/RMLTC0007f-JSON/output.nq | 4 - .../rml-core/RMLTC0007f-JSON/student.json | 7 - .../rml-core/RMLTC0007f-MySQL/mapping.ttl | 36 - .../rml-core/RMLTC0007f-MySQL/output.nq | 4 - .../rml-core/RMLTC0007f-MySQL/resource.sql | 9 - .../RMLTC0007f-PostgreSQL/mapping.ttl | 36 - .../rml-core/RMLTC0007f-PostgreSQL/output.nq | 4 - .../RMLTC0007f-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0007f-SPARQL/mapping.ttl | 33 - .../rml-core/RMLTC0007f-SPARQL/output.nq | 2 - .../rml-core/RMLTC0007f-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0007f-SQLServer/mapping.ttl | 36 - .../rml-core/RMLTC0007f-SQLServer/output.nq | 4 - .../RMLTC0007f-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0007f-XML/mapping.ttl | 32 - .../rml-core/RMLTC0007f-XML/output.nq | 4 - .../rml-core/RMLTC0007f-XML/student.xml | 9 - .../rml-core/RMLTC0007g-CSV/mapping.ttl | 21 - .../rml-core/RMLTC0007g-CSV/output.nq | 2 - .../rml-core/RMLTC0007g-CSV/student.csv | 2 - .../rml-core/RMLTC0007g-JSON/mapping.ttl | 22 - .../rml-core/RMLTC0007g-JSON/output.nq | 2 - .../rml-core/RMLTC0007g-JSON/student.json | 7 - .../rml-core/RMLTC0007g-MySQL/mapping.ttl | 26 - .../rml-core/RMLTC0007g-MySQL/output.nq | 2 - .../rml-core/RMLTC0007g-MySQL/resource.sql | 9 - .../RMLTC0007g-PostgreSQL/mapping.ttl | 26 - .../rml-core/RMLTC0007g-PostgreSQL/output.nq | 2 - .../RMLTC0007g-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0007g-SPARQL/mapping.ttl | 33 - .../rml-core/RMLTC0007g-SPARQL/output.nq | 2 - .../rml-core/RMLTC0007g-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0007g-SQLServer/mapping.ttl | 26 - .../rml-core/RMLTC0007g-SQLServer/output.nq | 2 - .../RMLTC0007g-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0007g-XML/mapping.ttl | 22 - .../rml-core/RMLTC0007g-XML/output.nq | 2 - .../rml-core/RMLTC0007g-XML/student.xml | 9 - .../rml-core/RMLTC0007h-CSV/mapping.ttl | 24 - .../rml-core/RMLTC0007h-CSV/student.csv | 2 - .../rml-core/RMLTC0007h-JSON/mapping.ttl | 25 - .../rml-core/RMLTC0007h-JSON/student.json | 7 - .../rml-core/RMLTC0007h-MySQL/mapping.ttl | 29 - .../rml-core/RMLTC0007h-MySQL/resource.sql | 9 - .../RMLTC0007h-PostgreSQL/mapping.ttl | 29 - .../RMLTC0007h-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0007h-SPARQL/mapping.ttl | 36 - .../rml-core/RMLTC0007h-SPARQL/resource.ttl | 7 - .../rml-core/RMLTC0007h-SQLServer/mapping.ttl | 29 - .../RMLTC0007h-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0007h-XML/mapping.ttl | 25 - .../rml-core/RMLTC0007h-XML/student.xml | 9 - .../rml-core/RMLTC0008a-CSV/mapping.ttl | 38 - .../rml-core/RMLTC0008a-CSV/output.nq | 5 - .../rml-core/RMLTC0008a-CSV/student.csv | 2 - .../rml-core/RMLTC0008a-JSON/mapping.ttl | 39 - .../rml-core/RMLTC0008a-JSON/output.nq | 5 - .../rml-core/RMLTC0008a-JSON/student.json | 7 - .../rml-core/RMLTC0008a-MySQL/mapping.ttl | 43 - .../rml-core/RMLTC0008a-MySQL/output.nq | 6 - .../rml-core/RMLTC0008a-MySQL/resource.sql | 9 - .../RMLTC0008a-PostgreSQL/mapping.ttl | 43 - .../rml-core/RMLTC0008a-PostgreSQL/output.nq | 6 - .../RMLTC0008a-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0008a-SPARQL/mapping.ttl | 51 - .../rml-core/RMLTC0008a-SPARQL/output.nq | 5 - .../rml-core/RMLTC0008a-SPARQL/resource.ttl | 9 - .../rml-core/RMLTC0008a-SQLServer/mapping.ttl | 43 - .../rml-core/RMLTC0008a-SQLServer/output.nq | 6 - .../RMLTC0008a-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0008a-XML/mapping.ttl | 39 - .../rml-core/RMLTC0008a-XML/output.nq | 5 - .../rml-core/RMLTC0008a-XML/student.xml | 9 - .../rml-core/RMLTC0008b-CSV/mapping.ttl | 53 - .../rml-core/RMLTC0008b-CSV/output.nq | 7 - .../rml-core/RMLTC0008b-CSV/student.csv | 2 - .../rml-core/RMLTC0008b-JSON/mapping.ttl | 55 - .../rml-core/RMLTC0008b-JSON/output.nq | 7 - .../rml-core/RMLTC0008b-JSON/student.json | 7 - .../rml-core/RMLTC0008b-MySQL/mapping.ttl | 56 - .../rml-core/RMLTC0008b-MySQL/output.nq | 7 - .../rml-core/RMLTC0008b-MySQL/resource.sql | 9 - .../RMLTC0008b-PostgreSQL/mapping.ttl | 56 - .../rml-core/RMLTC0008b-PostgreSQL/output.nq | 7 - .../RMLTC0008b-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0008b-SPARQL/mapping.ttl | 77 - .../rml-core/RMLTC0008b-SPARQL/output.nq | 7 - .../rml-core/RMLTC0008b-SPARQL/resource.ttl | 9 - .../rml-core/RMLTC0008b-SQLServer/mapping.ttl | 56 - .../rml-core/RMLTC0008b-SQLServer/output.nq | 7 - .../RMLTC0008b-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0008b-XML/mapping.ttl | 55 - .../rml-core/RMLTC0008b-XML/output.nq | 7 - .../rml-core/RMLTC0008b-XML/student.xml | 9 - .../rml-core/RMLTC0008c-CSV/mapping.ttl | 21 - .../rml-core/RMLTC0008c-CSV/output.nq | 3 - .../rml-core/RMLTC0008c-CSV/student.csv | 2 - .../rml-core/RMLTC0008c-JSON/mapping.ttl | 22 - .../rml-core/RMLTC0008c-JSON/output.nq | 3 - .../rml-core/RMLTC0008c-JSON/student.json | 7 - .../rml-core/RMLTC0008c-MySQL/mapping.ttl | 26 - .../rml-core/RMLTC0008c-MySQL/output.nq | 3 - .../rml-core/RMLTC0008c-MySQL/resource.sql | 9 - .../RMLTC0008c-PostgreSQL/mapping.ttl | 26 - .../rml-core/RMLTC0008c-PostgreSQL/output.nq | 3 - .../RMLTC0008c-PostgreSQL/resource.sql | 8 - .../rml-core/RMLTC0008c-SPARQL/mapping.ttl | 36 - .../rml-core/RMLTC0008c-SPARQL/output.nq | 3 - .../rml-core/RMLTC0008c-SPARQL/resource.ttl | 9 - .../rml-core/RMLTC0008c-SQLServer/mapping.ttl | 26 - .../rml-core/RMLTC0008c-SQLServer/output.nq | 3 - .../RMLTC0008c-SQLServer/resource.sql | 8 - .../rml-core/RMLTC0008c-XML/mapping.ttl | 22 - .../rml-core/RMLTC0008c-XML/output.nq | 3 - .../rml-core/RMLTC0008c-XML/student.xml | 9 - .../rml-core/RMLTC0009a-CSV/mapping.ttl | 48 - .../rml-core/RMLTC0009a-CSV/output.nq | 4 - .../rml-core/RMLTC0009a-CSV/sport.csv | 2 - .../rml-core/RMLTC0009a-CSV/student.csv | 3 - .../rml-core/RMLTC0009a-JSON/mapping.ttl | 50 - .../rml-core/RMLTC0009a-JSON/output.nq | 4 - .../rml-core/RMLTC0009a-JSON/sport.json | 8 - .../rml-core/RMLTC0009a-JSON/student.json | 13 - .../rml-core/RMLTC0009a-MySQL/mapping.ttl | 51 - .../rml-core/RMLTC0009a-MySQL/output.nq | 4 - .../rml-core/RMLTC0009a-MySQL/resource.sql | 18 - .../RMLTC0009a-PostgreSQL/mapping.ttl | 51 - .../rml-core/RMLTC0009a-PostgreSQL/note.md | 4 - .../rml-core/RMLTC0009a-PostgreSQL/output.nq | 4 - .../RMLTC0009a-PostgreSQL/resource.sql | 17 - .../rml-core/RMLTC0009a-SPARQL/mapping.ttl | 79 - .../rml-core/RMLTC0009a-SPARQL/output.nq | 4 - .../rml-core/RMLTC0009a-SPARQL/resource1.ttl | 13 - .../rml-core/RMLTC0009a-SPARQL/resource2.ttl | 6 - .../rml-core/RMLTC0009a-SQLServer/mapping.ttl | 51 - .../rml-core/RMLTC0009a-SQLServer/output.nq | 4 - .../RMLTC0009a-SQLServer/resource.sql | 17 - .../rml-core/RMLTC0009a-XML/mapping.ttl | 50 - .../rml-core/RMLTC0009a-XML/output.nq | 4 - .../rml-core/RMLTC0009a-XML/sport.xml | 8 - .../rml-core/RMLTC0009a-XML/student.xml | 13 - .../rml-core/RMLTC0009b-CSV/mapping.ttl | 54 - .../rml-core/RMLTC0009b-CSV/output.nq | 8 - .../rml-core/RMLTC0009b-CSV/sport.csv | 2 - .../rml-core/RMLTC0009b-CSV/student.csv | 3 - .../rml-core/RMLTC0009b-JSON/mapping.ttl | 56 - .../rml-core/RMLTC0009b-JSON/output.nq | 8 - .../rml-core/RMLTC0009b-JSON/sport.json | 8 - .../rml-core/RMLTC0009b-JSON/student.json | 13 - .../rml-core/RMLTC0009b-MySQL/mapping.ttl | 57 - .../rml-core/RMLTC0009b-MySQL/output.nq | 8 - .../rml-core/RMLTC0009b-MySQL/resource.sql | 18 - .../RMLTC0009b-PostgreSQL/mapping.ttl | 57 - .../rml-core/RMLTC0009b-PostgreSQL/note.md | 4 - .../rml-core/RMLTC0009b-PostgreSQL/output.nq | 8 - .../RMLTC0009b-PostgreSQL/resource.sql | 17 - .../rml-core/RMLTC0009b-SPARQL/mapping.ttl | 85 - .../rml-core/RMLTC0009b-SPARQL/output.nq | 8 - .../rml-core/RMLTC0009b-SPARQL/resource1.ttl | 13 - .../rml-core/RMLTC0009b-SPARQL/resource2.ttl | 6 - .../rml-core/RMLTC0009b-SQLServer/mapping.ttl | 57 - .../rml-core/RMLTC0009b-SQLServer/output.nq | 8 - .../RMLTC0009b-SQLServer/resource.sql | 18 - .../rml-core/RMLTC0009b-XML/mapping.ttl | 56 - .../rml-core/RMLTC0009b-XML/output.nq | 8 - .../rml-core/RMLTC0009b-XML/sport.xml | 8 - .../rml-core/RMLTC0009b-XML/student.xml | 13 - .../rml-core/RMLTC0009c-MySQL/mapping.ttl | 29 - .../rml-core/RMLTC0009c-MySQL/output.nq | 4 - .../rml-core/RMLTC0009c-MySQL/resource.sql | 21 - .../RMLTC0009c-PostgreSQL/mapping.ttl | 29 - .../rml-core/RMLTC0009c-PostgreSQL/output.nq | 4 - .../RMLTC0009c-PostgreSQL/resource.sql | 20 - .../rml-core/RMLTC0009c-SQLServer/mapping.ttl | 29 - .../rml-core/RMLTC0009c-SQLServer/output.nq | 4 - .../RMLTC0009c-SQLServer/resource.sql | 21 - .../rml-core/RMLTC0009d-MySQL/mapping.ttl | 35 - .../rml-core/RMLTC0009d-MySQL/output.nq | 7 - .../rml-core/RMLTC0009d-MySQL/resource.sql | 21 - .../RMLTC0009d-PostgreSQL/mapping.ttl | 35 - .../rml-core/RMLTC0009d-PostgreSQL/output.nq | 7 - .../RMLTC0009d-PostgreSQL/resource.sql | 20 - .../rml-core/RMLTC0009d-SQLServer/mapping.ttl | 35 - .../rml-core/RMLTC0009d-SQLServer/output.nq | 7 - .../RMLTC0009d-SQLServer/resource.sql | 21 - .../rml-core/RMLTC0010a-CSV/country_info.csv | 4 - .../rml-core/RMLTC0010a-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0010a-CSV/output.nq | 4 - .../RMLTC0010a-JSON/country_info.json | 15 - .../rml-core/RMLTC0010a-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0010a-JSON/output.nq | 4 - .../rml-core/RMLTC0010a-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0010a-MySQL/output.nq | 4 - .../rml-core/RMLTC0010a-MySQL/resource.sql | 11 - .../RMLTC0010a-PostgreSQL/mapping.ttl | 25 - .../rml-core/RMLTC0010a-PostgreSQL/output.nq | 4 - .../RMLTC0010a-PostgreSQL/resource.sql | 10 - .../rml-core/RMLTC0010a-SQLServer/mapping.ttl | 25 - .../rml-core/RMLTC0010a-SQLServer/output.nq | 4 - .../RMLTC0010a-SQLServer/resource.sql | 11 - .../rml-core/RMLTC0010b-CSV/country_info.csv | 4 - .../rml-core/RMLTC0010b-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0010b-CSV/output.nq | 4 - .../RMLTC0010b-JSON/country_info.json | 15 - .../rml-core/RMLTC0010b-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0010b-JSON/output.nq | 4 - .../rml-core/RMLTC0010b-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0010b-MySQL/output.nq | 4 - .../rml-core/RMLTC0010b-MySQL/resource.sql | 11 - .../RMLTC0010b-PostgreSQL/mapping.ttl | 25 - .../rml-core/RMLTC0010b-PostgreSQL/output.nq | 4 - .../RMLTC0010b-PostgreSQL/resource.sql | 10 - .../rml-core/RMLTC0010b-SQLServer/mapping.ttl | 25 - .../rml-core/RMLTC0010b-SQLServer/output.nq | 4 - .../RMLTC0010b-SQLServer/resource.sql | 11 - .../rml-core/RMLTC0010b-XML/country_info.xml | 20 - .../rml-core/RMLTC0010b-XML/mapping.ttl | 21 - .../rml-core/RMLTC0010b-XML/output.nq | 4 - .../rml-core/RMLTC0010c-CSV/country_info.csv | 4 - .../rml-core/RMLTC0010c-CSV/mapping.ttl | 21 - .../rml-core/RMLTC0010c-CSV/output.nq | 4 - .../RMLTC0010c-JSON/country_info.json | 15 - .../rml-core/RMLTC0010c-JSON/mapping.ttl | 22 - .../rml-core/RMLTC0010c-JSON/output.nq | 4 - .../rml-core/RMLTC0010c-MySQL/mapping.ttl | 26 - .../rml-core/RMLTC0010c-MySQL/output.nq | 4 - .../rml-core/RMLTC0010c-MySQL/resource.sql | 11 - .../RMLTC0010c-PostgreSQL/mapping.ttl | 26 - .../rml-core/RMLTC0010c-PostgreSQL/output.nq | 4 - .../RMLTC0010c-PostgreSQL/resource.sql | 10 - .../rml-core/RMLTC0010c-SQLServer/mapping.ttl | 26 - .../rml-core/RMLTC0010c-SQLServer/output.nq | 4 - .../RMLTC0010c-SQLServer/resource.sql | 11 - .../rml-core/RMLTC0010c-XML/country_info.xml | 20 - .../rml-core/RMLTC0010c-XML/mapping.ttl | 22 - .../rml-core/RMLTC0010c-XML/output.nq | 4 - .../rml-core/RMLTC0011a-MySQL/mapping.ttl | 72 - .../rml-core/RMLTC0011a-MySQL/output.nq | 20 - .../rml-core/RMLTC0011a-MySQL/resource.sql | 36 - .../RMLTC0011a-PostgreSQL/mapping.ttl | 72 - .../rml-core/RMLTC0011a-PostgreSQL/output.nq | 20 - .../RMLTC0011a-PostgreSQL/resource.sql | 33 - .../rml-core/RMLTC0011a-SQLServer/mapping.ttl | 72 - .../rml-core/RMLTC0011a-SQLServer/output.nq | 20 - .../RMLTC0011a-SQLServer/resource.sql | 33 - .../rml-core/RMLTC0011b-CSV/mapping.ttl | 66 - .../rml-core/RMLTC0011b-CSV/output.nq | 17 - .../rml-core/RMLTC0011b-CSV/sport.csv | 4 - .../rml-core/RMLTC0011b-CSV/student.csv | 4 - .../rml-core/RMLTC0011b-CSV/student_sport.csv | 5 - .../rml-core/RMLTC0011b-JSON/mapping.ttl | 69 - .../rml-core/RMLTC0011b-JSON/output.nq | 17 - .../rml-core/RMLTC0011b-JSON/sport.json | 7 - .../rml-core/RMLTC0011b-JSON/student.json | 7 - .../RMLTC0011b-JSON/student_sport.json | 8 - .../rml-core/RMLTC0011b-MySQL/mapping.ttl | 67 - .../rml-core/RMLTC0011b-MySQL/output.nq | 17 - .../rml-core/RMLTC0011b-MySQL/resource.sql | 34 - .../RMLTC0011b-PostgreSQL/mapping.ttl | 67 - .../rml-core/RMLTC0011b-PostgreSQL/output.nq | 17 - .../RMLTC0011b-PostgreSQL/resource.sql | 31 - .../rml-core/RMLTC0011b-SQLServer/mapping.ttl | 67 - .../rml-core/RMLTC0011b-SQLServer/output.nq | 17 - .../RMLTC0011b-SQLServer/resource.sql | 32 - .../rml-core/RMLTC0011b-XML/mapping.ttl | 69 - .../rml-core/RMLTC0011b-XML/output.nq | 17 - .../rml-core/RMLTC0011b-XML/sport.xml | 16 - .../rml-core/RMLTC0011b-XML/student.xml | 19 - .../rml-core/RMLTC0011b-XML/student_sport.xml | 20 - .../rml-core/RMLTC0012a-CSV/mapping.ttl | 28 - .../rml-core/RMLTC0012a-CSV/output.nq | 5 - .../rml-core/RMLTC0012a-CSV/persons.csv | 4 - .../rml-core/RMLTC0012a-JSON/mapping.ttl | 29 - .../rml-core/RMLTC0012a-JSON/output.nq | 5 - .../rml-core/RMLTC0012a-JSON/persons.json | 7 - .../rml-core/RMLTC0012a-MySQL/mapping.ttl | 33 - .../rml-core/RMLTC0012a-MySQL/output.nq | 5 - .../rml-core/RMLTC0012a-MySQL/resource.sql | 19 - .../RMLTC0012a-PostgreSQL/mapping.ttl | 33 - .../rml-core/RMLTC0012a-PostgreSQL/output.nq | 5 - .../RMLTC0012a-PostgreSQL/resource.sql | 17 - .../rml-core/RMLTC0012a-SPARQL/mapping.ttl | 40 - .../rml-core/RMLTC0012a-SPARQL/output.nq | 5 - .../rml-core/RMLTC0012a-SPARQL/resource.ttl | 15 - .../rml-core/RMLTC0012a-SQLServer/mapping.ttl | 33 - .../rml-core/RMLTC0012a-SQLServer/output.nq | 5 - .../RMLTC0012a-SQLServer/resource.sql | 19 - .../rml-core/RMLTC0012a-XML/mapping.ttl | 29 - .../rml-core/RMLTC0012a-XML/output.nq | 5 - .../rml-core/RMLTC0012a-XML/persons.xml | 19 - .../rml-core/RMLTC0012b-CSV/lives.csv | 4 - .../rml-core/RMLTC0012b-CSV/mapping.ttl | 42 - .../rml-core/RMLTC0012b-CSV/output.nq | 5 - .../rml-core/RMLTC0012b-CSV/persons.csv | 4 - .../rml-core/RMLTC0012b-JSON/lives.json | 7 - .../rml-core/RMLTC0012b-JSON/mapping.ttl | 44 - .../rml-core/RMLTC0012b-JSON/output.nq | 5 - .../rml-core/RMLTC0012b-JSON/persons.json | 7 - .../rml-core/RMLTC0012b-MySQL/mapping.ttl | 45 - .../rml-core/RMLTC0012b-MySQL/output.nq | 5 - .../rml-core/RMLTC0012b-MySQL/resource.sql | 22 - .../RMLTC0012b-PostgreSQL/mapping.ttl | 45 - .../rml-core/RMLTC0012b-PostgreSQL/output.nq | 5 - .../RMLTC0012b-PostgreSQL/resource.sql | 21 - .../rml-core/RMLTC0012b-SPARQL/mapping.ttl | 71 - .../rml-core/RMLTC0012b-SPARQL/output.nq | 5 - .../rml-core/RMLTC0012b-SPARQL/resource1.ttl | 15 - .../rml-core/RMLTC0012b-SPARQL/resource2.ttl | 15 - .../rml-core/RMLTC0012b-SQLServer/mapping.ttl | 45 - .../rml-core/RMLTC0012b-SQLServer/output.nq | 5 - .../RMLTC0012b-SQLServer/resource.sql | 22 - .../rml-core/RMLTC0012b-XML/lives.xml | 19 - .../rml-core/RMLTC0012b-XML/mapping.ttl | 44 - .../rml-core/RMLTC0012b-XML/output.nq | 5 - .../rml-core/RMLTC0012b-XML/persons.xml | 19 - .../rml-core/RMLTC0012c-CSV/mapping.ttl | 24 - .../rml-core/RMLTC0012c-CSV/persons.csv | 4 - .../rml-core/RMLTC0012c-JSON/mapping.ttl | 25 - .../rml-core/RMLTC0012c-JSON/persons.json | 7 - .../rml-core/RMLTC0012c-MySQL/mapping.ttl | 29 - .../rml-core/RMLTC0012c-MySQL/resource.sql | 19 - .../RMLTC0012c-PostgreSQL/mapping.ttl | 29 - .../RMLTC0012c-PostgreSQL/resource.sql | 18 - .../rml-core/RMLTC0012c-SQLServer/mapping.ttl | 29 - .../RMLTC0012c-SQLServer/resource.sql | 19 - .../rml-core/RMLTC0012c-XML/mapping.ttl | 25 - .../rml-core/RMLTC0012c-XML/persons.xml | 19 - .../rml-core/RMLTC0012d-CSV/mapping.ttl | 31 - .../rml-core/RMLTC0012d-CSV/persons.csv | 4 - .../rml-core/RMLTC0012d-JSON/mapping.ttl | 32 - .../rml-core/RMLTC0012d-JSON/persons.json | 7 - .../rml-core/RMLTC0012d-MySQL/mapping.ttl | 27 - .../rml-core/RMLTC0012d-MySQL/resource.sql | 19 - .../RMLTC0012d-PostgreSQL/mapping.ttl | 27 - .../RMLTC0012d-PostgreSQL/resource.sql | 18 - .../rml-core/RMLTC0012d-SQLServer/mapping.ttl | 27 - .../RMLTC0012d-SQLServer/resource.sql | 19 - .../rml-core/RMLTC0012d-XML/mapping.ttl | 32 - .../rml-core/RMLTC0012d-XML/persons.xml | 19 - .../rml-core/RMLTC0012e-MySQL/mapping.ttl | 69 - .../rml-core/RMLTC0012e-MySQL/output.nq | 18 - .../rml-core/RMLTC0012e-MySQL/resource.sql | 19 - .../RMLTC0012e-PostgreSQL/mapping.ttl | 69 - .../rml-core/RMLTC0012e-PostgreSQL/output.nq | 18 - .../RMLTC0012e-PostgreSQL/resource.sql | 18 - .../rml-core/RMLTC0012e-SQLServer/mapping.ttl | 69 - .../rml-core/RMLTC0012e-SQLServer/output.nq | 18 - .../RMLTC0012e-SQLServer/resource.sql | 19 - .../rml-core/RMLTC0013a-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0013a-JSON/output.nq | 1 - .../rml-core/RMLTC0013a-JSON/persons.json | 6 - .../rml-core/RMLTC0013a-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0013a-MySQL/output.nq | 3 - .../rml-core/RMLTC0013a-MySQL/resource.sql | 12 - .../RMLTC0013a-PostgreSQL/mapping.ttl | 25 - .../rml-core/RMLTC0013a-PostgreSQL/note.md | 3 - .../rml-core/RMLTC0013a-PostgreSQL/output.nq | 3 - .../RMLTC0013a-PostgreSQL/resource.sql | 11 - .../rml-core/RMLTC0013a-SQLServer/mapping.ttl | 25 - .../rml-core/RMLTC0013a-SQLServer/output.nq | 3 - .../RMLTC0013a-SQLServer/resource.sql | 12 - .../rml-core/RMLTC0014d-MySQL/mapping.ttl | 31 - .../rml-core/RMLTC0014d-MySQL/output.nq | 1 - .../rml-core/RMLTC0014d-MySQL/resource.sql | 25 - .../RMLTC0014d-PostgreSQL/mapping.ttl | 31 - .../rml-core/RMLTC0014d-PostgreSQL/output.nq | 1 - .../RMLTC0014d-PostgreSQL/resource.sql | 24 - .../rml-core/RMLTC0014d-SQLServer/mapping.ttl | 31 - .../rml-core/RMLTC0014d-SQLServer/output.nq | 1 - .../RMLTC0014d-SQLServer/resource.sql | 24 - .../rml-core/RMLTC0015a-CSV/country_en.csv | 3 - .../rml-core/RMLTC0015a-CSV/country_es.csv | 3 - .../rml-core/RMLTC0015a-CSV/mapping.ttl | 40 - .../rml-core/RMLTC0015a-CSV/output.nq | 6 - .../rml-core/RMLTC0015a-JSON/country_en.json | 6 - .../rml-core/RMLTC0015a-JSON/country_es.json | 6 - .../rml-core/RMLTC0015a-JSON/mapping.ttl | 42 - .../rml-core/RMLTC0015a-JSON/output.nq | 6 - .../rml-core/RMLTC0015a-MySQL/mapping.ttl | 51 - .../rml-core/RMLTC0015a-MySQL/output.nq | 6 - .../rml-core/RMLTC0015a-MySQL/resource.sql | 13 - .../RMLTC0015a-PostgreSQL/mapping.ttl | 51 - .../rml-core/RMLTC0015a-PostgreSQL/output.nq | 6 - .../RMLTC0015a-PostgreSQL/resource.sql | 12 - .../rml-core/RMLTC0015a-SQLServer/mapping.ttl | 51 - .../rml-core/RMLTC0015a-SQLServer/output.nq | 6 - .../RMLTC0015a-SQLServer/resource.sql | 13 - .../rml-core/RMLTC0015a-XML/country_en.xml | 6 - .../rml-core/RMLTC0015a-XML/country_es.xml | 6 - .../rml-core/RMLTC0015a-XML/mapping.ttl | 42 - .../rml-core/RMLTC0015a-XML/output.nq | 6 - .../rml-core/RMLTC0015b-CSV/country_en.csv | 3 - .../rml-core/RMLTC0015b-CSV/country_es.csv | 3 - .../rml-core/RMLTC0015b-CSV/mapping.ttl | 40 - .../rml-core/RMLTC0015b-JSON/country_en.json | 6 - .../rml-core/RMLTC0015b-JSON/country_es.json | 6 - .../rml-core/RMLTC0015b-JSON/mapping.ttl | 42 - .../rml-core/RMLTC0015b-MySQL/mapping.ttl | 51 - .../rml-core/RMLTC0015b-MySQL/resource.sql | 13 - .../RMLTC0015b-PostgreSQL/mapping.ttl | 51 - .../RMLTC0015b-PostgreSQL/resource.sql | 12 - .../rml-core/RMLTC0015b-SQLServer/mapping.ttl | 51 - .../RMLTC0015b-SQLServer/resource.sql | 13 - .../rml-core/RMLTC0015b-XML/country_en.xml | 6 - .../rml-core/RMLTC0015b-XML/country_es.xml | 6 - .../rml-core/RMLTC0015b-XML/mapping.ttl | 42 - .../rml-core/RMLTC0016a-MySQL/mapping.ttl | 45 - .../rml-core/RMLTC0016a-MySQL/output.nq | 16 - .../rml-core/RMLTC0016a-MySQL/resource.sql | 28 - .../RMLTC0016a-PostgreSQL/mapping.ttl | 45 - .../rml-core/RMLTC0016a-PostgreSQL/output.nq | 16 - .../RMLTC0016a-PostgreSQL/resource.sql | 27 - .../rml-core/RMLTC0016a-SQLServer/mapping.ttl | 45 - .../rml-core/RMLTC0016a-SQLServer/output.nq | 16 - .../RMLTC0016a-SQLServer/resource.sql | 28 - .../rml-core/RMLTC0016b-MySQL/mapping.ttl | 35 - .../rml-core/RMLTC0016b-MySQL/output.nq | 9 - .../rml-core/RMLTC0016b-MySQL/resource.sql | 28 - .../RMLTC0016b-PostgreSQL/mapping.ttl | 35 - .../rml-core/RMLTC0016b-PostgreSQL/output.nq | 9 - .../RMLTC0016b-PostgreSQL/resource.sql | 27 - .../rml-core/RMLTC0016b-SQLServer/mapping.ttl | 35 - .../rml-core/RMLTC0016b-SQLServer/output.nq | 9 - .../RMLTC0016b-SQLServer/resource.sql | 28 - .../rml-core/RMLTC0016c-MySQL/mapping.ttl | 35 - .../rml-core/RMLTC0016c-MySQL/output.nq | 9 - .../rml-core/RMLTC0016c-MySQL/resource.sql | 28 - .../RMLTC0016c-PostgreSQL/mapping.ttl | 35 - .../rml-core/RMLTC0016c-PostgreSQL/output.nq | 9 - .../RMLTC0016c-PostgreSQL/resource.sql | 27 - .../rml-core/RMLTC0016c-SQLServer/mapping.ttl | 35 - .../rml-core/RMLTC0016c-SQLServer/output.nq | 9 - .../RMLTC0016c-SQLServer/resource.sql | 28 - .../rml-core/RMLTC0016d-MySQL/mapping.ttl | 30 - .../rml-core/RMLTC0016d-MySQL/output.nq | 6 - .../rml-core/RMLTC0016d-MySQL/resource.sql | 28 - .../RMLTC0016d-PostgreSQL/mapping.ttl | 30 - .../rml-core/RMLTC0016d-PostgreSQL/output.nq | 6 - .../RMLTC0016d-PostgreSQL/resource.sql | 27 - .../rml-core/RMLTC0016d-SQLServer/mapping.ttl | 30 - .../rml-core/RMLTC0016d-SQLServer/output.nq | 6 - .../RMLTC0016d-SQLServer/resource.sql | 28 - .../rml-core/RMLTC0016e-MySQL/mapping.ttl | 30 - .../rml-core/RMLTC0016e-MySQL/output.nq | 6 - .../rml-core/RMLTC0016e-MySQL/resource.sql | 28 - .../RMLTC0016e-PostgreSQL/mapping.ttl | 30 - .../rml-core/RMLTC0016e-PostgreSQL/output.nq | 6 - .../RMLTC0016e-PostgreSQL/resource.sql | 27 - .../rml-core/RMLTC0016e-SQLServer/mapping.ttl | 30 - .../rml-core/RMLTC0016e-SQLServer/output.nq | 6 - .../RMLTC0016e-SQLServer/resource.sql | 28 - .../rml-core/RMLTC0018a-MySQL/mapping.ttl | 32 - .../rml-core/RMLTC0018a-MySQL/note.md | 4 - .../rml-core/RMLTC0018a-MySQL/output.nq | 9 - .../rml-core/RMLTC0018a-MySQL/resource.sql | 13 - .../RMLTC0018a-PostgreSQL/mapping.ttl | 32 - .../rml-core/RMLTC0018a-PostgreSQL/output.nq | 9 - .../RMLTC0018a-PostgreSQL/resource.sql | 9 - .../rml-core/RMLTC0018a-SQLServer/mapping.ttl | 32 - .../rml-core/RMLTC0018a-SQLServer/output.nq | 9 - .../RMLTC0018a-SQLServer/resource.sql | 10 - .../rml-core/RMLTC0019a-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0019a-CSV/output.nq | 2 - .../rml-core/RMLTC0019a-CSV/persons.csv | 3 - .../rml-core/RMLTC0019a-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0019a-JSON/output.nq | 2 - .../rml-core/RMLTC0019a-JSON/persons.json | 14 - .../rml-core/RMLTC0019a-MySQL/mapping.ttl | 29 - .../rml-core/RMLTC0019a-MySQL/output.nq | 2 - .../rml-core/RMLTC0019a-MySQL/resource.sql | 11 - .../RMLTC0019a-PostgreSQL/mapping.ttl | 29 - .../rml-core/RMLTC0019a-PostgreSQL/output.nq | 2 - .../RMLTC0019a-PostgreSQL/resource.sql | 10 - .../rml-core/RMLTC0019a-SQLServer/mapping.ttl | 29 - .../rml-core/RMLTC0019a-SQLServer/output.nq | 2 - .../RMLTC0019a-SQLServer/resource.sql | 11 - .../rml-core/RMLTC0019a-XML/mapping.ttl | 21 - .../rml-core/RMLTC0019a-XML/output.nq | 2 - .../rml-core/RMLTC0019a-XML/persons.xml | 14 - .../rml-core/RMLTC0019b-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0019b-CSV/persons.csv | 4 - .../rml-core/RMLTC0019b-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0019b-JSON/persons.json | 19 - .../rml-core/RMLTC0019b-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0019b-MySQL/resource.sql | 11 - .../RMLTC0019b-PostgreSQL/mapping.ttl | 25 - .../RMLTC0019b-PostgreSQL/resource.sql | 10 - .../rml-core/RMLTC0019b-SQLServer/mapping.ttl | 25 - .../RMLTC0019b-SQLServer/resource.sql | 11 - .../rml-core/RMLTC0019b-XML/mapping.ttl | 21 - .../rml-core/RMLTC0019b-XML/persons.xml | 19 - .../rml-core/RMLTC0020a-CSV/mapping.ttl | 20 - .../rml-core/RMLTC0020a-CSV/output.nq | 5 - .../rml-core/RMLTC0020a-CSV/student.csv | 6 - .../rml-core/RMLTC0020a-JSON/mapping.ttl | 21 - .../rml-core/RMLTC0020a-JSON/output.nq | 5 - .../rml-core/RMLTC0020a-JSON/student.json | 9 - .../rml-core/RMLTC0020a-MySQL/mapping.ttl | 25 - .../rml-core/RMLTC0020a-MySQL/output.nq | 5 - .../rml-core/RMLTC0020a-MySQL/resource.sql | 12 - .../RMLTC0020a-PostgreSQL/mapping.ttl | 25 - .../rml-core/RMLTC0020a-PostgreSQL/output.nq | 5 - .../RMLTC0020a-PostgreSQL/resource.sql | 11 - .../rml-core/RMLTC0020a-SQLServer/mapping.ttl | 25 - .../rml-core/RMLTC0020a-SQLServer/output.nq | 5 - .../RMLTC0020a-SQLServer/resource.sql | 12 - .../rml-core/RMLTC0020a-XML/mapping.ttl | 21 - .../rml-core/RMLTC0020a-XML/output.nq | 5 - .../rml-core/RMLTC0020a-XML/student.xml | 9 - .../rml-core/RMLTC0021a-CSV/mapping.ttl | 25 - .../rml-core/RMLTC0021a-CSV/output.nq | 7 - .../rml-core/RMLTC0021a-CSV/student.csv | 4 - .../rml-core/RMLTC0021a-JSON/mapping.ttl | 28 - .../rml-core/RMLTC0021a-JSON/output.nq | 7 - .../rml-core/RMLTC0021a-JSON/student.json | 15 - .../rml-core/RMLTC0021a-MySQL/mapping.ttl | 30 - .../rml-core/RMLTC0021a-MySQL/output.nq | 7 - .../rml-core/RMLTC0021a-MySQL/resource.sql | 11 - .../RMLTC0021a-PostgreSQL/mapping.ttl | 30 - .../rml-core/RMLTC0021a-PostgreSQL/output.nq | 7 - .../RMLTC0021a-PostgreSQL/resource.sql | 10 - .../rml-core/RMLTC0021a-SPARQL/mapping.ttl | 40 - .../rml-core/RMLTC0021a-SPARQL/output.nq | 7 - .../rml-core/RMLTC0021a-SPARQL/resource.ttl | 19 - .../rml-core/RMLTC0021a-SQLServer/mapping.ttl | 30 - .../rml-core/RMLTC0021a-SQLServer/output.nq | 7 - .../RMLTC0021a-SQLServer/resource.sql | 10 - .../rml-core/RMLTC0021a-XML/mapping.ttl | 26 - .../rml-core/RMLTC0021a-XML/output.nq | 7 - .../rml-core/RMLTC0021a-XML/student.xml | 19 - .../rml-core/RMLTC0022a-CSV/mapping.ttl | 29 - .../rml-core/RMLTC0022a-CSV/output.nq | 2 - .../rml-core/RMLTC0022a-CSV/student.csv | 2 - .../rml-core/RMLTC0022b-CSV/data.csv | 3 - .../rml-core/RMLTC0022b-CSV/mapping.ttl | 23 - .../rml-core/RMLTC0022b-CSV/output.nq | 2 - .../rml-core/RMLTC0022c-CSV/data.csv | 3 - .../rml-core/RMLTC0022c-CSV/mapping.ttl | 23 - .../rml-core/RMLTC0022c-CSV/output.nq | 2 - .../rml-core/RMLTC0023a-XML/ious.xml | 10 - .../rml-core/RMLTC0023a-XML/mapping.ttl | 23 - .../rml-core/RMLTC0023a-XML/output.nq | 5 - .../rml-core/RMLTC0026a-JSON/README.md | 53 - .../rml-core/RMLTC0026a-JSON/mapping.ttl | 22 - .../rml-core/RMLTC0026a-JSON/output.nq | 3 - .../rml-core/RMLTC0026a-JSON/persons.json | 5 - src/test/resources/rml-core/manifest.ttl | 3371 ----------------- src/test/resources/rml-io/NETCONF/README.md | 14 - .../rml-io/NETCONF/subtree/default.nq | 160 - .../rml-io/NETCONF/subtree/mapping.ttl | 94 - .../rml-io/NETCONF/subtree/yanglibrary.xml | 301 -- .../resources/rml-io/NETCONF/xpath/default.nq | 160 - .../rml-io/NETCONF/xpath/mapping.ttl | 95 - .../rml-io/NETCONF/xpath/yanglibrary.xml | 301 -- .../resources/rml-io/RMLSTC0001a/Friends.json | 27 - .../resources/rml-io/RMLSTC0001a/default.nq | 10 - .../resources/rml-io/RMLSTC0001a/mapping.ttl | 36 - .../rml-io/RMLSTC0001b/Friends-UTF16.json | Bin 664 -> 0 bytes .../resources/rml-io/RMLSTC0001b/default.nq | 10 - .../resources/rml-io/RMLSTC0001b/mapping.ttl | 36 - .../resources/rml-io/RMLSTC0002a/Friends.json | 27 - .../resources/rml-io/RMLSTC0002a/default.nq | 10 - .../resources/rml-io/RMLSTC0002a/mapping.ttl | 35 - .../rml-io/RMLSTC0002b/Friends.json.gz | Bin 166 -> 0 bytes .../resources/rml-io/RMLSTC0002b/default.nq | 10 - .../resources/rml-io/RMLSTC0002b/mapping.ttl | 36 - .../resources/rml-io/RMLSTC0002c/default.nq | 10 - .../resources/rml-io/RMLSTC0002c/mapping.ttl | 36 - .../rml-io/RMLSTC0002d/Friends.json.tar.xz | Bin 10240 -> 0 bytes .../resources/rml-io/RMLSTC0002d/default.nq | 10 - .../resources/rml-io/RMLSTC0002d/mapping.ttl | 36 - .../resources/rml-io/RMLSTC0002e/default.nq | 10 - .../resources/rml-io/RMLSTC0002e/mapping.ttl | 36 - .../resources/rml-io/RMLSTC0003/Friends.nt | 10 - .../resources/rml-io/RMLSTC0003/default.nq | 10 - .../resources/rml-io/RMLSTC0003/mapping.ttl | 41 - .../rml-io/RMLSTC0004a/Friends-NULL.csv | 7 - .../resources/rml-io/RMLSTC0004a/default.nq | 12 - .../resources/rml-io/RMLSTC0004a/mapping.ttl | 40 - .../rml-io/RMLSTC0004b/Friends-NULL.csv | 7 - .../resources/rml-io/RMLSTC0004b/default.nq | 10 - .../resources/rml-io/RMLSTC0004b/mapping.ttl | 42 - .../rml-io/RMLSTC0004c/Friends-NULL2.csv | 8 - .../resources/rml-io/RMLSTC0004c/default.nq | 10 - .../resources/rml-io/RMLSTC0004c/mapping.ttl | 43 - .../rml-io/RMLSTC0005a/Friends-NULL.csv | 7 - .../resources/rml-io/RMLSTC0005a/default.nq | 10 - .../resources/rml-io/RMLSTC0005a/mapping.ttl | 43 - .../resources/rml-io/RMLSTC0005b/Friends.csv | Bin 212 -> 0 bytes .../resources/rml-io/RMLSTC0005b/default.nq | 10 - .../resources/rml-io/RMLSTC0005b/mapping.ttl | 42 - .../resources/rml-io/RMLSTC0006a/Friends.json | 27 - .../resources/rml-io/RMLSTC0006a/default.nq | 10 - .../resources/rml-io/RMLSTC0006a/mapping.ttl | 35 - .../resources/rml-io/RMLSTC0006b/Friends.nt | 10 - .../resources/rml-io/RMLSTC0006b/default.nq | 10 - .../resources/rml-io/RMLSTC0006b/mapping.ttl | 44 - .../resources/rml-io/RMLSTC0006c/Friends.nt | 10 - .../resources/rml-io/RMLSTC0006c/default.nq | 10 - .../resources/rml-io/RMLSTC0006c/mapping.ttl | 45 - .../resources/rml-io/RMLSTC0006d/Friends.csv | 6 - .../resources/rml-io/RMLSTC0006d/default.nq | 10 - .../resources/rml-io/RMLSTC0006d/mapping.ttl | 40 - .../resources/rml-io/RMLSTC0006e/Friends.json | 27 - .../resources/rml-io/RMLSTC0006e/default.nq | 10 - .../resources/rml-io/RMLSTC0006e/mapping.ttl | 43 - .../resources/rml-io/RMLSTC0006f/Friends.csv | 6 - .../resources/rml-io/RMLSTC0006f/default.nq | 10 - .../resources/rml-io/RMLSTC0006f/mapping.ttl | 38 - .../resources/rml-io/RMLSTC0007a/Friends.json | 27 - .../resources/rml-io/RMLSTC0007a/default.nq | 10 - .../resources/rml-io/RMLSTC0007a/mapping.ttl | 36 - .../resources/rml-io/RMLSTC0007b/Friends.csv | 6 - .../resources/rml-io/RMLSTC0007b/default.nq | 10 - .../resources/rml-io/RMLSTC0007b/mapping.ttl | 39 - .../resources/rml-io/RMLSTC0007c/Friends.xml | 22 - .../resources/rml-io/RMLSTC0007c/default.nq | 10 - .../resources/rml-io/RMLSTC0007c/mapping.ttl | 35 - .../resources/rml-io/RMLSTC0007d/Friends.xml | 22 - .../resources/rml-io/RMLSTC0007d/default.nq | 10 - .../resources/rml-io/RMLSTC0007d/mapping.ttl | 40 - .../resources/rml-io/RMLTTC0000/default.nq | 10 - .../resources/rml-io/RMLTTC0000/mapping.ttl | 35 - .../resources/rml-io/RMLTTC0001a/default.nq | 0 .../resources/rml-io/RMLTTC0001a/dump1.nq | 10 - .../resources/rml-io/RMLTTC0001a/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0001b/default.nq | 5 - .../resources/rml-io/RMLTTC0001b/dump1.nq | 5 - .../resources/rml-io/RMLTTC0001b/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0001c/default.nq | 5 - .../resources/rml-io/RMLTTC0001c/dump1.nq | 5 - .../resources/rml-io/RMLTTC0001c/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0001d/default.nq | 0 .../resources/rml-io/RMLTTC0001d/dump1.nq | 10 - .../resources/rml-io/RMLTTC0001d/mapping.ttl | 49 - .../resources/rml-io/RMLTTC0001e/default.nq | 5 - .../resources/rml-io/RMLTTC0001e/dump1.nq | 5 - .../resources/rml-io/RMLTTC0001e/mapping.ttl | 48 - .../resources/rml-io/RMLTTC0001f/default.nq | 5 - .../resources/rml-io/RMLTTC0001f/dump1.nq | 5 - .../resources/rml-io/RMLTTC0001f/mapping.ttl | 49 - .../resources/rml-io/RMLTTC0002a/default.nq | 0 .../resources/rml-io/RMLTTC0002a/dump1.nq | 10 - .../resources/rml-io/RMLTTC0002a/dump2.nq | 10 - .../resources/rml-io/RMLTTC0002a/mapping.ttl | 53 - .../resources/rml-io/RMLTTC0002b/default.nq | 0 .../resources/rml-io/RMLTTC0002b/dump1.nq | 10 - .../resources/rml-io/RMLTTC0002b/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002b/mapping.ttl | 53 - .../resources/rml-io/RMLTTC0002c/default.nq | 0 .../resources/rml-io/RMLTTC0002c/dump1.nq | 10 - .../resources/rml-io/RMLTTC0002c/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002c/mapping.ttl | 53 - .../resources/rml-io/RMLTTC0002d/default.nq | 0 .../resources/rml-io/RMLTTC0002d/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002d/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002d/mapping.ttl | 53 - .../resources/rml-io/RMLTTC0002e/default.nq | 0 .../resources/rml-io/RMLTTC0002e/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002e/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002e/dump3.nq | 10 - .../resources/rml-io/RMLTTC0002e/mapping.ttl | 61 - .../resources/rml-io/RMLTTC0002f/default.nq | 0 .../resources/rml-io/RMLTTC0002f/dump1.nq | 10 - .../resources/rml-io/RMLTTC0002f/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002f/mapping.ttl | 57 - .../resources/rml-io/RMLTTC0002g/default.nq | 0 .../resources/rml-io/RMLTTC0002g/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002g/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002g/mapping.ttl | 57 - .../resources/rml-io/RMLTTC0002h/default.nq | 0 .../resources/rml-io/RMLTTC0002h/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002h/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002h/mapping.ttl | 57 - .../resources/rml-io/RMLTTC0002i/default.nq | 0 .../resources/rml-io/RMLTTC0002i/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002i/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002i/mapping.ttl | 60 - .../resources/rml-io/RMLTTC0002j/default.nq | 0 .../resources/rml-io/RMLTTC0002j/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002j/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002j/mapping.ttl | 57 - .../resources/rml-io/RMLTTC0002k/default.nq | 0 .../resources/rml-io/RMLTTC0002k/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002k/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002k/mapping.ttl | 61 - .../resources/rml-io/RMLTTC0002l/default.nq | 0 .../resources/rml-io/RMLTTC0002l/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002l/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002l/mapping.ttl | 58 - .../resources/rml-io/RMLTTC0002m/default.nq | 5 - .../resources/rml-io/RMLTTC0002m/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002m/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002m/mapping.ttl | 53 - .../resources/rml-io/RMLTTC0002n/default.nq | 5 - .../resources/rml-io/RMLTTC0002n/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002n/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002n/mapping.ttl | 53 - .../resources/rml-io/RMLTTC0002o/default.nq | 0 .../resources/rml-io/RMLTTC0002o/dump1.nq | 10 - .../resources/rml-io/RMLTTC0002o/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002o/mapping.ttl | 53 - .../resources/rml-io/RMLTTC0002p/default.nq | 5 - .../resources/rml-io/RMLTTC0002p/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002p/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002p/mapping.ttl | 67 - .../resources/rml-io/RMLTTC0002q/default.nq | 5 - .../resources/rml-io/RMLTTC0002q/dump1.nq | 5 - .../resources/rml-io/RMLTTC0002q/dump2.nq | 5 - .../resources/rml-io/RMLTTC0002q/mapping.ttl | 68 - .../resources/rml-io/RMLTTC0002r/default.nq | 5 - .../resources/rml-io/RMLTTC0002r/dump1.nq | 10 - .../resources/rml-io/RMLTTC0002r/mapping.ttl | 46 - .../resources/rml-io/RMLTTC0003a/default.nq | 0 .../resources/rml-io/RMLTTC0003a/dump1.nq | 5 - .../resources/rml-io/RMLTTC0003a/dump2.nq | 5 - .../resources/rml-io/RMLTTC0003a/mapping.ttl | 64 - .../resources/rml-io/RMLTTC0004a/default.nq | 0 .../resources/rml-io/RMLTTC0004a/dump1.jsonld | 33 - .../resources/rml-io/RMLTTC0004a/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0004b/default.nq | 0 .../resources/rml-io/RMLTTC0004b/dump1.n3 | 12 - .../resources/rml-io/RMLTTC0004b/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0004c/default.nq | 0 .../resources/rml-io/RMLTTC0004c/dump1.nt | 10 - .../resources/rml-io/RMLTTC0004c/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0004d/default.nq | 0 .../resources/rml-io/RMLTTC0004d/dump1.nq | 10 - .../resources/rml-io/RMLTTC0004d/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0004e/default.nq | 0 .../rml-io/RMLTTC0004e/dump1.rdfjson | 22 - .../resources/rml-io/RMLTTC0004e/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0004f/default.nq | 0 .../resources/rml-io/RMLTTC0004f/dump1.rdfxml | 23 - .../resources/rml-io/RMLTTC0004f/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0004g/default.nq | 0 .../resources/rml-io/RMLTTC0004g/dump1.ttl | 13 - .../resources/rml-io/RMLTTC0004g/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0005a/default.nq | 0 .../resources/rml-io/RMLTTC0005a/dump1.nq | 10 - .../resources/rml-io/RMLTTC0005a/mapping.ttl | 46 - .../resources/rml-io/RMLTTC0005b/default.nq | 0 .../resources/rml-io/RMLTTC0005b/dump1.nq | Bin 1358 -> 0 bytes .../resources/rml-io/RMLTTC0005b/mapping.ttl | 46 - .../resources/rml-io/RMLTTC0006a/default.nq | 0 .../resources/rml-io/RMLTTC0006a/dump1.nq | 10 - .../resources/rml-io/RMLTTC0006a/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0006b/default.nq | 0 .../resources/rml-io/RMLTTC0006b/dump1.nq.gz | Bin 193 -> 0 bytes .../resources/rml-io/RMLTTC0006b/mapping.ttl | 46 - .../resources/rml-io/RMLTTC0006c/default.nq | 0 .../resources/rml-io/RMLTTC0006c/mapping.ttl | 46 - .../resources/rml-io/RMLTTC0006d/default.nq | 0 .../rml-io/RMLTTC0006d/dump1.nq.tar.xz | Bin 277 -> 0 bytes .../resources/rml-io/RMLTTC0006d/mapping.ttl | 47 - .../resources/rml-io/RMLTTC0006e/default.nq | 0 .../resources/rml-io/RMLTTC0006e/mapping.ttl | 46 - .../resources/rml-io/RMLTTC0007a/default.nq | 0 .../resources/rml-io/RMLTTC0007a/dump1.nq | 10 - .../resources/rml-io/RMLTTC0007a/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0007b/default.nq | 0 .../resources/rml-io/RMLTTC0007b/dump1.nq | 10 - .../resources/rml-io/RMLTTC0007b/mapping.ttl | 45 - .../resources/rml-io/RMLTTC0007c/default.nq | 0 .../resources/rml-io/RMLTTC0007c/dump1.nq | 10 - .../resources/rml-io/RMLTTC0007c/mapping.ttl | 46 - .../resources/rml-io/RMLTTC0007d/default.nq | 0 .../resources/rml-io/RMLTTC0007d/dump1.nq | 10 - .../resources/rml-io/RMLTTC0007d/mapping.ttl | 52 - 1276 files changed, 26825 deletions(-) delete mode 100644 src/test/java/burp/Test.java delete mode 100644 src/test/java/burp/TestRMLCC.java delete mode 100644 src/test/java/burp/TestRMLCore.java rename src/test/java/burp/{TestRMLCoreGM.java => TestRMLCoreGM.java.old} (100%) rename src/test/java/burp/{TestRMLCoreMySQL.java => TestRMLCoreMySQL.java.old} (100%) rename src/test/java/burp/{TestRMLCorePostgreSQL.java => TestRMLCorePostgreSQL.java.old} (100%) rename src/test/java/burp/{TestRMLFNML.java => TestRMLFNML.java.old} (100%) rename src/test/java/burp/{TestRMLFNMLGrellFunctions.java => TestRMLFNMLGrellFunctions.java.old} (100%) delete mode 100644 src/test/java/burp/TestRMLIOSource.java delete mode 100644 src/test/java/burp/TestRMLIOTarget.java delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Alt/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Alt/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Bag/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Bag/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-List/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-List/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Seq/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Seq/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-Bag/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-Bag/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-List/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-List/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EB/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EB/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEB/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEB/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEL/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEL/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NELb/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NELb/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM1/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM1/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM2/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM2/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM3/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM3/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM4/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM4/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM5/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM5/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App1/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App1/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App2/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App2/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car1/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car1/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car2/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car2/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT0/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT0/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT1/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT1/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT2/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT2/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0007-NES/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0007-NES/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/student.csv delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/student.csv delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-List/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-List/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-List/mapping.ttl delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Listb/data.json delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Listb/default.nq delete mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0000-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0000-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0000-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0000-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0000-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0000-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0000-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0000-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0000-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0000-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0000-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0000-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0000-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0001a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0001a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001a-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0001a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0001a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0001a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001a-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0001a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001a-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0001b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001b-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0001b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001b-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001b-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0001b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0001b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0001b-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001b-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001b-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0001b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0001b-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0001b-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0002a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0002a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002a-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0002a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002a-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002a-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0002b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002b-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0002b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002b-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002b-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0002b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002b-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002b-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002b-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002b-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002b-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0002c-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002c-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0002c-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002c-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002c-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002c-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002c-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002c-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002d-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002d-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002d-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002d-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002d-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002d-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002d-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002d-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0002d-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002e-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002e-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0002e-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002e-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0002e-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002e-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002e-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002e-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002e-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002e-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002e-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002e-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0002f-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002f-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002f-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002f-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002f-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002f-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002g-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002g-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0002g-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002g-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002g-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002g-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002g-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002g-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002g-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002g-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002h-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002h-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002h-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002h-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002h-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002h-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002h-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002h-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002i-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002i-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002i-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002i-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002i-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002i-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002j-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002j-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002j-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002j-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0002j-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0002j-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003c-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003c-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003c-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0003c-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003c-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003c-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0003c-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003c-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003c-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003c-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003c-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003c-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003c-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003c-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003c-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003c-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003c-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003c-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0003c-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0003c-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0003c-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0004a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0004a-CSV/student_sport.csv delete mode 100644 src/test/resources/rml-core/RMLTC0004a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0004a-JSON/student_sport.json delete mode 100644 src/test/resources/rml-core/RMLTC0004a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0004a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0004a-MySQL/student_sport.csv delete mode 100644 src/test/resources/rml-core/RMLTC0004a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0004a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0004a-PostgreSQL/student_sport.csv delete mode 100644 src/test/resources/rml-core/RMLTC0004a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0004a-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0004a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0004a-SQLServer/student_sport.csv delete mode 100644 src/test/resources/rml-core/RMLTC0004a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0004a-XML/student_sport.xml delete mode 100644 src/test/resources/rml-core/RMLTC0004b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004b-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0004b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004b-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0004b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0004b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0004b-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004b-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0004b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0004b-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0005a-CSV/ious.csv delete mode 100644 src/test/resources/rml-core/RMLTC0005a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005a-JSON/ious.json delete mode 100644 src/test/resources/rml-core/RMLTC0005a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0005a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0005a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0005a-XML/ious.xml delete mode 100644 src/test/resources/rml-core/RMLTC0005a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0005b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0005b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0005b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0005b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0006a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0006a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0006a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0006a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0006a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0006a-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0006a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0006a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0006a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0006a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0006a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0006a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0006a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0006a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0006a-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0006a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0006a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0006a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0006a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0006a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0006a-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0007a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0007a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007a-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0007a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007a-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007a-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0007b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007b-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0007b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007b-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007b-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0007b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007b-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007b-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007b-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007b-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007b-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0007c-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007c-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007c-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0007c-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007c-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007c-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0007c-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007c-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007c-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007c-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007c-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007c-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007c-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007c-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007c-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007c-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007c-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007c-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007c-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007c-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007c-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0007d-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007d-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007d-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0007d-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007d-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007d-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0007d-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007d-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007d-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007d-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007d-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007d-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007d-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007d-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007d-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007d-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007d-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007d-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007d-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007d-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007d-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0007e-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007e-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007e-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0007e-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007e-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007e-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0007e-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007e-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007e-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007e-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007e-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007e-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007e-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007e-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007e-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007e-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007e-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007e-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007e-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007e-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007e-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0007f-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007f-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007f-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0007f-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007f-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007f-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0007f-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007f-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007f-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007f-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007f-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007f-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007f-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007f-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007f-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007f-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007f-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007f-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007f-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007f-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007f-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0007g-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007g-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007g-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0007g-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007g-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007g-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0007g-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007g-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007g-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007g-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007g-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007g-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007g-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007g-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007g-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007g-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007g-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007g-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007g-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007g-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0007g-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0007h-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007h-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0007h-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007h-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0007h-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007h-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007h-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007h-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007h-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007h-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007h-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007h-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0007h-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0007h-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0008a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0008a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008a-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0008a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008a-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008a-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0008b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008b-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0008b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008b-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008b-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0008b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008b-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008b-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008b-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008b-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008b-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0008c-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008c-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008c-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0008c-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008c-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008c-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0008c-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008c-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008c-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008c-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008c-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008c-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008c-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008c-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008c-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008c-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008c-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008c-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0008c-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0008c-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0008c-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0009a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009a-CSV/sport.csv delete mode 100644 src/test/resources/rml-core/RMLTC0009a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/sport.json delete mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0009a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-PostgreSQL/note.md delete mode 100644 src/test/resources/rml-core/RMLTC0009a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009a-SPARQL/resource1.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-SPARQL/resource2.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009a-XML/sport.xml delete mode 100644 src/test/resources/rml-core/RMLTC0009a-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0009b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009b-CSV/sport.csv delete mode 100644 src/test/resources/rml-core/RMLTC0009b-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/sport.json delete mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0009b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-PostgreSQL/note.md delete mode 100644 src/test/resources/rml-core/RMLTC0009b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009b-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009b-SPARQL/resource1.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-SPARQL/resource2.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009b-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009b-XML/sport.xml delete mode 100644 src/test/resources/rml-core/RMLTC0009b-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0009c-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009c-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009c-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009c-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009c-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009c-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009c-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009c-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009c-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009d-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009d-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009d-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009d-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009d-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009d-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0009d-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0009d-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0009d-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010a-CSV/country_info.csv delete mode 100644 src/test/resources/rml-core/RMLTC0010a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010a-JSON/country_info.json delete mode 100644 src/test/resources/rml-core/RMLTC0010a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010b-CSV/country_info.csv delete mode 100644 src/test/resources/rml-core/RMLTC0010b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010b-JSON/country_info.json delete mode 100644 src/test/resources/rml-core/RMLTC0010b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010b-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010b-XML/country_info.xml delete mode 100644 src/test/resources/rml-core/RMLTC0010b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010b-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010c-CSV/country_info.csv delete mode 100644 src/test/resources/rml-core/RMLTC0010c-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010c-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010c-JSON/country_info.json delete mode 100644 src/test/resources/rml-core/RMLTC0010c-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010c-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010c-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010c-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010c-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010c-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010c-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010c-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010c-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010c-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0010c-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0010c-XML/country_info.xml delete mode 100644 src/test/resources/rml-core/RMLTC0010c-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0010c-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0011a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0011a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0011b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011b-CSV/sport.csv delete mode 100644 src/test/resources/rml-core/RMLTC0011b-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0011b-CSV/student_sport.csv delete mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/sport.json delete mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/student_sport.json delete mode 100644 src/test/resources/rml-core/RMLTC0011b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0011b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0011b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0011b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0011b-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0011b-XML/sport.xml delete mode 100644 src/test/resources/rml-core/RMLTC0011b-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0011b-XML/student_sport.xml delete mode 100644 src/test/resources/rml-core/RMLTC0012a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012a-CSV/persons.csv delete mode 100644 src/test/resources/rml-core/RMLTC0012a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012a-JSON/persons.json delete mode 100644 src/test/resources/rml-core/RMLTC0012a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012a-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012a-XML/persons.xml delete mode 100644 src/test/resources/rml-core/RMLTC0012b-CSV/lives.csv delete mode 100644 src/test/resources/rml-core/RMLTC0012b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012b-CSV/persons.csv delete mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/lives.json delete mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/persons.json delete mode 100644 src/test/resources/rml-core/RMLTC0012b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012b-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012b-SPARQL/resource1.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-SPARQL/resource2.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012b-XML/lives.xml delete mode 100644 src/test/resources/rml-core/RMLTC0012b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012b-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012b-XML/persons.xml delete mode 100644 src/test/resources/rml-core/RMLTC0012c-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012c-CSV/persons.csv delete mode 100644 src/test/resources/rml-core/RMLTC0012c-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012c-JSON/persons.json delete mode 100644 src/test/resources/rml-core/RMLTC0012c-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012c-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012c-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012c-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012c-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012c-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012c-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012c-XML/persons.xml delete mode 100644 src/test/resources/rml-core/RMLTC0012d-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012d-CSV/persons.csv delete mode 100644 src/test/resources/rml-core/RMLTC0012d-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012d-JSON/persons.json delete mode 100644 src/test/resources/rml-core/RMLTC0012d-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012d-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012d-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012d-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012d-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012d-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012d-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012d-XML/persons.xml delete mode 100644 src/test/resources/rml-core/RMLTC0012e-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012e-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012e-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012e-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012e-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012e-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0012e-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0012e-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0012e-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0013a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0013a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0013a-JSON/persons.json delete mode 100644 src/test/resources/rml-core/RMLTC0013a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0013a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0013a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0013a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0013a-PostgreSQL/note.md delete mode 100644 src/test/resources/rml-core/RMLTC0013a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0013a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0013a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0013a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0013a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0014d-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0014d-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0014d-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0014d-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0014d-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0014d-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0014d-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0014d-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0014d-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0015a-CSV/country_en.csv delete mode 100644 src/test/resources/rml-core/RMLTC0015a-CSV/country_es.csv delete mode 100644 src/test/resources/rml-core/RMLTC0015a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/country_en.json delete mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/country_es.json delete mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0015a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0015a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0015a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0015a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0015a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0015a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0015a-XML/country_en.xml delete mode 100644 src/test/resources/rml-core/RMLTC0015a-XML/country_es.xml delete mode 100644 src/test/resources/rml-core/RMLTC0015a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0015b-CSV/country_en.csv delete mode 100644 src/test/resources/rml-core/RMLTC0015b-CSV/country_es.csv delete mode 100644 src/test/resources/rml-core/RMLTC0015b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015b-JSON/country_en.json delete mode 100644 src/test/resources/rml-core/RMLTC0015b-JSON/country_es.json delete mode 100644 src/test/resources/rml-core/RMLTC0015b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0015b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0015b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0015b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0015b-XML/country_en.xml delete mode 100644 src/test/resources/rml-core/RMLTC0015b-XML/country_es.xml delete mode 100644 src/test/resources/rml-core/RMLTC0015b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016b-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016b-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016b-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016c-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016c-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016c-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016c-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016c-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016c-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016c-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016c-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016c-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016d-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016d-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016d-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016d-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016d-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016d-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016d-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016d-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016d-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016e-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016e-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016e-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016e-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016e-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016e-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0016e-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0016e-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0016e-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0018a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0018a-MySQL/note.md delete mode 100644 src/test/resources/rml-core/RMLTC0018a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0018a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0018a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0018a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0018a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0018a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0018a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0018a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0019a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0019a-CSV/persons.csv delete mode 100644 src/test/resources/rml-core/RMLTC0019a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0019a-JSON/persons.json delete mode 100644 src/test/resources/rml-core/RMLTC0019a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0019a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0019a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0019a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0019a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0019a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0019a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0019a-XML/persons.xml delete mode 100644 src/test/resources/rml-core/RMLTC0019b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019b-CSV/persons.csv delete mode 100644 src/test/resources/rml-core/RMLTC0019b-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019b-JSON/persons.json delete mode 100644 src/test/resources/rml-core/RMLTC0019b-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019b-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0019b-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019b-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0019b-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019b-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0019b-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0019b-XML/persons.xml delete mode 100644 src/test/resources/rml-core/RMLTC0020a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0020a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0020a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0020a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0020a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0020a-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0020a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0020a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0020a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0020a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0020a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0020a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0020a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0020a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0020a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0020a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0020a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0020a-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0021a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0021a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0021a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0021a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0021a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0021a-JSON/student.json delete mode 100644 src/test/resources/rml-core/RMLTC0021a-MySQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0021a-MySQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0021a-MySQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0021a-PostgreSQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0021a-PostgreSQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0021a-PostgreSQL/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0021a-SPARQL/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0021a-SPARQL/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0021a-SPARQL/resource.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0021a-SQLServer/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0021a-SQLServer/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0021a-SQLServer/resource.sql delete mode 100644 src/test/resources/rml-core/RMLTC0021a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0021a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0021a-XML/student.xml delete mode 100644 src/test/resources/rml-core/RMLTC0022a-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0022a-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0022a-CSV/student.csv delete mode 100644 src/test/resources/rml-core/RMLTC0022b-CSV/data.csv delete mode 100644 src/test/resources/rml-core/RMLTC0022b-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0022b-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0022c-CSV/data.csv delete mode 100644 src/test/resources/rml-core/RMLTC0022c-CSV/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0022c-CSV/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0023a-XML/ious.xml delete mode 100644 src/test/resources/rml-core/RMLTC0023a-XML/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0023a-XML/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0026a-JSON/README.md delete mode 100644 src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl delete mode 100644 src/test/resources/rml-core/RMLTC0026a-JSON/output.nq delete mode 100644 src/test/resources/rml-core/RMLTC0026a-JSON/persons.json delete mode 100644 src/test/resources/rml-core/manifest.ttl delete mode 100644 src/test/resources/rml-io/NETCONF/README.md delete mode 100644 src/test/resources/rml-io/NETCONF/subtree/default.nq delete mode 100644 src/test/resources/rml-io/NETCONF/subtree/mapping.ttl delete mode 100644 src/test/resources/rml-io/NETCONF/subtree/yanglibrary.xml delete mode 100644 src/test/resources/rml-io/NETCONF/xpath/default.nq delete mode 100644 src/test/resources/rml-io/NETCONF/xpath/mapping.ttl delete mode 100644 src/test/resources/rml-io/NETCONF/xpath/yanglibrary.xml delete mode 100644 src/test/resources/rml-io/RMLSTC0001a/Friends.json delete mode 100644 src/test/resources/rml-io/RMLSTC0001a/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0001a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0001b/Friends-UTF16.json delete mode 100644 src/test/resources/rml-io/RMLSTC0001b/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0001b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0002a/Friends.json delete mode 100644 src/test/resources/rml-io/RMLSTC0002a/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0002a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0002b/Friends.json.gz delete mode 100644 src/test/resources/rml-io/RMLSTC0002b/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0002b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0002c/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0002c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0002d/Friends.json.tar.xz delete mode 100644 src/test/resources/rml-io/RMLSTC0002d/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0002d/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0002e/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0002e/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0003/Friends.nt delete mode 100644 src/test/resources/rml-io/RMLSTC0003/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0003/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0004a/Friends-NULL.csv delete mode 100644 src/test/resources/rml-io/RMLSTC0004a/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0004a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0004b/Friends-NULL.csv delete mode 100644 src/test/resources/rml-io/RMLSTC0004b/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0004b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0004c/Friends-NULL2.csv delete mode 100644 src/test/resources/rml-io/RMLSTC0004c/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0004c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0005a/Friends-NULL.csv delete mode 100644 src/test/resources/rml-io/RMLSTC0005a/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0005a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0005b/Friends.csv delete mode 100644 src/test/resources/rml-io/RMLSTC0005b/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0005b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0006a/Friends.json delete mode 100644 src/test/resources/rml-io/RMLSTC0006a/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0006a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0006b/Friends.nt delete mode 100644 src/test/resources/rml-io/RMLSTC0006b/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0006b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0006c/Friends.nt delete mode 100644 src/test/resources/rml-io/RMLSTC0006c/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0006c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0006d/Friends.csv delete mode 100644 src/test/resources/rml-io/RMLSTC0006d/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0006d/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0006e/Friends.json delete mode 100644 src/test/resources/rml-io/RMLSTC0006e/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0006e/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0006f/Friends.csv delete mode 100644 src/test/resources/rml-io/RMLSTC0006f/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0006f/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0007a/Friends.json delete mode 100644 src/test/resources/rml-io/RMLSTC0007a/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0007a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0007b/Friends.csv delete mode 100644 src/test/resources/rml-io/RMLSTC0007b/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0007b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0007c/Friends.xml delete mode 100644 src/test/resources/rml-io/RMLSTC0007c/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0007c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLSTC0007d/Friends.xml delete mode 100644 src/test/resources/rml-io/RMLSTC0007d/default.nq delete mode 100644 src/test/resources/rml-io/RMLSTC0007d/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0000/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0000/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0001a/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001a/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0001b/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001b/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0001c/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001c/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0001d/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001d/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001d/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0001e/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001e/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001e/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0001f/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001f/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0001f/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002a/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002a/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002a/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002b/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002b/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002b/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002c/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002c/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002c/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002d/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002d/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002d/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002d/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002e/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002e/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002e/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002e/dump3.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002e/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002f/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002f/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002f/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002f/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002g/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002g/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002g/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002g/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002h/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002h/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002h/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002h/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002i/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002i/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002i/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002i/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002j/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002j/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002j/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002j/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002k/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002k/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002k/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002k/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002l/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002l/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002l/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002l/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002m/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002m/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002m/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002m/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002n/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002n/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002n/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002n/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002o/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002o/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002o/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002o/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002p/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002p/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002p/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002p/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002q/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002q/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002q/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002q/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0002r/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002r/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0002r/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0003a/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0003a/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0003a/dump2.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0003a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0004a/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0004a/dump1.jsonld delete mode 100644 src/test/resources/rml-io/RMLTTC0004a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0004b/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0004b/dump1.n3 delete mode 100644 src/test/resources/rml-io/RMLTTC0004b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0004c/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0004c/dump1.nt delete mode 100644 src/test/resources/rml-io/RMLTTC0004c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0004d/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0004d/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0004d/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0004e/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0004e/dump1.rdfjson delete mode 100644 src/test/resources/rml-io/RMLTTC0004e/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0004f/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0004f/dump1.rdfxml delete mode 100644 src/test/resources/rml-io/RMLTTC0004f/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0004g/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0004g/dump1.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0004g/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0005a/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0005a/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0005a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0005b/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0005b/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0005b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0006a/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0006a/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0006a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0006b/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0006b/dump1.nq.gz delete mode 100644 src/test/resources/rml-io/RMLTTC0006b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0006c/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0006c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0006d/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0006d/dump1.nq.tar.xz delete mode 100644 src/test/resources/rml-io/RMLTTC0006d/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0006e/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0006e/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0007a/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0007a/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0007a/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0007b/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0007b/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0007b/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0007c/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0007c/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0007c/mapping.ttl delete mode 100644 src/test/resources/rml-io/RMLTTC0007d/default.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0007d/dump1.nq delete mode 100644 src/test/resources/rml-io/RMLTTC0007d/mapping.ttl diff --git a/src/test/java/burp/Test.java b/src/test/java/burp/Test.java deleted file mode 100644 index 279290c2..00000000 --- a/src/test/java/burp/Test.java +++ /dev/null @@ -1,19 +0,0 @@ -package burp; - -import java.util.ArrayList; -import java.util.List; - -import com.github.jsonldjava.shaded.com.google.common.collect.Lists; - -public class Test { - - public static void main(String[] args) { - List> list = new ArrayList>(); - list.add(List.of(1, 2)); - list.add(List.of(3, 4)); - - System.out.println(Lists.cartesianProduct(list)); - - } - -} diff --git a/src/test/java/burp/TestRMLCC.java b/src/test/java/burp/TestRMLCC.java deleted file mode 100644 index 7d8ca2f2..00000000 --- a/src/test/java/burp/TestRMLCC.java +++ /dev/null @@ -1,133 +0,0 @@ - -package burp; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.Iterator; - -import org.apache.jena.query.Dataset; -import org.apache.jena.rdf.model.Model; -import org.apache.jena.rdf.model.Resource; -import org.apache.jena.riot.RDFDataMgr; -import org.apache.jena.riot.RDFFormat; -import org.junit.jupiter.api.Test; - -public class TestRMLCC { - private static String base = "./src/test/resources/rml-cc/"; - - @Test public void RMLTCCC0001Alt() throws IOException { testForOK("RMLTC-CC-0001-Alt"); } - @Test public void RMLTCCC0001Bag() throws IOException { testForOK("RMLTC-CC-0001-Bag"); } - @Test public void RMLTCCC0001List() throws IOException { testForOK("RMLTC-CC-0001-List"); } - @Test public void RMLTCCC0001Seq() throws IOException { testForOK("RMLTC-CC-0001-Seq"); } - @Test public void RMLTCCC0002Bag() throws IOException { testForOK("RMLTC-CC-0002-Bag"); } - @Test public void RMLTCCC0002List() throws IOException { testForOK("RMLTC-CC-0002-List"); } - @Test public void RMLTCCC0003EB() throws IOException { testForOK("RMLTC-CC-0003-EB"); } - @Test public void RMLTCCC0003EL() throws IOException { testForOK("RMLTC-CC-0003-EL"); } - @Test public void RMLTCCC0003ELNamed() throws IOException { testForOK("RMLTC-CC-0003-EL-Named"); } - @Test public void RMLTCCC0003ELBN() throws IOException { testForOK("RMLTC-CC-0003-EL-BN"); } - @Test public void RMLTCCC0003NEB() throws IOException { testForOK("RMLTC-CC-0003-NEB"); } - @Test public void RMLTCCC0003NEL() throws IOException { testForOK("RMLTC-CC-0003-NEL"); } - @Test public void RMLTCCC0003NELb() throws IOException { testForOK("RMLTC-CC-0003-NELb"); } - @Test public void RMLTCCC0004SM1() throws IOException { testForOK("RMLTC-CC-0004-SM1"); } - @Test public void RMLTCCC0004SM2() throws IOException { testForOK("RMLTC-CC-0004-SM2"); } - @Test public void RMLTCCC0004SM3() throws IOException { testForOK("RMLTC-CC-0004-SM3"); } - @Test public void RMLTCCC0004SM4() throws IOException { testForOK("RMLTC-CC-0004-SM4"); } - @Test public void RMLTCCC0004SM5() throws IOException { testForOK("RMLTC-CC-0004-SM5"); } - @Test public void RMLTCCC0005App1() throws IOException { testForOK("RMLTC-CC-0005-App1"); } - @Test public void RMLTCCC0005App2() throws IOException { testForOK("RMLTC-CC-0005-App2"); } - @Test public void RMLTCCC0005Car1() throws IOException { testForOK("RMLTC-CC-0005-Car1"); } - @Test public void RMLTCCC0005Car2() throws IOException { testForOK("RMLTC-CC-0005-Car2"); } - @Test public void RMLTCCC0006IT0() throws IOException { testForOK("RMLTC-CC-0006-IT0"); } - @Test public void RMLTCCC0006IT1() throws IOException { testForOK("RMLTC-CC-0006-IT1"); } - @Test public void RMLTCCC0006IT2() throws IOException { testForOK("RMLTC-CC-0006-IT2"); } - @Test public void RMLTCCC0007NES() throws IOException { testForOK("RMLTC-CC-0007-NES"); } - @Test public void RMLTCCC0008ROMa() throws IOException { testForOK("RMLTC-CC-0008-ROMa"); } - @Test public void RMLTCCC0008ROMb() throws IOException { testForOK("RMLTC-CC-0008-ROMb"); } - @Test public void RMLTCCC0009DUPLIST() throws IOException { testForOK("RMLTC-CC-0009-DUP-List"); } - @Test public void RMLTCCC0009DUPBAG() throws IOException { testForOK("RMLTC-CC-0009-DUP-BAG"); } - @Test public void RMLTCCC0010LIST() throws IOException { testForGraphsOK("RMLTC-CC-0010-List"); } - @Test public void RMLTCCC0010LISTb() throws IOException { testForGraphsOK("RMLTC-CC-0010-Listb"); } - - public void testForOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should generate a graph."); - String o = new File(base + f, "default.nq").getAbsolutePath().toString(); - - int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }); - - Model expected = RDFDataMgr.loadModel(o); - Model actual = RDFDataMgr.loadModel(r); - - if (!expected.isIsomorphicWith(actual)) { - expected.write(System.out, "NQ"); - System.out.println("---"); - actual.write(System.out, "NQ"); - } - - assertEquals(0, exit); - - System.out.println(expected.isIsomorphicWith(actual) ? "OK" : "NOK"); - - assertTrue(expected.isIsomorphicWith(actual)); - } - - public void testForGraphsOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should generate a graph."); - String o = new File(base + f, "default.nq").getAbsolutePath().toString(); - - int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }); - - Dataset expected = RDFDataMgr.loadDataset(o); - Dataset actual = RDFDataMgr.loadDataset(r); - - RDFDataMgr.write(System.out, expected, RDFFormat.TRIG); - System.out.println("----"); - RDFDataMgr.write(System.out, actual, RDFFormat.TRIG); - - assertTrue(expected.getDefaultModel().isIsomorphicWith(actual.getDefaultModel())); - Iterator names = expected.listModelNames(); - while(names.hasNext()) { - Resource name = names.next(); - assertTrue(expected.getNamedModel(r).isIsomorphicWith(actual.getNamedModel(r))); - } - names = actual.listModelNames(); - while(names.hasNext()) { - Resource name = names.next(); - assertTrue(expected.getNamedModel(r).isIsomorphicWith(actual.getNamedModel(r))); - } - - assertEquals(0, exit); - } - - public void testForNotOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should NOT generate a graph."); - int exit = Main.doMain(new String[] { "-m", m, "-o", r }); - System.out.println(Files.size(Paths.get(r)) == 0 ? "OK" : "NOK"); - Model actual = RDFDataMgr.loadModel(r); - actual.write(System.out, "NQ"); - - assertTrue(exit > 0); - assertTrue(Files.size(Paths.get(r)) == 0); - - System.out.println(); - } - -} \ No newline at end of file diff --git a/src/test/java/burp/TestRMLCore.java b/src/test/java/burp/TestRMLCore.java deleted file mode 100644 index 65c86431..00000000 --- a/src/test/java/burp/TestRMLCore.java +++ /dev/null @@ -1,216 +0,0 @@ -package burp; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.List; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import org.apache.jena.rdf.model.Model; -import org.apache.jena.riot.RDFDataMgr; -import org.junit.jupiter.api.Test; - -public class TestRMLCore { - private static String base = "./src/test/resources/rml-core/"; - -// public static void main(String[] args) { -// try (Stream stream = Files.list(Paths.get(base))) { -// List files = stream.filter(f -> Files.isDirectory(f) && f.getFileName().toString().contains("XML")) -// .map(Path::getFileName).map(Path::toString).collect(Collectors.toList()); -// -// for (String f : files) { -// if (!new File(base + f, "output.nq").exists()) { -// String f1 = f.replace("-", ""); -// System.out.println("@Test public void " + f1 + "() throws IOException { testForNotOK(\"" + f + "\"); }"); -// } -// } -// } catch (Exception e) { -// System.err.println(e.getMessage()); -// throw new RuntimeException(e); -// } -// } - - @Test public void RMLTC0000CSV() throws IOException { testForOK("RMLTC0000-CSV"); } - @Test public void RMLTC0001aCSV() throws IOException { testForOK("RMLTC0001a-CSV"); } - @Test public void RMLTC0001bCSV() throws IOException { testForOK("RMLTC0001b-CSV"); } - @Test public void RMLTC0002aCSV() throws IOException { testForOK("RMLTC0002a-CSV"); } - @Test public void RMLTC0002bCSV() throws IOException { testForOK("RMLTC0002b-CSV"); } - @Test public void RMLTC0003cCSV() throws IOException { testForOK("RMLTC0003c-CSV"); } - @Test public void RMLTC0004aCSV() throws IOException { testForOK("RMLTC0004a-CSV"); } - @Test public void RMLTC0005aCSV() throws IOException { testForOK("RMLTC0005a-CSV"); } - @Test public void RMLTC0006aCSV() throws IOException { testForOK("RMLTC0006a-CSV"); } - @Test public void RMLTC0007aCSV() throws IOException { testForOK("RMLTC0007a-CSV"); } - @Test public void RMLTC0007bCSV() throws IOException { testForOK("RMLTC0007b-CSV"); } - @Test public void RMLTC0007cCSV() throws IOException { testForOK("RMLTC0007c-CSV"); } - @Test public void RMLTC0007dCSV() throws IOException { testForOK("RMLTC0007d-CSV"); } - @Test public void RMLTC0007eCSV() throws IOException { testForOK("RMLTC0007e-CSV"); } - @Test public void RMLTC0007fCSV() throws IOException { testForOK("RMLTC0007f-CSV"); } - @Test public void RMLTC0007gCSV() throws IOException { testForOK("RMLTC0007g-CSV"); } - @Test public void RMLTC0008aCSV() throws IOException { testForOK("RMLTC0008a-CSV"); } - @Test public void RMLTC0008bCSV() throws IOException { testForOK("RMLTC0008b-CSV"); } - @Test public void RMLTC0008cCSV() throws IOException { testForOK("RMLTC0008c-CSV"); } - @Test public void RMLTC0009aCSV() throws IOException { testForOK("RMLTC0009a-CSV"); } - @Test public void RMLTC0009bCSV() throws IOException { testForOK("RMLTC0009b-CSV"); } - @Test public void RMLTC0010aCSV() throws IOException { testForOK("RMLTC0010a-CSV"); } - @Test public void RMLTC0010bCSV() throws IOException { testForOK("RMLTC0010b-CSV"); } - @Test public void RMLTC0010cCSV() throws IOException { testForOK("RMLTC0010c-CSV"); } - @Test public void RMLTC0011bCSV() throws IOException { testForOK("RMLTC0011b-CSV"); } - @Test public void RMLTC0012aCSV() throws IOException { testForOK("RMLTC0012a-CSV"); } - @Test public void RMLTC0012bCSV() throws IOException { testForOK("RMLTC0012b-CSV"); } - @Test public void RMLTC0015aCSV() throws IOException { testForOK("RMLTC0015a-CSV"); } - @Test public void RMLTC0019aCSV() throws IOException { testForOK("RMLTC0019a-CSV"); } - @Test public void RMLTC0020aCSV() throws IOException { testForOK("RMLTC0020a-CSV"); } - @Test public void RMLTC0021aCSV() throws IOException { testForOK("RMLTC0021a-CSV"); } - @Test public void RMLTC0022aCSV() throws IOException { testForOK("RMLTC0022a-CSV"); } - @Test public void RMLTC0022bCSV() throws IOException { testForOK("RMLTC0022b-CSV"); } - @Test public void RMLTC0022cCSV() throws IOException { testForOK("RMLTC0022c-CSV"); } - - @Test public void RMLTC0002cCSV() throws IOException { testForNotOK("RMLTC0002c-CSV"); } - @Test public void RMLTC0002eCSV() throws IOException { testForNotOK("RMLTC0002e-CSV"); } - @Test public void RMLTC0004bCSV() throws IOException { testForNotOK("RMLTC0004b-CSV"); } - @Test public void RMLTC0007hCSV() throws IOException { testForNotOK("RMLTC0007h-CSV"); } - @Test public void RMLTC0012cCSV() throws IOException { testForNotOK("RMLTC0012c-CSV"); } - @Test public void RMLTC0012dCSV() throws IOException { testForNotOK("RMLTC0012d-CSV"); } - @Test public void RMLTC0015bCSV() throws IOException { testForNotOK("RMLTC0015b-CSV"); } - @Test public void RMLTC0019bCSV() throws IOException { testForNotOK("RMLTC0019b-CSV"); } - - @Test public void RMLTC0000JSON() throws IOException { testForOK("RMLTC0000-JSON"); } - @Test public void RMLTC0001aJSON() throws IOException { testForOK("RMLTC0001a-JSON"); } - @Test public void RMLTC0001bJSON() throws IOException { testForOK("RMLTC0001b-JSON"); } - @Test public void RMLTC0002aJSON() throws IOException { testForOK("RMLTC0002a-JSON"); } - @Test public void RMLTC0002bJSON() throws IOException { testForOK("RMLTC0002b-JSON"); } - // This test should be removed - // @Test public void RMLTC0002cJSON() throws IOException { testForOK("RMLTC0002c-JSON"); } - @Test public void RMLTC0003cJSON() throws IOException { testForOK("RMLTC0003c-JSON"); } - @Test public void RMLTC0004aJSON() throws IOException { testForOK("RMLTC0004a-JSON"); } - @Test public void RMLTC0005aJSON() throws IOException { testForOK("RMLTC0005a-JSON"); } - @Test public void RMLTC0006aJSON() throws IOException { testForOK("RMLTC0006a-JSON"); } - @Test public void RMLTC0007aJSON() throws IOException { testForOK("RMLTC0007a-JSON"); } - @Test public void RMLTC0007bJSON() throws IOException { testForOK("RMLTC0007b-JSON"); } - @Test public void RMLTC0007cJSON() throws IOException { testForOK("RMLTC0007c-JSON"); } - @Test public void RMLTC0007dJSON() throws IOException { testForOK("RMLTC0007d-JSON"); } - @Test public void RMLTC0007eJSON() throws IOException { testForOK("RMLTC0007e-JSON"); } - @Test public void RMLTC0007fJSON() throws IOException { testForOK("RMLTC0007f-JSON"); } - @Test public void RMLTC0007gJSON() throws IOException { testForOK("RMLTC0007g-JSON"); } - @Test public void RMLTC0008aJSON() throws IOException { testForOK("RMLTC0008a-JSON"); } - @Test public void RMLTC0008bJSON() throws IOException { testForOK("RMLTC0008b-JSON"); } - @Test public void RMLTC0008cJSON() throws IOException { testForOK("RMLTC0008c-JSON"); } - @Test public void RMLTC0009aJSON() throws IOException { testForOK("RMLTC0009a-JSON"); } - @Test public void RMLTC0009bJSON() throws IOException { testForOK("RMLTC0009b-JSON"); } - @Test public void RMLTC0010aJSON() throws IOException { testForOK("RMLTC0010a-JSON"); } - @Test public void RMLTC0010bJSON() throws IOException { testForOK("RMLTC0010b-JSON"); } - @Test public void RMLTC0010cJSON() throws IOException { testForOK("RMLTC0010c-JSON"); } - @Test public void RMLTC0011bJSON() throws IOException { testForOK("RMLTC0011b-JSON"); } - @Test public void RMLTC0012aJSON() throws IOException { testForOK("RMLTC0012a-JSON"); } - @Test public void RMLTC0012bJSON() throws IOException { testForOK("RMLTC0012b-JSON"); } - @Test public void RMLTC0013aJSON() throws IOException { testForOK("RMLTC0013a-JSON"); } - @Test public void RMLTC0015aJSON() throws IOException { testForOK("RMLTC0015a-JSON"); } - @Test public void RMLTC0019aJSON() throws IOException { testForOK("RMLTC0019a-JSON"); } - @Test public void RMLTC0020aJSON() throws IOException { testForOK("RMLTC0020a-JSON"); } - @Test public void RMLTC0021aJSON() throws IOException { testForOK("RMLTC0021a-JSON"); } - - @Test public void RMLTC0002eJSON() throws IOException { testForNotOK("RMLTC0002e-JSON"); } - @Test public void RMLTC0002gJSON() throws IOException { testForNotOK("RMLTC0002g-JSON"); } - @Test public void RMLTC0004bJSON() throws IOException { testForNotOK("RMLTC0004b-JSON"); } - @Test public void RMLTC0007hJSON() throws IOException { testForNotOK("RMLTC0007h-JSON"); } - @Test public void RMLTC0012cJSON() throws IOException { testForNotOK("RMLTC0012c-JSON"); } - @Test public void RMLTC0012dJSON() throws IOException { testForNotOK("RMLTC0012d-JSON"); } - @Test public void RMLTC0015bJSON() throws IOException { testForNotOK("RMLTC0015b-JSON"); } - @Test public void RMLTC0019bJSON() throws IOException { testForNotOK("RMLTC0019b-JSON"); } - - @Test public void RMLTC0000XML() throws IOException { testForOK("RMLTC0000-XML"); } - @Test public void RMLTC0001aXML() throws IOException { testForOK("RMLTC0001a-XML"); } - @Test public void RMLTC0001bXML() throws IOException { testForOK("RMLTC0001b-XML"); } - @Test public void RMLTC0002aXML() throws IOException { testForOK("RMLTC0002a-XML"); } - @Test public void RMLTC0002bXML() throws IOException { testForOK("RMLTC0002b-XML"); } - // This test should be removed - //@Test public void RMLTC0002cXML() throws IOException { testForOK("RMLTC0002c-XML"); } - @Test public void RMLTC0003cXML() throws IOException { testForOK("RMLTC0003c-XML"); } - @Test public void RMLTC0004aXML() throws IOException { testForOK("RMLTC0004a-XML"); } - @Test public void RMLTC0005aXML() throws IOException { testForOK("RMLTC0005a-XML"); } - @Test public void RMLTC0006aXML() throws IOException { testForOK("RMLTC0006a-XML"); } - @Test public void RMLTC0007aXML() throws IOException { testForOK("RMLTC0007a-XML"); } - @Test public void RMLTC0007bXML() throws IOException { testForOK("RMLTC0007b-XML"); } - @Test public void RMLTC0007cXML() throws IOException { testForOK("RMLTC0007c-XML"); } - @Test public void RMLTC0007dXML() throws IOException { testForOK("RMLTC0007d-XML"); } - @Test public void RMLTC0007eXML() throws IOException { testForOK("RMLTC0007e-XML"); } - @Test public void RMLTC0007fXML() throws IOException { testForOK("RMLTC0007f-XML"); } - @Test public void RMLTC0007gXML() throws IOException { testForOK("RMLTC0007g-XML"); } - @Test public void RMLTC0008aXML() throws IOException { testForOK("RMLTC0008a-XML"); } - @Test public void RMLTC0008bXML() throws IOException { testForOK("RMLTC0008b-XML"); } - @Test public void RMLTC0008cXML() throws IOException { testForOK("RMLTC0008c-XML"); } - @Test public void RMLTC0009aXML() throws IOException { testForOK("RMLTC0009a-XML"); } - @Test public void RMLTC0009bXML() throws IOException { testForOK("RMLTC0009b-XML"); } - @Test public void RMLTC0010bXML() throws IOException { testForOK("RMLTC0010b-XML"); } - @Test public void RMLTC0010cXML() throws IOException { testForOK("RMLTC0010c-XML"); } - @Test public void RMLTC0011bXML() throws IOException { testForOK("RMLTC0011b-XML"); } - @Test public void RMLTC0012aXML() throws IOException { testForOK("RMLTC0012a-XML"); } - @Test public void RMLTC0012bXML() throws IOException { testForOK("RMLTC0012b-XML"); } - @Test public void RMLTC0015aXML() throws IOException { testForOK("RMLTC0015a-XML"); } - @Test public void RMLTC0019aXML() throws IOException { testForOK("RMLTC0019a-XML"); } - @Test public void RMLTC0020aXML() throws IOException { testForOK("RMLTC0020a-XML"); } - @Test public void RMLTC0021aXML() throws IOException { testForOK("RMLTC0021a-XML"); } - @Test public void RMLTC0023aXML() throws IOException { testForOK("RMLTC0023a-XML"); } - - @Test public void RMLTC0002eXML() throws IOException { testForNotOK("RMLTC0002e-XML"); } - @Test public void RMLTC0004bXML() throws IOException { testForNotOK("RMLTC0004b-XML"); } - @Test public void RMLTC0007hXML() throws IOException { testForNotOK("RMLTC0007h-XML"); } - @Test public void RMLTC0012cXML() throws IOException { testForNotOK("RMLTC0012c-XML"); } - @Test public void RMLTC0012dXML() throws IOException { testForNotOK("RMLTC0012d-XML"); } - @Test public void RMLTC0015bXML() throws IOException { testForNotOK("RMLTC0015b-XML"); } - @Test public void RMLTC0019bXML() throws IOException { testForNotOK("RMLTC0019b-XML"); } - - @Test public void testForNotOK() throws IOException { testForOK("RMLTC0026a-JSON"); } - - public void testForOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should generate a graph."); - String o = new File(base + f, "output.nq").getAbsolutePath().toString(); - - int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }); - - Model expected = RDFDataMgr.loadModel(o); - Model actual = RDFDataMgr.loadModel(r); - - if (!expected.isIsomorphicWith(actual)) { - expected.write(System.out, "NQ"); - System.out.println(); - actual.write(System.out, "NQ"); - } - - assertEquals(0, exit); - - System.out.println(expected.isIsomorphicWith(actual) ? "OK" : "NOK"); - - assertTrue(expected.isIsomorphicWith(actual)); - } - - public void testForNotOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should NOT generate a graph."); - int exit = Main.doMain(new String[] { "-m", m, "-o", r }); - System.out.println(Files.size(Paths.get(r)) == 0 ? "OK" : "NOK"); - Model actual = RDFDataMgr.loadModel(r); - actual.write(System.out, "NQ"); - - assertTrue(exit > 0); - assertTrue(Files.size(Paths.get(r)) == 0); - - System.out.println(); - } - -} \ No newline at end of file diff --git a/src/test/java/burp/TestRMLCoreGM.java b/src/test/java/burp/TestRMLCoreGM.java.old similarity index 100% rename from src/test/java/burp/TestRMLCoreGM.java rename to src/test/java/burp/TestRMLCoreGM.java.old diff --git a/src/test/java/burp/TestRMLCoreMySQL.java b/src/test/java/burp/TestRMLCoreMySQL.java.old similarity index 100% rename from src/test/java/burp/TestRMLCoreMySQL.java rename to src/test/java/burp/TestRMLCoreMySQL.java.old diff --git a/src/test/java/burp/TestRMLCorePostgreSQL.java b/src/test/java/burp/TestRMLCorePostgreSQL.java.old similarity index 100% rename from src/test/java/burp/TestRMLCorePostgreSQL.java rename to src/test/java/burp/TestRMLCorePostgreSQL.java.old diff --git a/src/test/java/burp/TestRMLFNML.java b/src/test/java/burp/TestRMLFNML.java.old similarity index 100% rename from src/test/java/burp/TestRMLFNML.java rename to src/test/java/burp/TestRMLFNML.java.old diff --git a/src/test/java/burp/TestRMLFNMLGrellFunctions.java b/src/test/java/burp/TestRMLFNMLGrellFunctions.java.old similarity index 100% rename from src/test/java/burp/TestRMLFNMLGrellFunctions.java rename to src/test/java/burp/TestRMLFNMLGrellFunctions.java.old diff --git a/src/test/java/burp/TestRMLIOSource.java b/src/test/java/burp/TestRMLIOSource.java deleted file mode 100644 index aad3e31c..00000000 --- a/src/test/java/burp/TestRMLIOSource.java +++ /dev/null @@ -1,100 +0,0 @@ - -package burp; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; - -import org.apache.jena.rdf.model.Model; -import org.apache.jena.riot.RDFDataMgr; -import org.junit.jupiter.api.Test; - -public class TestRMLIOSource { - private static String base = "./src/test/resources/rml-io/"; - - // This test fails because the remote file has been moved. - // @Test public void RMLTTC0000() throws IOException { testForOK("RMLTTC0000"); } - @Test public void RMLSTC0001a() throws IOException { testForOK("RMLSTC0001a"); } - @Test public void RMLSTC0001b() throws IOException { testForOK("RMLSTC0001b"); } - @Test public void RMLSTC0002a() throws IOException { testForOK("RMLSTC0002a"); } - @Test public void RMLSTC0002b() throws IOException { testForOK("RMLSTC0002b"); } - @Test public void RMLSTC0002c() throws IOException { testForOK("RMLSTC0002c"); } - @Test public void RMLSTC0002d() throws IOException { testForOK("RMLSTC0002d"); } - @Test public void RMLSTC0002e() throws IOException { testForOK("RMLSTC0002e"); } - @Test public void RMLSTC0003() throws IOException { testForOK("RMLSTC0003"); } - - // 3b --> SPARQL TSV --> Can of worms - // @Test public void RMLSTC0003b() throws IOException { testForOK("RMLSTC0003b"); } - // 3c --> SPARQL JSON --> Can of wormsO - // @Test public void RMLSTC0003c() throws IOException { testForOK("RMLSTC0003c"); } - - @Test public void RMLSTC0004a() throws IOException { testForOK("RMLSTC0004a"); } - @Test public void RMLSTC0004b() throws IOException { testForOK("RMLSTC0004b"); } - @Test public void RMLSTC0004c() throws IOException { testForOK("RMLSTC0004c"); } - @Test public void RMLSTC0005a() throws IOException { testForOK("RMLSTC0005a"); } - @Test public void RMLSTC0005b() throws IOException { testForOK("RMLSTC0005b"); } - @Test public void RMLSTC0006a() throws IOException { testForOK("RMLSTC0006a"); } - @Test public void RMLSTC0006b() throws IOException { testForOK("RMLSTC0006b"); } - - // This test requires a SPARQL endpoint [disabled] - // @Test public void RMLSTC0006c() throws IOException { testForOK("RMLSTC0006c"); } - - @Test public void RMLSTC0006d() throws IOException { testForOK("RMLSTC0006d"); } - @Test public void RMLSTC0006e() throws IOException { testForOK("RMLSTC0006e"); } - // TEST IS UNCLEAR - // @Test public void RMLSTC0006f() throws IOException { testForOK("RMLSTC0006f"); } - - @Test public void RMLSTC0007a() throws IOException { testForOK("RMLSTC0007a"); } - @Test public void RMLSTC0007b() throws IOException { testForOK("RMLSTC0007b"); } - @Test public void RMLSTC0007c() throws IOException { testForOK("RMLSTC0007c"); } - @Test public void RMLSTC0007d() throws IOException { testForOK("RMLSTC0007d"); } - - public void testForOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should generate a graph."); - String o = new File(base + f, "default.nq").getAbsolutePath().toString(); - - int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }); - - Model expected = RDFDataMgr.loadModel(o); - Model actual = RDFDataMgr.loadModel(r); - - if (!expected.isIsomorphicWith(actual)) { - expected.write(System.out, "Turtle"); - System.out.println("---"); - actual.write(System.out, "Turtle"); - } - - assertEquals(0, exit); - - System.out.println(expected.isIsomorphicWith(actual) ? "OK" : "NOK"); - - assertTrue(expected.isIsomorphicWith(actual)); - } - - public void testForNotOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should NOT generate a graph."); - int exit = Main.doMain(new String[] { "-m", m, "-o", r }); - System.out.println(Files.size(Paths.get(r)) == 0 ? "OK" : "NOK"); - Model actual = RDFDataMgr.loadModel(r); - actual.write(System.out, "NQ"); - - assertTrue(exit > 0); - assertTrue(Files.size(Paths.get(r)) == 0); - - System.out.println(); - } - -} \ No newline at end of file diff --git a/src/test/java/burp/TestRMLIOTarget.java b/src/test/java/burp/TestRMLIOTarget.java deleted file mode 100644 index d71dc655..00000000 --- a/src/test/java/burp/TestRMLIOTarget.java +++ /dev/null @@ -1,106 +0,0 @@ - -package burp; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; - -import org.apache.jena.rdf.model.Model; -import org.apache.jena.riot.RDFDataMgr; - -public class TestRMLIOTarget { - private static String base = "./src/test/burp/rml-io/"; - -// @Test public void RMLTTC0001a() throws IOException { testForOK("RMLTTC0001a"); } -// @Test public void RMLTTC0001b() throws IOException { testForOK("RMLTTC0001b"); } -// @Test public void RMLTTC0001c() throws IOException { testForOK("RMLTTC0001c"); } -// @Test public void RMLTTC0001d() throws IOException { testForOK("RMLTTC0001d"); } -// @Test public void RMLTTC0001e() throws IOException { testForOK("RMLTTC0001e"); } -// @Test public void RMLTTC0001f() throws IOException { testForOK("RMLTTC0001f"); } -// @Test public void RMLTTC0002a() throws IOException { testForOK("RMLTTC0002a"); } -// @Test public void RMLTTC0002b() throws IOException { testForOK("RMLTTC0002b"); } -// @Test public void RMLTTC0002c() throws IOException { testForOK("RMLTTC0002c"); } -// @Test public void RMLTTC0002d() throws IOException { testForOK("RMLTTC0002d"); } -// @Test public void RMLTTC0002e() throws IOException { testForOK("RMLTTC0002e"); } -// @Test public void RMLTTC0002f() throws IOException { testForOK("RMLTTC0002f"); } -// @Test public void RMLTTC0002g() throws IOException { testForOK("RMLTTC0002g"); } -// @Test public void RMLTTC0002h() throws IOException { testForOK("RMLTTC0002h"); } -// @Test public void RMLTTC0002i() throws IOException { testForOK("RMLTTC0002i"); } -// @Test public void RMLTTC0002j() throws IOException { testForOK("RMLTTC0002j"); } -// @Test public void RMLTTC0002k() throws IOException { testForOK("RMLTTC0002k"); } -// @Test public void RMLTTC0002l() throws IOException { testForOK("RMLTTC0002l"); } -// @Test public void RMLTTC0002m() throws IOException { testForOK("RMLTTC0002m"); } -// @Test public void RMLTTC0002n() throws IOException { testForOK("RMLTTC0002n"); } -// @Test public void RMLTTC0002o() throws IOException { testForOK("RMLTTC0002o"); } -// @Test public void RMLTTC0002p() throws IOException { testForOK("RMLTTC0002p"); } -// @Test public void RMLTTC0002q() throws IOException { testForOK("RMLTTC0002q"); } -// @Test public void RMLTTC0002r() throws IOException { testForOK("RMLTTC0002r"); } -// @Test public void RMLTTC0003a() throws IOException { testForOK("RMLTTC0003a"); } -// @Test public void RMLTTC0004a() throws IOException { testForOK("RMLTTC0004a"); } -// @Test public void RMLTTC0004b() throws IOException { testForOK("RMLTTC0004b"); } -// @Test public void RMLTTC0004c() throws IOException { testForOK("RMLTTC0004c"); } -// @Test public void RMLTTC0004d() throws IOException { testForOK("RMLTTC0004d"); } -// @Test public void RMLTTC0004e() throws IOException { testForOK("RMLTTC0004e"); } -// @Test public void RMLTTC0004f() throws IOException { testForOK("RMLTTC0004f"); } -// @Test public void RMLTTC0004g() throws IOException { testForOK("RMLTTC0004g"); } -// @Test public void RMLTTC0005a() throws IOException { testForOK("RMLTTC0005a"); } -// @Test public void RMLTTC0005b() throws IOException { testForOK("RMLTTC0005b"); } -// @Test public void RMLTTC0006a() throws IOException { testForOK("RMLTTC0006a"); } -// @Test public void RMLTTC0006b() throws IOException { testForOK("RMLTTC0006b"); } -// @Test public void RMLTTC0006c() throws IOException { testForOK("RMLTTC0006c"); } -// @Test public void RMLTTC0006d() throws IOException { testForOK("RMLTTC0006d"); } -// @Test public void RMLTTC0006e() throws IOException { testForOK("RMLTTC0006e"); } -// @Test public void RMLTTC0007a() throws IOException { testForOK("RMLTTC0007a"); } -// @Test public void RMLTTC0007b() throws IOException { testForOK("RMLTTC0007b"); } -// @Test public void RMLTTC0007c() throws IOException { testForOK("RMLTTC0007c"); } -// @Test public void RMLTTC0007d() throws IOException { testForOK("RMLTTC0007d"); } - - public void testForOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should generate a graph."); - String o = new File(base + f, "default.nq").getAbsolutePath().toString(); - - int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }); - - Model expected = RDFDataMgr.loadModel(o); - Model actual = RDFDataMgr.loadModel(r); - - if (!expected.isIsomorphicWith(actual)) { - expected.write(System.out, "Turtle"); - System.out.println("---"); - actual.write(System.out, "Turtle"); - } - - assertEquals(0, exit); - - System.out.println(expected.isIsomorphicWith(actual) ? "OK" : "NOK"); - - assertTrue(expected.isIsomorphicWith(actual)); - } - - public void testForNotOK(String f) throws IOException { - System.out.println(String.format("Now processing %s", f)); - String m = new File(base + f, "mapping.ttl").getAbsolutePath().toString(); - String r = Files.createTempFile(null, ".nq").toString(); - System.out.println(String.format("Writing output to %s", r)); - - System.out.println("This test should NOT generate a graph."); - int exit = Main.doMain(new String[] { "-m", m, "-o", r }); - System.out.println(Files.size(Paths.get(r)) == 0 ? "OK" : "NOK"); - Model actual = RDFDataMgr.loadModel(r); - actual.write(System.out, "NQ"); - - assertTrue(exit > 0); - assertTrue(Files.size(Paths.get(r)) == 0); - - System.out.println(); - } - -} \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/data.json b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/data.json deleted file mode 100644 index 147b8e51..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/data.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - }, - { - "id": "c", - "values": [ - "7", - "8", - "9" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/default.nq deleted file mode 100644 index 74e2d141..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/default.nq +++ /dev/null @@ -1,17 +0,0 @@ - _:nc808fbd2e11a4baa939c61c8210b5909b1 . -_:nc808fbd2e11a4baa939c61c8210b5909b1 . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . - - _:nc808fbd2e11a4baa939c61c8210b5909b2 . -_:nc808fbd2e11a4baa939c61c8210b5909b2 . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . - - _:nc808fbd2e11a4baa939c61c8210b5909b3 . -_:nc808fbd2e11a4baa939c61c8210b5909b3 . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl deleted file mode 100644 index a72409e0..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Alt ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/data.json b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/data.json deleted file mode 100644 index 147b8e51..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/data.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - }, - { - "id": "c", - "values": [ - "7", - "8", - "9" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/default.nq deleted file mode 100644 index 7b134a9b..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/default.nq +++ /dev/null @@ -1,15 +0,0 @@ -_:nc808fbd2e11a4baa939c61c8210b5909b1 . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . -_:nc808fbd2e11a4baa939c61c8210b5909b2 . -_:nc808fbd2e11a4baa939c61c8210b5909b3 . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . - _:nc808fbd2e11a4baa939c61c8210b5909b2 . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . - _:nc808fbd2e11a4baa939c61c8210b5909b3 . - _:nc808fbd2e11a4baa939c61c8210b5909b1 . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl deleted file mode 100644 index 20d9348f..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/data.json b/src/test/resources/rml-cc/RMLTC-CC-0001-List/data.json deleted file mode 100644 index 147b8e51..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/data.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - }, - { - "id": "c", - "values": [ - "7", - "8", - "9" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0001-List/default.nq deleted file mode 100644 index 0b4e8c1d..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/default.nq +++ /dev/null @@ -1,23 +0,0 @@ - _:n988e0f11d19c486fa3b3255f94c9b3bab1 . -_:n988e0f11d19c486fa3b3255f94c9b3bab1 "1" . -_:n988e0f11d19c486fa3b3255f94c9b3bab1 _:n988e0f11d19c486fa3b3255f94c9b3bab2 . -_:n988e0f11d19c486fa3b3255f94c9b3bab2 "2" . -_:n988e0f11d19c486fa3b3255f94c9b3bab2 _:n988e0f11d19c486fa3b3255f94c9b3bab3 . -_:n988e0f11d19c486fa3b3255f94c9b3bab3 "3" . -_:n988e0f11d19c486fa3b3255f94c9b3bab3 . - - _:n988e0f11d19c486fa3b3255f94c9b3bab4 . -_:n988e0f11d19c486fa3b3255f94c9b3bab4 "4" . -_:n988e0f11d19c486fa3b3255f94c9b3bab4 _:n988e0f11d19c486fa3b3255f94c9b3bab5 . -_:n988e0f11d19c486fa3b3255f94c9b3bab5 "5" . -_:n988e0f11d19c486fa3b3255f94c9b3bab5 _:n988e0f11d19c486fa3b3255f94c9b3bab6 . -_:n988e0f11d19c486fa3b3255f94c9b3bab6 "6" . -_:n988e0f11d19c486fa3b3255f94c9b3bab6 . - - _:n988e0f11d19c486fa3b3255f94c9b3bab7 . -_:n988e0f11d19c486fa3b3255f94c9b3bab7 "7" . -_:n988e0f11d19c486fa3b3255f94c9b3bab7 _:n988e0f11d19c486fa3b3255f94c9b3bab8 . -_:n988e0f11d19c486fa3b3255f94c9b3bab8 "8" . -_:n988e0f11d19c486fa3b3255f94c9b3bab8 _:n988e0f11d19c486fa3b3255f94c9b3bab9 . -_:n988e0f11d19c486fa3b3255f94c9b3bab9 "9" . -_:n988e0f11d19c486fa3b3255f94c9b3bab9 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl deleted file mode 100644 index ca963e35..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/data.json b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/data.json deleted file mode 100644 index 147b8e51..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/data.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - }, - { - "id": "c", - "values": [ - "7", - "8", - "9" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/default.nq deleted file mode 100644 index e0bf7de1..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/default.nq +++ /dev/null @@ -1,15 +0,0 @@ -_:nc808fbd2e11a4baa939c61c8210b5909b1 . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . -_:nc808fbd2e11a4baa939c61c8210b5909b2 . -_:nc808fbd2e11a4baa939c61c8210b5909b3 . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . - _:nc808fbd2e11a4baa939c61c8210b5909b2 . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . - _:nc808fbd2e11a4baa939c61c8210b5909b3 . - _:nc808fbd2e11a4baa939c61c8210b5909b1 . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl deleted file mode 100644 index 2117ebdb..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Seq ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/data.json b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/data.json deleted file mode 100644 index 147b8e51..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/data.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - }, - { - "id": "c", - "values": [ - "7", - "8", - "9" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/default.nq deleted file mode 100644 index 8b5f9571..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/default.nq +++ /dev/null @@ -1,15 +0,0 @@ - . - "7" . - "8" . - "2" . - . - . - "6" . - . - "9" . - "1" . - "3" . - "4" . - . - . - "5" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl deleted file mode 100644 index 9924fa09..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:template "c/{$.id}" ; - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/data.json b/src/test/resources/rml-cc/RMLTC-CC-0002-List/data.json deleted file mode 100644 index 147b8e51..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/data.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - }, - { - "id": "c", - "values": [ - "7", - "8", - "9" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0002-List/default.nq deleted file mode 100644 index 9f03fd79..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/default.nq +++ /dev/null @@ -1,21 +0,0 @@ -_:nb73dd869d6bb47a5b865ee632fe27453b1 _:nb73dd869d6bb47a5b865ee632fe27453b2 . - . - "7" . -_:nb73dd869d6bb47a5b865ee632fe27453b5 "8" . -_:nb73dd869d6bb47a5b865ee632fe27453b3 _:nb73dd869d6bb47a5b865ee632fe27453b4 . -_:nb73dd869d6bb47a5b865ee632fe27453b6 . - . -_:nb73dd869d6bb47a5b865ee632fe27453b3 "5" . - _:nb73dd869d6bb47a5b865ee632fe27453b3 . -_:nb73dd869d6bb47a5b865ee632fe27453b4 "6" . -_:nb73dd869d6bb47a5b865ee632fe27453b4 . -_:nb73dd869d6bb47a5b865ee632fe27453b5 _:nb73dd869d6bb47a5b865ee632fe27453b6 . -_:nb73dd869d6bb47a5b865ee632fe27453b2 . -_:nb73dd869d6bb47a5b865ee632fe27453b1 "2" . -_:nb73dd869d6bb47a5b865ee632fe27453b2 "3" . - "4" . - _:nb73dd869d6bb47a5b865ee632fe27453b1 . - _:nb73dd869d6bb47a5b865ee632fe27453b5 . -_:nb73dd869d6bb47a5b865ee632fe27453b6 "9" . - . - "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl deleted file mode 100644 index 77149652..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:template "c/{$.id}" ; - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/default.nq deleted file mode 100644 index 5575c4f9..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/default.nq +++ /dev/null @@ -1,7 +0,0 @@ -_:nfecac3cfe48c4afa99539cc809138e96b2 . - _:nfecac3cfe48c4afa99539cc809138e96b1 . -_:nfecac3cfe48c4afa99539cc809138e96b1 . -_:nfecac3cfe48c4afa99539cc809138e96b1 "1" . - _:nfecac3cfe48c4afa99539cc809138e96b2 . -_:nfecac3cfe48c4afa99539cc809138e96b1 "2" . -_:nfecac3cfe48c4afa99539cc809138e96b1 "3" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl deleted file mode 100644 index 7ed744a7..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:allowEmptyListAndContainer true ; - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/default.nq deleted file mode 100644 index 08797495..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/default.nq +++ /dev/null @@ -1,8 +0,0 @@ -_:n302eecc856b44ed5b76965d9be2f5213b3 . - . -_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . -_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . -_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . -_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . - _:n302eecc856b44ed5b76965d9be2f5213b1 . -_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl deleted file mode 100644 index a3545827..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:template "c/{$.id}" ; rml:termType rml:BlankNode ; - rml:allowEmptyListAndContainer true ; - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/default.nq deleted file mode 100644 index d357d49b..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/default.nq +++ /dev/null @@ -1,8 +0,0 @@ -_:n302eecc856b44ed5b76965d9be2f5213b3 . - . -_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . -_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . -_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . - _:n302eecc856b44ed5b76965d9be2f5213b2 . - . - "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl deleted file mode 100644 index 8bed79e7..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:template "c/{$.id}" ; - rml:allowEmptyListAndContainer true ; - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/default.nq deleted file mode 100644 index 08797495..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/default.nq +++ /dev/null @@ -1,8 +0,0 @@ -_:n302eecc856b44ed5b76965d9be2f5213b3 . - . -_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . -_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . -_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . -_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . - _:n302eecc856b44ed5b76965d9be2f5213b1 . -_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl deleted file mode 100644 index 87f8919e..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:allowEmptyListAndContainer true ; - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/default.nq deleted file mode 100644 index 3d4d463e..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - _:n2bd72de9c571444081890e41009d92d4b1 . -_:n2bd72de9c571444081890e41009d92d4b1 "3" . -_:n2bd72de9c571444081890e41009d92d4b1 . -_:n2bd72de9c571444081890e41009d92d4b1 "2" . -_:n2bd72de9c571444081890e41009d92d4b1 "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl deleted file mode 100644 index 20d9348f..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/default.nq deleted file mode 100644 index 5acbac25..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/default.nq +++ /dev/null @@ -1,7 +0,0 @@ -_:n434c2c54e09e4a259604ba1188ce038fb1 _:n434c2c54e09e4a259604ba1188ce038fb2 . -_:n434c2c54e09e4a259604ba1188ce038fb3 . -_:n434c2c54e09e4a259604ba1188ce038fb2 "2" . - _:n434c2c54e09e4a259604ba1188ce038fb1 . -_:n434c2c54e09e4a259604ba1188ce038fb2 _:n434c2c54e09e4a259604ba1188ce038fb3 . -_:n434c2c54e09e4a259604ba1188ce038fb1 "1" . -_:n434c2c54e09e4a259604ba1188ce038fb3 "3" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl deleted file mode 100644 index ca963e35..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/default.nq deleted file mode 100644 index 5acbac25..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/default.nq +++ /dev/null @@ -1,7 +0,0 @@ -_:n434c2c54e09e4a259604ba1188ce038fb1 _:n434c2c54e09e4a259604ba1188ce038fb2 . -_:n434c2c54e09e4a259604ba1188ce038fb3 . -_:n434c2c54e09e4a259604ba1188ce038fb2 "2" . - _:n434c2c54e09e4a259604ba1188ce038fb1 . -_:n434c2c54e09e4a259604ba1188ce038fb2 _:n434c2c54e09e4a259604ba1188ce038fb3 . -_:n434c2c54e09e4a259604ba1188ce038fb1 "1" . -_:n434c2c54e09e4a259604ba1188ce038fb3 "3" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl deleted file mode 100644 index 6da934ad..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:allowEmptyListAndContainer false ; - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/data.json deleted file mode 100644 index 7e67671c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/data.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/default.nq deleted file mode 100644 index f2aca1cc..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/default.nq +++ /dev/null @@ -1,14 +0,0 @@ -_:n302eecc856b44ed5b76965d9be2f5213b1 . -_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . -_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . -_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . -_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . -_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . -_:n302eecc856b44ed5b76965d9be2f5213b3 . -_:n1d393f12e993411498da676131f81ca4b1 . -_:n1d393f12e993411498da676131f81ca4b1 "4" . -_:n1d393f12e993411498da676131f81ca4b1 _:n1d393f12e993411498da676131f81ca4b2 . -_:n1d393f12e993411498da676131f81ca4b2 "5" . -_:n1d393f12e993411498da676131f81ca4b2 _:n1d393f12e993411498da676131f81ca4b3 . -_:n1d393f12e993411498da676131f81ca4b3 "6" . -_:n1d393f12e993411498da676131f81ca4b3 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl deleted file mode 100644 index 19eee717..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:createdBy ; - rml:object ex:JohnDoe ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/data.json deleted file mode 100644 index 7e67671c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/data.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/default.nq deleted file mode 100644 index bbde605c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/default.nq +++ /dev/null @@ -1,12 +0,0 @@ -_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . -_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . -_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . -_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . -_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . -_:n302eecc856b44ed5b76965d9be2f5213b3 . -_:n1d393f12e993411498da676131f81ca4b1 "4" . -_:n1d393f12e993411498da676131f81ca4b1 _:n1d393f12e993411498da676131f81ca4b2 . -_:n1d393f12e993411498da676131f81ca4b2 "5" . -_:n1d393f12e993411498da676131f81ca4b2 _:n1d393f12e993411498da676131f81ca4b3 . -_:n1d393f12e993411498da676131f81ca4b3 "6" . -_:n1d393f12e993411498da676131f81ca4b3 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl deleted file mode 100644 index b0db209a..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/default.nq deleted file mode 100644 index 738b922b..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/default.nq +++ /dev/null @@ -1,6 +0,0 @@ -_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 "1" . -_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 . -_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 "3" . -_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 . -_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 "2" . -_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl deleted file mode 100644 index b0db209a..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/data.json deleted file mode 100644 index 7e67671c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/data.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [ - "4", - "5", - "6" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/default.nq deleted file mode 100644 index 31ab141d..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/default.nq +++ /dev/null @@ -1,10 +0,0 @@ -_:n1d393f12e993411498da676131f81ca4b1 "2" . -_:n1d393f12e993411498da676131f81ca4b2 "5" . -_:n1d393f12e993411498da676131f81ca4b1 "1" . -_:n1d393f12e993411498da676131f81ca4b2 . -_:n1d393f12e993411498da676131f81ca4b2 . -_:n1d393f12e993411498da676131f81ca4b1 "3" . -_:n1d393f12e993411498da676131f81ca4b2 "4" . -_:n1d393f12e993411498da676131f81ca4b1 . -_:n1d393f12e993411498da676131f81ca4b1 . -_:n1d393f12e993411498da676131f81ca4b2 "6" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl deleted file mode 100644 index a6f85e5e..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:createdBy ; - rml:object ex:JohnDoe ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/data.json deleted file mode 100644 index f7975acd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/data.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "2", - "3" - ] - }, - { - "id": "b", - "values": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/default.nq deleted file mode 100644 index 65c2c2c3..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/default.nq +++ /dev/null @@ -1,4 +0,0 @@ -_:ne32066984b71404a953025d001cd3cdfb1 . -_:ne32066984b71404a953025d001cd3cdfb1 "2" . -_:ne32066984b71404a953025d001cd3cdfb1 "1" . -_:ne32066984b71404a953025d001cd3cdfb1 "3" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl deleted file mode 100644 index b8cbc6a9..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/data.json b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/data.json deleted file mode 100644 index f0feba6b..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/data.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "a", - "v1": [ - "1", - "2" - ], - "v2": [ - "a", - "b" - ] - }, - { - "id": "b", - "v1": [ - "3", - "4" - ], - "v2": [ - "c" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/default.nq deleted file mode 100644 index 7fe03c50..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/default.nq +++ /dev/null @@ -1,16 +0,0 @@ - _:n1ee4a5a2b1344422919d171ab2cd6c39b1 . -_:n1ee4a5a2b1344422919d171ab2cd6c39b1 "1" . -_:n1ee4a5a2b1344422919d171ab2cd6c39b1 _:n1ee4a5a2b1344422919d171ab2cd6c39b2 . -_:n1ee4a5a2b1344422919d171ab2cd6c39b2 "2" . -_:n1ee4a5a2b1344422919d171ab2cd6c39b2 _:n1ee4a5a2b1344422919d171ab2cd6c39b4 . -_:n1ee4a5a2b1344422919d171ab2cd6c39b4 "a" . -_:n1ee4a5a2b1344422919d171ab2cd6c39b4 _:n1ee4a5a2b1344422919d171ab2cd6c39b5 . -_:n1ee4a5a2b1344422919d171ab2cd6c39b5 "b" . -_:n1ee4a5a2b1344422919d171ab2cd6c39b5 . - _:n1ee4a5a2b1344422919d171ab2cd6c39b6 . -_:n1ee4a5a2b1344422919d171ab2cd6c39b6 "3" . -_:n1ee4a5a2b1344422919d171ab2cd6c39b6 _:n1ee4a5a2b1344422919d171ab2cd6c39b7 . -_:n1ee4a5a2b1344422919d171ab2cd6c39b7 "4" . -_:n1ee4a5a2b1344422919d171ab2cd6c39b7 _:n1ee4a5a2b1344422919d171ab2cd6c39b8 . -_:n1ee4a5a2b1344422919d171ab2cd6c39b8 "c" . -_:n1ee4a5a2b1344422919d171ab2cd6c39b8 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl deleted file mode 100644 index b8b8b2f4..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/data.json b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/data.json deleted file mode 100644 index 520fa6fd..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/data.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "a", - "v1": [ - "1", - "2", - "3" - ], - "v2": [ - "a", - "b" - ] - }, - { - "id": "b", - "v1": [ - "4", - "5", - "6" - ], - "v2": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/default.nq deleted file mode 100644 index 90196c4e..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/default.nq +++ /dev/null @@ -1,18 +0,0 @@ -_:n1d9b8ef217cb44f299a062d746116deab1 _:n1d9b8ef217cb44f299a062d746116deab2 . -_:n1d9b8ef217cb44f299a062d746116deab5 "b" . -_:n1d9b8ef217cb44f299a062d746116deab4 _:n1d9b8ef217cb44f299a062d746116deab5 . -_:n1d9b8ef217cb44f299a062d746116deab3 _:n1d9b8ef217cb44f299a062d746116deab4 . -_:n1d9b8ef217cb44f299a062d746116deab7 "5" . -_:n1d9b8ef217cb44f299a062d746116deab2 "2" . -_:n1d9b8ef217cb44f299a062d746116deab8 "6" . -_:n1d9b8ef217cb44f299a062d746116deab8 . -_:n1d9b8ef217cb44f299a062d746116deab3 "3" . -_:n1d9b8ef217cb44f299a062d746116deab4 "a" . -_:n1d9b8ef217cb44f299a062d746116deab5 . -_:n1d9b8ef217cb44f299a062d746116deab2 _:n1d9b8ef217cb44f299a062d746116deab3 . -_:n1d9b8ef217cb44f299a062d746116deab1 "1" . - _:n1d9b8ef217cb44f299a062d746116deab1 . - _:n1d9b8ef217cb44f299a062d746116deab6 . -_:n1d9b8ef217cb44f299a062d746116deab7 _:n1d9b8ef217cb44f299a062d746116deab8 . -_:n1d9b8ef217cb44f299a062d746116deab6 _:n1d9b8ef217cb44f299a062d746116deab7 . -_:n1d9b8ef217cb44f299a062d746116deab6 "4" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl deleted file mode 100644 index b8b8b2f4..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/data.json b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/data.json deleted file mode 100644 index f0feba6b..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/data.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "a", - "v1": [ - "1", - "2" - ], - "v2": [ - "a", - "b" - ] - }, - { - "id": "b", - "v1": [ - "3", - "4" - ], - "v2": [ - "c" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/default.nq deleted file mode 100644 index 08d0c5e1..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/default.nq +++ /dev/null @@ -1,35 +0,0 @@ - _:nfc398e5692654ca98dfb3fb5432d277cb1 . -_:nfc398e5692654ca98dfb3fb5432d277cb1 "1" . -_:nfc398e5692654ca98dfb3fb5432d277cb1 _:nfc398e5692654ca98dfb3fb5432d277cb2 . -_:nfc398e5692654ca98dfb3fb5432d277cb2 . -_:nfc398e5692654ca98dfb3fb5432d277cb2 "a" . - - _:nfc398e5692654ca98dfb3fb5432d277cb3 . -_:nfc398e5692654ca98dfb3fb5432d277cb3 "1" . -_:nfc398e5692654ca98dfb3fb5432d277cb3 _:nfc398e5692654ca98dfb3fb5432d277cb4 . -_:nfc398e5692654ca98dfb3fb5432d277cb4 "b" . -_:nfc398e5692654ca98dfb3fb5432d277cb4 . - - _:nfc398e5692654ca98dfb3fb5432d277cb5 . -_:nfc398e5692654ca98dfb3fb5432d277cb5 "2" . -_:nfc398e5692654ca98dfb3fb5432d277cb5 _:nfc398e5692654ca98dfb3fb5432d277cb6 . -_:nfc398e5692654ca98dfb3fb5432d277cb6 "a" . -_:nfc398e5692654ca98dfb3fb5432d277cb6 . - - _:nfc398e5692654ca98dfb3fb5432d277cb7 . -_:nfc398e5692654ca98dfb3fb5432d277cb7 "2" . -_:nfc398e5692654ca98dfb3fb5432d277cb7 _:nfc398e5692654ca98dfb3fb5432d277cb8 . -_:nfc398e5692654ca98dfb3fb5432d277cb8 "b" . -_:nfc398e5692654ca98dfb3fb5432d277cb8 . - - _:nfc398e5692654ca98dfb3fb5432d277cb9 . -_:nfc398e5692654ca98dfb3fb5432d277cb9 "3" . -_:nfc398e5692654ca98dfb3fb5432d277cb9 _:nfc398e5692654ca98dfb3fb5432d277cb10 . -_:nfc398e5692654ca98dfb3fb5432d277cb10 "c" . -_:nfc398e5692654ca98dfb3fb5432d277cb10 . - - _:nfc398e5692654ca98dfb3fb5432d277cb11 . -_:nfc398e5692654ca98dfb3fb5432d277cb11 "4" . -_:nfc398e5692654ca98dfb3fb5432d277cb11 _:nfc398e5692654ca98dfb3fb5432d277cb12 . -_:nfc398e5692654ca98dfb3fb5432d277cb12 "c" . -_:nfc398e5692654ca98dfb3fb5432d277cb12 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl deleted file mode 100644 index 6a91a0db..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; - rml:gatherAs rdf:List ; - rml:strategy rml:cartesianProduct ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/data.json b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/data.json deleted file mode 100644 index 0f90f8b0..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/data.json +++ /dev/null @@ -1,21 +0,0 @@ -[ - { - "id": "a", - "v1": [ - "1", - "2" - ], - "v2": [ - "a", - "b" - ] - }, - { - "id": "b", - "v1": [ - "3", - "4" - ], - "v2": [] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/default.nq deleted file mode 100644 index b13c08de..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/default.nq +++ /dev/null @@ -1,23 +0,0 @@ - _:nfc398e5692654ca98dfb3fb5432d277cb1 . -_:nfc398e5692654ca98dfb3fb5432d277cb1 "1" . -_:nfc398e5692654ca98dfb3fb5432d277cb1 _:nfc398e5692654ca98dfb3fb5432d277cb2 . -_:nfc398e5692654ca98dfb3fb5432d277cb2 . -_:nfc398e5692654ca98dfb3fb5432d277cb2 "a" . - - _:nfc398e5692654ca98dfb3fb5432d277cb3 . -_:nfc398e5692654ca98dfb3fb5432d277cb3 "1" . -_:nfc398e5692654ca98dfb3fb5432d277cb3 _:nfc398e5692654ca98dfb3fb5432d277cb4 . -_:nfc398e5692654ca98dfb3fb5432d277cb4 "b" . -_:nfc398e5692654ca98dfb3fb5432d277cb4 . - - _:nfc398e5692654ca98dfb3fb5432d277cb5 . -_:nfc398e5692654ca98dfb3fb5432d277cb5 "2" . -_:nfc398e5692654ca98dfb3fb5432d277cb5 _:nfc398e5692654ca98dfb3fb5432d277cb6 . -_:nfc398e5692654ca98dfb3fb5432d277cb6 "a" . -_:nfc398e5692654ca98dfb3fb5432d277cb6 . - - _:nfc398e5692654ca98dfb3fb5432d277cb7 . -_:nfc398e5692654ca98dfb3fb5432d277cb7 "2" . -_:nfc398e5692654ca98dfb3fb5432d277cb7 _:nfc398e5692654ca98dfb3fb5432d277cb8 . -_:nfc398e5692654ca98dfb3fb5432d277cb8 "b" . -_:nfc398e5692654ca98dfb3fb5432d277cb8 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl deleted file mode 100644 index 6a91a0db..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; - rml:gatherAs rdf:List ; - rml:strategy rml:cartesianProduct ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/data.json deleted file mode 100644 index a17afe2c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/data.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "a", - "v1": [ - "1", - "2" - ] - }, - { - "id": "b", - "v1": [ - "3", - "4" - ] - }, - { - "id": "a", - "v1": [ - "5", - "6" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/default.nq deleted file mode 100644 index 0a2aebe1..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/default.nq +++ /dev/null @@ -1,17 +0,0 @@ - _:n9d785cd672d3484cb5d9fd831e6dfc07b1 . -_:n9d785cd672d3484cb5d9fd831e6dfc07b1 "1" . -_:n9d785cd672d3484cb5d9fd831e6dfc07b1 _:n9d785cd672d3484cb5d9fd831e6dfc07b2 . -_:n9d785cd672d3484cb5d9fd831e6dfc07b2 "2" . -_:n9d785cd672d3484cb5d9fd831e6dfc07b2 . - - _:n9d785cd672d3484cb5d9fd831e6dfc07b5 . -_:n9d785cd672d3484cb5d9fd831e6dfc07b5 "3" . -_:n9d785cd672d3484cb5d9fd831e6dfc07b5 _:n9d785cd672d3484cb5d9fd831e6dfc07b6 . -_:n9d785cd672d3484cb5d9fd831e6dfc07b6 "4" . -_:n9d785cd672d3484cb5d9fd831e6dfc07b6 . - - _:n9d785cd672d3484cb5d9fd831e6dfc07b3 . -_:n9d785cd672d3484cb5d9fd831e6dfc07b3 "5" . -_:n9d785cd672d3484cb5d9fd831e6dfc07b3 _:n9d785cd672d3484cb5d9fd831e6dfc07b4 . -_:n9d785cd672d3484cb5d9fd831e6dfc07b4 "6" . -_:n9d785cd672d3484cb5d9fd831e6dfc07b4 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl deleted file mode 100644 index 0a156f5c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/data.json deleted file mode 100644 index a17afe2c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/data.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "a", - "v1": [ - "1", - "2" - ] - }, - { - "id": "b", - "v1": [ - "3", - "4" - ] - }, - { - "id": "a", - "v1": [ - "5", - "6" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/default.nq deleted file mode 100644 index 40500379..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/default.nq +++ /dev/null @@ -1,15 +0,0 @@ - . - "1" . - _:nab8f496caee443c5ac19ce3a109f4b22b1 . -_:nab8f496caee443c5ac19ce3a109f4b22b1 "2" . -_:nab8f496caee443c5ac19ce3a109f4b22b1 _:nab8f496caee443c5ac19ce3a109f4b22b2 . -_:nab8f496caee443c5ac19ce3a109f4b22b2 "5" . -_:nab8f496caee443c5ac19ce3a109f4b22b2 _:nab8f496caee443c5ac19ce3a109f4b22b3 . -_:nab8f496caee443c5ac19ce3a109f4b22b3 "6" . -_:nab8f496caee443c5ac19ce3a109f4b22b3 . - - . - "3" . - _:nab8f496caee443c5ac19ce3a109f4b22b4 . -_:nab8f496caee443c5ac19ce3a109f4b22b4 "4" . -_:nab8f496caee443c5ac19ce3a109f4b22b4 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl deleted file mode 100644 index 847277ca..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:template "c/{$.id}" ; - rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/data.json deleted file mode 100644 index ab3d8c52..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/data.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - { - "id": "a", - "v1": [ - "1", - "2" - ], - "v2": [ - "a", - "b" - ] - }, - { - "id": "b", - "v1": [ - "3", - "4" - ], - "v2": [ - "c" - ] - }, - { - "id": "a", - "v1": [ - "5", - "6" - ], - "v2": [ - "d", - "e" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/default.nq deleted file mode 100644 index d66af6fb..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/default.nq +++ /dev/null @@ -1,25 +0,0 @@ - . - "1" . - _:n0cbb21ce98464358963007f95dc35c0ab1 . -_:n0cbb21ce98464358963007f95dc35c0ab1 "2" . -_:n0cbb21ce98464358963007f95dc35c0ab1 _:n0cbb21ce98464358963007f95dc35c0ab2 . -_:n0cbb21ce98464358963007f95dc35c0ab2 "a" . -_:n0cbb21ce98464358963007f95dc35c0ab2 _:n0cbb21ce98464358963007f95dc35c0ab3 . -_:n0cbb21ce98464358963007f95dc35c0ab3 "b" . -_:n0cbb21ce98464358963007f95dc35c0ab3 _:n0cbb21ce98464358963007f95dc35c0ab4 . -_:n0cbb21ce98464358963007f95dc35c0ab4 "5" . -_:n0cbb21ce98464358963007f95dc35c0ab4 _:n0cbb21ce98464358963007f95dc35c0ab5 . -_:n0cbb21ce98464358963007f95dc35c0ab5 "6" . -_:n0cbb21ce98464358963007f95dc35c0ab5 _:n0cbb21ce98464358963007f95dc35c0ab6 . -_:n0cbb21ce98464358963007f95dc35c0ab6 "d" . -_:n0cbb21ce98464358963007f95dc35c0ab6 _:n0cbb21ce98464358963007f95dc35c0ab7 . -_:n0cbb21ce98464358963007f95dc35c0ab7 "e" . -_:n0cbb21ce98464358963007f95dc35c0ab7 . - - . - "3" . - _:n0cbb21ce98464358963007f95dc35c0ab8 . -_:n0cbb21ce98464358963007f95dc35c0ab8 "4" . -_:n0cbb21ce98464358963007f95dc35c0ab8 _:n0cbb21ce98464358963007f95dc35c0ab9 . -_:n0cbb21ce98464358963007f95dc35c0ab9 "c" . -_:n0cbb21ce98464358963007f95dc35c0ab9 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl deleted file mode 100644 index 14e90fed..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:template "c/{$.id}" ; - rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/data.json b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/data.json deleted file mode 100644 index f0feba6b..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/data.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "a", - "v1": [ - "1", - "2" - ], - "v2": [ - "a", - "b" - ] - }, - { - "id": "b", - "v1": [ - "3", - "4" - ], - "v2": [ - "c" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/default.nq deleted file mode 100644 index cdfac164..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/default.nq +++ /dev/null @@ -1,29 +0,0 @@ -_:nab9af1206e584ab2afd457e8a605872cb1 . -_:nab9af1206e584ab2afd457e8a605872cb1 "1" . -_:nab9af1206e584ab2afd457e8a605872cb1 "2" . - -_:nab9af1206e584ab2afd457e8a605872cb2 . -_:nab9af1206e584ab2afd457e8a605872cb2 "a" . -_:nab9af1206e584ab2afd457e8a605872cb2 "b" . - -_:nab9af1206e584ab2afd457e8a605872cb5 . -_:nab9af1206e584ab2afd457e8a605872cb5 "3" . -_:nab9af1206e584ab2afd457e8a605872cb5 "4" . - -_:nab9af1206e584ab2afd457e8a605872cb6 . -_:nab9af1206e584ab2afd457e8a605872cb6 "c" . - - _:nab9af1206e584ab2afd457e8a605872cb3 . -_:nab9af1206e584ab2afd457e8a605872cb3 _:nab9af1206e584ab2afd457e8a605872cb1 . -_:nab9af1206e584ab2afd457e8a605872cb3 _:nab9af1206e584ab2afd457e8a605872cb4 . - -_:nab9af1206e584ab2afd457e8a605872cb4 _:nab9af1206e584ab2afd457e8a605872cb2 . -_:nab9af1206e584ab2afd457e8a605872cb4 . - - _:nab9af1206e584ab2afd457e8a605872cb7 . -_:nab9af1206e584ab2afd457e8a605872cb7 _:nab9af1206e584ab2afd457e8a605872cb5 . -_:nab9af1206e584ab2afd457e8a605872cb7 _:nab9af1206e584ab2afd457e8a605872cb8 . - -_:nab9af1206e584ab2afd457e8a605872cb8 _:nab9af1206e584ab2afd457e8a605872cb6 . -_:nab9af1206e584ab2afd457e8a605872cb8 . - diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl deleted file mode 100644 index 98d2787a..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( - [ - rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] - [ - rml:gather ( [ rml:reference "$.v2.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] - ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/default.nq deleted file mode 100644 index 347e6c80..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/default.nq +++ /dev/null @@ -1,13 +0,0 @@ -_:genid1 . -_:genid1 _:genid2 . -_:genid2 . -_:genid2 . - _:genid1 . -_:genid3 . -_:genid3 _:genid4 . -_:genid4 . -_:genid4 . - _:genid3 . -_:genid5 . -_:genid5 . - _:genid5 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl deleted file mode 100644 index 26953922..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix ex: . -@prefix rml: . -@prefix rdf: . - -_:b273446 a rml:RelativePathSource ; - rml:path "student.csv" . - - a rml:TriplesMap ; - rml:logicalSource [ a rml:LogicalSource ; - rml:referenceFormulation rml:CSV ; - rml:source _:b273446 ] ; - - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" ; rml:termType rml:BlankNode ; - rml:gather ( - [ - rml:parentTriplesMap ; - rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ; - ] - ) ; - rml:gatherAs rdf:List; - ] ; - rml:predicate ex:sameSportAs - ] ; - - rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/student.csv b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/student.csv deleted file mode 100644 index 8a96794b..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/student.csv +++ /dev/null @@ -1,4 +0,0 @@ -ID,Name,Sport -10,Venus Williams,Tennis -20,Serena Williams,Tennis -30,Loena Hendrickx,Figure skating diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/default.nq deleted file mode 100644 index 8c6f63e9..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/default.nq +++ /dev/null @@ -1,9 +0,0 @@ -_:genid1 . -_:genid1 . - _:genid1 . -_:genid2 . -_:genid2 . - _:genid2 . -_:genid3 . -_:genid3 . - _:genid3 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl deleted file mode 100644 index b1ce8c6c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix ex: . -@prefix rml: . -@prefix rdf: . - -_:b273446 a rml:RelativePathSource ; - rml:path "student.csv" . - - a rml:TriplesMap ; - rml:logicalSource [ a rml:LogicalSource ; - rml:referenceFormulation rml:CSV ; - rml:source _:b273446 ] ; - - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" ; rml:termType rml:BlankNode ; - rml:gather ( - [ - rml:parentTriplesMap ; - ] - ) ; - rml:gatherAs rdf:List; - ] ; - rml:predicate ex:sameSportAs - ] ; - - rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] . - diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/student.csv b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/student.csv deleted file mode 100644 index 8a96794b..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/student.csv +++ /dev/null @@ -1,4 +0,0 @@ -ID,Name,Sport -10,Venus Williams,Tennis -20,Serena Williams,Tennis -30,Loena Hendrickx,Figure skating diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/data.json b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/data.json deleted file mode 100644 index cad65771..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/data.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "1", - "1" - ] - }, - { - "id": "b", - "values": [ - "2", - "2", - "6" - ] - }, - { - "id": "c", - "values": [ - "7", - "8", - "9" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq deleted file mode 100644 index 572b5c84..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq +++ /dev/null @@ -1,15 +0,0 @@ -_:nc808fbd2e11a4baa939c61c8210b5909b1 . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "2" . -_:nc808fbd2e11a4baa939c61c8210b5909b2 . -_:nc808fbd2e11a4baa939c61c8210b5909b3 . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . - _:nc808fbd2e11a4baa939c61c8210b5909b2 . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . - _:nc808fbd2e11a4baa939c61c8210b5909b3 . - _:nc808fbd2e11a4baa939c61c8210b5909b1 . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "2" . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . -_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . -_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . -_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl deleted file mode 100644 index 20d9348f..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:Bag ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/data.json b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/data.json deleted file mode 100644 index cad65771..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/data.json +++ /dev/null @@ -1,26 +0,0 @@ -[ - { - "id": "a", - "values": [ - "1", - "1", - "1" - ] - }, - { - "id": "b", - "values": [ - "2", - "2", - "6" - ] - }, - { - "id": "c", - "values": [ - "7", - "8", - "9" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/default.nq deleted file mode 100644 index 9a73f638..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/default.nq +++ /dev/null @@ -1,23 +0,0 @@ - _:n988e0f11d19c486fa3b3255f94c9b3bab1 . -_:n988e0f11d19c486fa3b3255f94c9b3bab1 "1" . -_:n988e0f11d19c486fa3b3255f94c9b3bab1 _:n988e0f11d19c486fa3b3255f94c9b3bab2 . -_:n988e0f11d19c486fa3b3255f94c9b3bab2 "1" . -_:n988e0f11d19c486fa3b3255f94c9b3bab2 _:n988e0f11d19c486fa3b3255f94c9b3bab3 . -_:n988e0f11d19c486fa3b3255f94c9b3bab3 "1" . -_:n988e0f11d19c486fa3b3255f94c9b3bab3 . - - _:n988e0f11d19c486fa3b3255f94c9b3bab4 . -_:n988e0f11d19c486fa3b3255f94c9b3bab4 "2" . -_:n988e0f11d19c486fa3b3255f94c9b3bab4 _:n988e0f11d19c486fa3b3255f94c9b3bab5 . -_:n988e0f11d19c486fa3b3255f94c9b3bab5 "2" . -_:n988e0f11d19c486fa3b3255f94c9b3bab5 _:n988e0f11d19c486fa3b3255f94c9b3bab6 . -_:n988e0f11d19c486fa3b3255f94c9b3bab6 "6" . -_:n988e0f11d19c486fa3b3255f94c9b3bab6 . - - _:n988e0f11d19c486fa3b3255f94c9b3bab7 . -_:n988e0f11d19c486fa3b3255f94c9b3bab7 "7" . -_:n988e0f11d19c486fa3b3255f94c9b3bab7 _:n988e0f11d19c486fa3b3255f94c9b3bab8 . -_:n988e0f11d19c486fa3b3255f94c9b3bab8 "8" . -_:n988e0f11d19c486fa3b3255f94c9b3bab8 _:n988e0f11d19c486fa3b3255f94c9b3bab9 . -_:n988e0f11d19c486fa3b3255f94c9b3bab9 "9" . -_:n988e0f11d19c486fa3b3255f94c9b3bab9 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl deleted file mode 100644 index ca963e35..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-List/data.json b/src/test/resources/rml-cc/RMLTC-CC-0010-List/data.json deleted file mode 100644 index f85e5b77..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-List/data.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "a", - "graph": "1", - "values": [ - "1" - ] - }, - { - "id": "a", - "graph": "2", - "values": [ - "2" - ] - }, - { - "id": "a", - "graph": "1", - "values": [ - "3" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-List/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0010-List/default.nq deleted file mode 100644 index ac2b7e3c..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-List/default.nq +++ /dev/null @@ -1,10 +0,0 @@ -_:genid1 "1" . -_:genid1 . -_:genid2 "3" . -_:genid2 . - _:genid1 . - _:genid2 . - -_:genidx1 "2" . -_:genidx1 . - _:genidx1 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-List/mapping.ttl deleted file mode 100644 index 1dd36510..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-List/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:graphMap [ rml:template "g/{$.graph}" ; ] ; - rml:predicate ex:with ; - rml:objectMap [ - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/data.json b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/data.json deleted file mode 100644 index f85e5b77..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/data.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "id": "a", - "graph": "1", - "values": [ - "1" - ] - }, - { - "id": "a", - "graph": "2", - "values": [ - "2" - ] - }, - { - "id": "a", - "graph": "1", - "values": [ - "3" - ] - } -] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/default.nq deleted file mode 100644 index 027db1b2..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/default.nq +++ /dev/null @@ -1,9 +0,0 @@ -_:genid1 "1" . -_:genid1 _:genid2 . -_:genid2 "3" . -_:genid2 . - _:genid1 . - -_:genidx1 "2" . -_:genidx1 . - _:genidx1 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl deleted file mode 100644 index 230573f4..00000000 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix rml: . -@prefix rdf: . -@prefix ex: . -@base . - -<#TM> a rml:TriplesMap; - rml:logicalSource [ - rml:source _:b738439 ; - rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; - ] ; - - rml:subjectMap [ - rml:template "e/{$.id}" ; - ] ; - - rml:predicateObjectMap [ - rml:graphMap [ rml:template "g/{$.graph}" ; ] ; - rml:predicate ex:with ; - rml:objectMap [ - rml:template "l/{$.id}" ; rml:termType rml:BlankNode ; - rml:gather ( [ rml:reference "$.values.*" ; ] ) ; - rml:gatherAs rdf:List ; - ] ; - ] ; -. - -_:b738439 a rml:RelativePathSource ; - rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0000-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0000-CSV/mapping.ttl deleted file mode 100644 index 6e17117b..00000000 --- a/src/test/resources/rml-core/RMLTC0000-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0000-CSV/output.nq b/src/test/resources/rml-core/RMLTC0000-CSV/output.nq deleted file mode 100644 index ca0b9916..00000000 --- a/src/test/resources/rml-core/RMLTC0000-CSV/output.nq +++ /dev/null @@ -1 +0,0 @@ -# empty database diff --git a/src/test/resources/rml-core/RMLTC0000-CSV/student.csv b/src/test/resources/rml-core/RMLTC0000-CSV/student.csv deleted file mode 100644 index 70df60c1..00000000 --- a/src/test/resources/rml-core/RMLTC0000-CSV/student.csv +++ /dev/null @@ -1 +0,0 @@ -Name diff --git a/src/test/resources/rml-core/RMLTC0000-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0000-JSON/mapping.ttl deleted file mode 100644 index 3c738425..00000000 --- a/src/test/resources/rml-core/RMLTC0000-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0000-JSON/output.nq b/src/test/resources/rml-core/RMLTC0000-JSON/output.nq deleted file mode 100644 index ca0b9916..00000000 --- a/src/test/resources/rml-core/RMLTC0000-JSON/output.nq +++ /dev/null @@ -1 +0,0 @@ -# empty database diff --git a/src/test/resources/rml-core/RMLTC0000-JSON/student.json b/src/test/resources/rml-core/RMLTC0000-JSON/student.json deleted file mode 100644 index 81bf2f6a..00000000 --- a/src/test/resources/rml-core/RMLTC0000-JSON/student.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "students": [] -} diff --git a/src/test/resources/rml-core/RMLTC0000-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0000-MySQL/mapping.ttl deleted file mode 100644 index d0ae1084..00000000 --- a/src/test/resources/rml-core/RMLTC0000-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0000-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0000-MySQL/output.nq deleted file mode 100644 index ca0b9916..00000000 --- a/src/test/resources/rml-core/RMLTC0000-MySQL/output.nq +++ /dev/null @@ -1 +0,0 @@ -# empty database diff --git a/src/test/resources/rml-core/RMLTC0000-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0000-MySQL/resource.sql deleted file mode 100644 index 4f7db991..00000000 --- a/src/test/resources/rml-core/RMLTC0000-MySQL/resource.sql +++ /dev/null @@ -1,5 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - Name VARCHAR(50) -); \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0000-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0000-PostgreSQL/mapping.ttl deleted file mode 100644 index 8de32762..00000000 --- a/src/test/resources/rml-core/RMLTC0000-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0000-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0000-PostgreSQL/output.nq deleted file mode 100644 index ca0b9916..00000000 --- a/src/test/resources/rml-core/RMLTC0000-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ -# empty database diff --git a/src/test/resources/rml-core/RMLTC0000-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0000-PostgreSQL/resource.sql deleted file mode 100644 index ea537fa7..00000000 --- a/src/test/resources/rml-core/RMLTC0000-PostgreSQL/resource.sql +++ /dev/null @@ -1,4 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "Name" VARCHAR(50) -); \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0000-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0000-SPARQL/mapping.ttl deleted file mode 100644 index fc910499..00000000 --- a/src/test/resources/rml-core/RMLTC0000-SPARQL/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - SELECT ?name - WHERE { - ?name a rdfs:Literal . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "name.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0000-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0000-SPARQL/output.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-core/RMLTC0000-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0000-SPARQL/resource.ttl deleted file mode 100644 index 8b137891..00000000 --- a/src/test/resources/rml-core/RMLTC0000-SPARQL/resource.ttl +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/test/resources/rml-core/RMLTC0000-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0000-SQLServer/mapping.ttl deleted file mode 100644 index 058c5756..00000000 --- a/src/test/resources/rml-core/RMLTC0000-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0000-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0000-SQLServer/output.nq deleted file mode 100644 index ca0b9916..00000000 --- a/src/test/resources/rml-core/RMLTC0000-SQLServer/output.nq +++ /dev/null @@ -1 +0,0 @@ -# empty database diff --git a/src/test/resources/rml-core/RMLTC0000-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0000-SQLServer/resource.sql deleted file mode 100644 index a5df5fb8..00000000 --- a/src/test/resources/rml-core/RMLTC0000-SQLServer/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "Name" VARCHAR(50) -); diff --git a/src/test/resources/rml-core/RMLTC0000-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0000-XML/mapping.ttl deleted file mode 100644 index 2f1946f8..00000000 --- a/src/test/resources/rml-core/RMLTC0000-XML/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0000-XML/output.nq b/src/test/resources/rml-core/RMLTC0000-XML/output.nq deleted file mode 100644 index ca0b9916..00000000 --- a/src/test/resources/rml-core/RMLTC0000-XML/output.nq +++ /dev/null @@ -1 +0,0 @@ -# empty database diff --git a/src/test/resources/rml-core/RMLTC0000-XML/student.xml b/src/test/resources/rml-core/RMLTC0000-XML/student.xml deleted file mode 100644 index c6bbef41..00000000 --- a/src/test/resources/rml-core/RMLTC0000-XML/student.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/test/resources/rml-core/RMLTC0001a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0001a-CSV/mapping.ttl deleted file mode 100644 index 6e17117b..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0001a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0001a-CSV/output.nq deleted file mode 100644 index 73f40ddf..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0001a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0001a-CSV/student.csv deleted file mode 100644 index 4e683bbe..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -Name -Venus diff --git a/src/test/resources/rml-core/RMLTC0001a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0001a-JSON/mapping.ttl deleted file mode 100644 index 5eaa9c42..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap . - - rml:template "http://example.com/{Name}" . diff --git a/src/test/resources/rml-core/RMLTC0001a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0001a-JSON/output.nq deleted file mode 100644 index 73f40ddf..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-JSON/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0001a-JSON/student.json b/src/test/resources/rml-core/RMLTC0001a-JSON/student.json deleted file mode 100644 index b3ae4c4e..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-JSON/student.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "students": [{ - "Name":"Venus" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0001a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0001a-MySQL/mapping.ttl deleted file mode 100644 index d0ae1084..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0001a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0001a-MySQL/output.nq deleted file mode 100644 index efbb5543..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-MySQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0001a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0001a-MySQL/resource.sql deleted file mode 100644 index b8e2a6c5..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-MySQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - Name VARCHAR(50) -); -INSERT INTO student values ('Venus'); \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/mapping.ttl deleted file mode 100644 index 8de32762..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/output.nq deleted file mode 100644 index efbb5543..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/resource.sql deleted file mode 100644 index 21c51c3f..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-PostgreSQL/resource.sql +++ /dev/null @@ -1,5 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "Name" VARCHAR(50) -); -INSERT INTO student values ('Venus'); diff --git a/src/test/resources/rml-core/RMLTC0001a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0001a-SPARQL/mapping.ttl deleted file mode 100644 index 879676f1..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-SPARQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - SELECT ?name - WHERE { - ?x foaf:name ?name . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "name.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0001a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0001a-SPARQL/output.nq deleted file mode 100644 index efbb5543..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-SPARQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0001a-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0001a-SPARQL/resource.ttl deleted file mode 100644 index ac86df29..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-SPARQL/resource.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix foaf: . - -[] foaf:name "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0001a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0001a-SQLServer/mapping.ttl deleted file mode 100644 index 058c5756..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0001a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0001a-SQLServer/output.nq deleted file mode 100644 index efbb5543..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-SQLServer/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0001a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0001a-SQLServer/resource.sql deleted file mode 100644 index 391b8d53..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "Name" VARCHAR(50) -); -INSERT INTO student values ('Venus'); diff --git a/src/test/resources/rml-core/RMLTC0001a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0001a-XML/mapping.ttl deleted file mode 100644 index 2f1946f8..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-XML/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0001a-XML/output.nq b/src/test/resources/rml-core/RMLTC0001a-XML/output.nq deleted file mode 100644 index 73f40ddf..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-XML/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0001a-XML/student.xml b/src/test/resources/rml-core/RMLTC0001a-XML/student.xml deleted file mode 100644 index f104648b..00000000 --- a/src/test/resources/rml-core/RMLTC0001a-XML/student.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - Venus - - diff --git a/src/test/resources/rml-core/RMLTC0001b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0001b-CSV/mapping.ttl deleted file mode 100644 index 7457432a..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-CSV/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{Name}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0001b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0001b-CSV/output.nq deleted file mode 100644 index 082a16c0..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ -_:Venus "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0001b-CSV/student.csv b/src/test/resources/rml-core/RMLTC0001b-CSV/student.csv deleted file mode 100644 index 4e683bbe..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -Name -Venus diff --git a/src/test/resources/rml-core/RMLTC0001b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0001b-JSON/mapping.ttl deleted file mode 100644 index 3527a427..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-JSON/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{Name}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0001b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0001b-JSON/output.nq deleted file mode 100644 index 082a16c0..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-JSON/output.nq +++ /dev/null @@ -1,2 +0,0 @@ -_:Venus "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0001b-JSON/student.json b/src/test/resources/rml-core/RMLTC0001b-JSON/student.json deleted file mode 100644 index b3ae4c4e..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-JSON/student.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "students": [{ - "Name":"Venus" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0001b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0001b-MySQL/mapping.ttl deleted file mode 100644 index 054eefd1..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0001b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0001b-MySQL/output.nq deleted file mode 100644 index efbb5543..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-MySQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0001b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0001b-MySQL/resource.sql deleted file mode 100644 index 04afa4e1..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-MySQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - Name VARCHAR(50) -); -INSERT INTO student values ('Venus'); diff --git a/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/mapping.ttl deleted file mode 100644 index 43c823a3..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/output.nq deleted file mode 100644 index efbb5543..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/resource.sql deleted file mode 100644 index 601449ad..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-PostgreSQL/resource.sql +++ /dev/null @@ -1,5 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - name VARCHAR(50) -); -INSERT INTO student values ('Venus'); diff --git a/src/test/resources/rml-core/RMLTC0001b-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0001b-SPARQL/mapping.ttl deleted file mode 100644 index 879676f1..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-SPARQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - SELECT ?name - WHERE { - ?x foaf:name ?name . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "name.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0001b-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0001b-SPARQL/output.nq deleted file mode 100644 index efbb5543..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-SPARQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0001b-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0001b-SPARQL/resource.ttl deleted file mode 100644 index ac86df29..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-SPARQL/resource.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix foaf: . - -[] foaf:name "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0001b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0001b-SQLServer/mapping.ttl deleted file mode 100644 index d790ebbc..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0001b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0001b-SQLServer/output.nq deleted file mode 100644 index efbb5543..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-SQLServer/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0001b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0001b-SQLServer/resource.sql deleted file mode 100644 index 391b8d53..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "Name" VARCHAR(50) -); -INSERT INTO student values ('Venus'); diff --git a/src/test/resources/rml-core/RMLTC0001b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0001b-XML/mapping.ttl deleted file mode 100644 index 39297bad..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-XML/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{Name}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0001b-XML/output.nq b/src/test/resources/rml-core/RMLTC0001b-XML/output.nq deleted file mode 100644 index 082a16c0..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-XML/output.nq +++ /dev/null @@ -1,2 +0,0 @@ -_:Venus "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0001b-XML/student.xml b/src/test/resources/rml-core/RMLTC0001b-XML/student.xml deleted file mode 100644 index f104648b..00000000 --- a/src/test/resources/rml-core/RMLTC0001b-XML/student.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - Venus - - diff --git a/src/test/resources/rml-core/RMLTC0002a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0002a-CSV/mapping.ttl deleted file mode 100644 index 3f077d10..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-CSV/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0002a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0002a-CSV/output.nq deleted file mode 100644 index 174309a6..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-CSV/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus" . - "10" . - . - diff --git a/src/test/resources/rml-core/RMLTC0002a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0002a-CSV/student.csv deleted file mode 100644 index df9d2d69..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name -10,Venus diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0002a-JSON/mapping.ttl deleted file mode 100644 index 01e5cf26..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-JSON/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq deleted file mode 100644 index 174309a6..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus" . - "10" . - . - diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/student.json b/src/test/resources/rml-core/RMLTC0002a-JSON/student.json deleted file mode 100644 index 0f6f797f..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-JSON/student.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0002a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002a-MySQL/mapping.ttl deleted file mode 100644 index a858a413..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-MySQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0002a-MySQL/output.nq deleted file mode 100644 index 224747a6..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-MySQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - "10"^^ . - . diff --git a/src/test/resources/rml-core/RMLTC0002a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002a-MySQL/resource.sql deleted file mode 100644 index 3494b58f..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-MySQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); - diff --git a/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/mapping.ttl deleted file mode 100644 index 7a5f9e9f..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/output.nq deleted file mode 100644 index 224747a6..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - "10"^^ . - . diff --git a/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/resource.sql deleted file mode 100644 index 2b4b5bea..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-PostgreSQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); - diff --git a/src/test/resources/rml-core/RMLTC0002a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002a-SPARQL/mapping.ttl deleted file mode 100644 index 27651887..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-SPARQL/mapping.ttl +++ /dev/null @@ -1,38 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?ID - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID.value" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID.value}/{Name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0002a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0002a-SPARQL/output.nq deleted file mode 100644 index ffbc3c4b..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-SPARQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - "10" . - . diff --git a/src/test/resources/rml-core/RMLTC0002a-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0002a-SPARQL/resource.ttl deleted file mode 100644 index da1fb834..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-SPARQL/resource.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:name "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002a-SQLServer/mapping.ttl deleted file mode 100644 index a54a2198..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-SQLServer/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0002a-SQLServer/output.nq deleted file mode 100644 index 224747a6..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-SQLServer/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - "10"^^ . - . diff --git a/src/test/resources/rml-core/RMLTC0002a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002a-SQLServer/resource.sql deleted file mode 100644 index 45bd58c0..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-SQLServer/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student ("ID", "Name") values (10, 'Venus'); - diff --git a/src/test/resources/rml-core/RMLTC0002a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0002a-XML/mapping.ttl deleted file mode 100644 index 4609c397..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-XML/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0002a-XML/output.nq b/src/test/resources/rml-core/RMLTC0002a-XML/output.nq deleted file mode 100644 index 56b13be3..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-XML/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus" . - "10". - . - diff --git a/src/test/resources/rml-core/RMLTC0002a-XML/student.xml b/src/test/resources/rml-core/RMLTC0002a-XML/student.xml deleted file mode 100644 index b2a6a9ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002a-XML/student.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 10 - Venus - - diff --git a/src/test/resources/rml-core/RMLTC0002b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0002b-CSV/mapping.ttl deleted file mode 100644 index 586af8e5..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-CSV/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "students{ID}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0002b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0002b-CSV/output.nq deleted file mode 100644 index be918d0b..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ -_:students10 "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002b-CSV/student.csv b/src/test/resources/rml-core/RMLTC0002b-CSV/student.csv deleted file mode 100644 index df9d2d69..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name -10,Venus diff --git a/src/test/resources/rml-core/RMLTC0002b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0002b-JSON/mapping.ttl deleted file mode 100644 index 79061724..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-JSON/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "students{ID}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0002b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0002b-JSON/output.nq deleted file mode 100644 index be918d0b..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-JSON/output.nq +++ /dev/null @@ -1,2 +0,0 @@ -_:students10 "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002b-JSON/student.json b/src/test/resources/rml-core/RMLTC0002b-JSON/student.json deleted file mode 100644 index 0f6f797f..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-JSON/student.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0002b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002b-MySQL/mapping.ttl deleted file mode 100644 index e0c56e13..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-MySQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "students{ID}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0002b-MySQL/output.nq deleted file mode 100644 index be918d0b..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-MySQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ -_:students10 "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002b-MySQL/resource.sql deleted file mode 100644 index a68415ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/mapping.ttl deleted file mode 100644 index 0cb45551..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "students{ID}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/output.nq deleted file mode 100644 index 407dd744..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ -_:students10 "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/resource.sql deleted file mode 100644 index 80957756..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002b-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002b-SPARQL/mapping.ttl deleted file mode 100644 index e45c8b0e..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-SPARQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?ID - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "students{ID.value}"; - rml:termType rml:BlankNode - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0002b-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0002b-SPARQL/output.nq deleted file mode 100644 index 407dd744..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-SPARQL/output.nq +++ /dev/null @@ -1 +0,0 @@ -_:students10 "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0002b-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0002b-SPARQL/resource.ttl deleted file mode 100644 index da1fb834..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-SPARQL/resource.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:name "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002b-SQLServer/mapping.ttl deleted file mode 100644 index 7e3c5e6e..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-SQLServer/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "students{ID}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0002b-SQLServer/output.nq deleted file mode 100644 index be918d0b..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-SQLServer/output.nq +++ /dev/null @@ -1,2 +0,0 @@ -_:students10 "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002b-SQLServer/resource.sql deleted file mode 100644 index 7403a330..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-SQLServer/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0002b-XML/mapping.ttl deleted file mode 100644 index 9c5dab63..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-XML/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "students{ID}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0002b-XML/output.nq b/src/test/resources/rml-core/RMLTC0002b-XML/output.nq deleted file mode 100644 index be918d0b..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-XML/output.nq +++ /dev/null @@ -1,2 +0,0 @@ -_:students10 "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002b-XML/student.xml b/src/test/resources/rml-core/RMLTC0002b-XML/student.xml deleted file mode 100644 index b2a6a9ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002b-XML/student.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 10 - Venus - - diff --git a/src/test/resources/rml-core/RMLTC0002c-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0002c-CSV/mapping.ttl deleted file mode 100644 index ba00bad1..00000000 --- a/src/test/resources/rml-core/RMLTC0002c-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0002c-CSV/student.csv b/src/test/resources/rml-core/RMLTC0002c-CSV/student.csv deleted file mode 100644 index df9d2d69..00000000 --- a/src/test/resources/rml-core/RMLTC0002c-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name -10,Venus diff --git a/src/test/resources/rml-core/RMLTC0002c-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002c-MySQL/mapping.ttl deleted file mode 100644 index 3b0d881b..00000000 --- a/src/test/resources/rml-core/RMLTC0002c-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002c-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002c-MySQL/resource.sql deleted file mode 100644 index a68415ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002c-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002c-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002c-PostgreSQL/mapping.ttl deleted file mode 100644 index 397c267d..00000000 --- a/src/test/resources/rml-core/RMLTC0002c-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002c-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002c-PostgreSQL/resource.sql deleted file mode 100644 index 80957756..00000000 --- a/src/test/resources/rml-core/RMLTC0002c-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002c-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002c-SQLServer/mapping.ttl deleted file mode 100644 index c3b656d0..00000000 --- a/src/test/resources/rml-core/RMLTC0002c-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002c-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002c-SQLServer/resource.sql deleted file mode 100644 index 7403a330..00000000 --- a/src/test/resources/rml-core/RMLTC0002c-SQLServer/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002d-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002d-MySQL/mapping.ttl deleted file mode 100644 index d4a2bb0f..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-MySQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT CONCAT('Student', ID) AS StudentId, ID, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "StudentId"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002d-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0002d-MySQL/output.nq deleted file mode 100644 index c9ce3cd7..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-MySQL/output.nq +++ /dev/null @@ -1 +0,0 @@ -_:Student10 "Venus". diff --git a/src/test/resources/rml-core/RMLTC0002d-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002d-MySQL/resource.sql deleted file mode 100644 index a68415ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/mapping.ttl deleted file mode 100644 index 2b20b148..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT ('Student' || ID) AS StudentId, ID, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "studentid"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/output.nq deleted file mode 100644 index c9ce3cd7..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ -_:Student10 "Venus". diff --git a/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/resource.sql deleted file mode 100644 index b6377ea8..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002d-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002d-SQLServer/mapping.ttl deleted file mode 100644 index e7355d78..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-SQLServer/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT CONCAT('Student', ID) AS StudentId, ID, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "StudentId"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002d-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0002d-SQLServer/output.nq deleted file mode 100644 index c9ce3cd7..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-SQLServer/output.nq +++ /dev/null @@ -1 +0,0 @@ -_:Student10 "Venus". diff --git a/src/test/resources/rml-core/RMLTC0002d-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002d-SQLServer/resource.sql deleted file mode 100644 index 312631e3..00000000 --- a/src/test/resources/rml-core/RMLTC0002d-SQLServer/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002e-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0002e-CSV/mapping.ttl deleted file mode 100644 index 16ef1a14..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student2.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0002e-CSV/student.csv b/src/test/resources/rml-core/RMLTC0002e-CSV/student.csv deleted file mode 100644 index df9d2d69..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name -10,Venus diff --git a/src/test/resources/rml-core/RMLTC0002e-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0002e-JSON/mapping.ttl deleted file mode 100644 index d248fc23..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student2.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0002e-JSON/student.json b/src/test/resources/rml-core/RMLTC0002e-JSON/student.json deleted file mode 100644 index 0f6f797f..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-JSON/student.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0002e-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002e-MySQL/mapping.ttl deleted file mode 100644 index 3243ff11..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "\"Students\"" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002e-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002e-MySQL/resource.sql deleted file mode 100644 index a68415ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002e-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002e-PostgreSQL/mapping.ttl deleted file mode 100644 index 8c5821d5..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "\"Students\"" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002e-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002e-PostgreSQL/resource.sql deleted file mode 100644 index 80957756..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002e-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002e-SQLServer/mapping.ttl deleted file mode 100644 index 7cd1f338..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "\"Students\"" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002e-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002e-SQLServer/resource.sql deleted file mode 100644 index 7403a330..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-SQLServer/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002e-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0002e-XML/mapping.ttl deleted file mode 100644 index 4a3a9503..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-XML/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student2.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0002e-XML/student.xml b/src/test/resources/rml-core/RMLTC0002e-XML/student.xml deleted file mode 100644 index b2a6a9ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002e-XML/student.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 10 - Venus - - diff --git a/src/test/resources/rml-core/RMLTC0002f-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002f-MySQL/mapping.ttl deleted file mode 100644 index 49ef282d..00000000 --- a/src/test/resources/rml-core/RMLTC0002f-MySQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "\"Student\"" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "\"ID\"" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "\"Name\"" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{\"ID\"}/{\"Name\"}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002f-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002f-MySQL/resource.sql deleted file mode 100644 index 79b54978..00000000 --- a/src/test/resources/rml-core/RMLTC0002f-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Student; -CREATE TABLE Student ( -ID INTEGER, -Name VARCHAR(15) -); -INSERT INTO Student (ID, Name) VALUES(10,'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002f-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002f-PostgreSQL/mapping.ttl deleted file mode 100644 index 49ef282d..00000000 --- a/src/test/resources/rml-core/RMLTC0002f-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "\"Student\"" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "\"ID\"" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "\"Name\"" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{\"ID\"}/{\"Name\"}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002f-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002f-PostgreSQL/resource.sql deleted file mode 100644 index 4359797c..00000000 --- a/src/test/resources/rml-core/RMLTC0002f-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS Student CASCADE; -CREATE TABLE Student ( -ID INTEGER, -Name VARCHAR(15) -); -INSERT INTO Student (ID, Name) VALUES(10,'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002f-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002f-SQLServer/mapping.ttl deleted file mode 100644 index 49ef282d..00000000 --- a/src/test/resources/rml-core/RMLTC0002f-SQLServer/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:referenceFormulation rml:SQL2008Table; - rml:source ; - rml:iterator "\"Student\"" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "\"ID\"" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "\"Name\"" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{\"ID\"}/{\"Name\"}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002f-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002f-SQLServer/resource.sql deleted file mode 100644 index b9bad140..00000000 --- a/src/test/resources/rml-core/RMLTC0002f-SQLServer/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS TestDB.Student; -CREATE TABLE Student ( -ID INTEGER, -Name VARCHAR(15) -); -INSERT INTO Student (ID, Name) VALUES(10,'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002g-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0002g-JSON/mapping.ttl deleted file mode 100644 index 79665fa6..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student2.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0002g-JSON/student.json b/src/test/resources/rml-core/RMLTC0002g-JSON/student.json deleted file mode 100644 index 0f6f797f..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-JSON/student.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0002g-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002g-MySQL/mapping.ttl deleted file mode 100644 index 281f0f32..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002g-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002g-MySQL/resource.sql deleted file mode 100644 index a68415ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002g-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002g-PostgreSQL/mapping.ttl deleted file mode 100644 index 8e015c41..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002g-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002g-PostgreSQL/resource.sql deleted file mode 100644 index 80957756..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002g-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002g-SPARQL/mapping.ttl deleted file mode 100644 index f25aae7a..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-SPARQL/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix ex: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT qsdfqsdf sqdfqsdfsd ?Nsdfqs ame ?ID qmsndfknqskfmdnemznfmkznfmizmnknfmz - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID.value}/{Name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0002g-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0002g-SPARQL/resource.ttl deleted file mode 100644 index da1fb834..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-SPARQL/resource.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:name "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002g-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002g-SQLServer/mapping.ttl deleted file mode 100644 index cc64991c..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002g-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002g-SQLServer/resource.sql deleted file mode 100644 index 7403a330..00000000 --- a/src/test/resources/rml-core/RMLTC0002g-SQLServer/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002h-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002h-MySQL/mapping.ttl deleted file mode 100644 index 0ff414d9..00000000 --- a/src/test/resources/rml-core/RMLTC0002h-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT Name, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002h-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002h-MySQL/resource.sql deleted file mode 100644 index a68415ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002h-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002h-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002h-PostgreSQL/mapping.ttl deleted file mode 100644 index 73e6431b..00000000 --- a/src/test/resources/rml-core/RMLTC0002h-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT Name, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002h-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002h-PostgreSQL/resource.sql deleted file mode 100644 index 80957756..00000000 --- a/src/test/resources/rml-core/RMLTC0002h-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002h-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002h-SPARQL/mapping.ttl deleted file mode 100644 index df7c0e87..00000000 --- a/src/test/resources/rml-core/RMLTC0002h-SPARQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix ex: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?Name - WHERE { - ?x foaf:name ?Name ; - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID.value}/{Name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0002h-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0002h-SPARQL/resource.ttl deleted file mode 100644 index da1fb834..00000000 --- a/src/test/resources/rml-core/RMLTC0002h-SPARQL/resource.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:name "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0002h-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002h-SQLServer/mapping.ttl deleted file mode 100644 index d232dd56..00000000 --- a/src/test/resources/rml-core/RMLTC0002h-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT Name, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002h-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002h-SQLServer/resource.sql deleted file mode 100644 index 1673b883..00000000 --- a/src/test/resources/rml-core/RMLTC0002h-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002i-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002i-MySQL/mapping.ttl deleted file mode 100644 index 0c3186b7..00000000 --- a/src/test/resources/rml-core/RMLTC0002i-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002i-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002i-MySQL/resource.sql deleted file mode 100644 index a68415ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002i-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002i-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002i-PostgreSQL/mapping.ttl deleted file mode 100644 index 59e2fa5e..00000000 --- a/src/test/resources/rml-core/RMLTC0002i-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002i-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002i-PostgreSQL/resource.sql deleted file mode 100644 index 80957756..00000000 --- a/src/test/resources/rml-core/RMLTC0002i-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002i-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002i-SQLServer/mapping.ttl deleted file mode 100644 index 0cbaf16f..00000000 --- a/src/test/resources/rml-core/RMLTC0002i-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002i-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002i-SQLServer/resource.sql deleted file mode 100644 index 7403a330..00000000 --- a/src/test/resources/rml-core/RMLTC0002i-SQLServer/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002j-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002j-MySQL/mapping.ttl deleted file mode 100644 index c691b7eb..00000000 --- a/src/test/resources/rml-core/RMLTC0002j-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT NoColumnName, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0002j-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0002j-MySQL/resource.sql deleted file mode 100644 index a68415ac..00000000 --- a/src/test/resources/rml-core/RMLTC0002j-MySQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002j-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0002j-PostgreSQL/mapping.ttl deleted file mode 100644 index 170765ed..00000000 --- a/src/test/resources/rml-core/RMLTC0002j-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT NoColumnName, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0002j-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0002j-PostgreSQL/resource.sql deleted file mode 100644 index 80957756..00000000 --- a/src/test/resources/rml-core/RMLTC0002j-PostgreSQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0002j-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0002j-SQLServer/mapping.ttl deleted file mode 100644 index 0cf92cf3..00000000 --- a/src/test/resources/rml-core/RMLTC0002j-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT NoColumnName, Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0002j-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0002j-SQLServer/resource.sql deleted file mode 100644 index 7403a330..00000000 --- a/src/test/resources/rml-core/RMLTC0002j-SQLServer/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus'); diff --git a/src/test/resources/rml-core/RMLTC0003a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0003a-MySQL/mapping.ttl deleted file mode 100644 index bb5ea67a..00000000 --- a/src/test/resources/rml-core/RMLTC0003a-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT FirstName, LastName FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0003a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0003a-MySQL/resource.sql deleted file mode 100644 index 6a1a3f3e..00000000 --- a/src/test/resources/rml-core/RMLTC0003a-MySQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0003a-PostgreSQL/mapping.ttl deleted file mode 100644 index 69f4c6a6..00000000 --- a/src/test/resources/rml-core/RMLTC0003a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT FirstName, LastName FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0003a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0003a-PostgreSQL/resource.sql deleted file mode 100644 index 339e52c6..00000000 --- a/src/test/resources/rml-core/RMLTC0003a-PostgreSQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0003a-SQLServer/mapping.ttl deleted file mode 100644 index b6120db4..00000000 --- a/src/test/resources/rml-core/RMLTC0003a-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT FirstName, LastName FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "IDs" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0003a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0003a-SQLServer/resource.sql deleted file mode 100644 index 13f10776..00000000 --- a/src/test/resources/rml-core/RMLTC0003a-SQLServer/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0003b-MySQL/mapping.ttl deleted file mode 100644 index 3b68c9b5..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-MySQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT ID, LastName, CONCAT(`FirstName`, '', `LastName`) as Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{LastName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0003b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0003b-MySQL/output.nq deleted file mode 100644 index 4ba0d6f1..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-MySQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "VenusWilliams" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0003b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0003b-MySQL/resource.sql deleted file mode 100644 index 6a1a3f3e..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-MySQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/mapping.ttl deleted file mode 100644 index 12ae8dd6..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT id, lastname, concat_ws(firstname, '', lastname) as name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "name"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{id}/{lastname}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/output.nq deleted file mode 100644 index 4ba0d6f1..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "VenusWilliams" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/resource.sql deleted file mode 100644 index c9b85352..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-PostgreSQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - id INTEGER, - firstname VARCHAR(50), - lastname VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0003b-SQLServer/mapping.ttl deleted file mode 100644 index ff4018ea..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-SQLServer/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator "SELECT ID, LastName, concat_ws(FirstName, '', LastName) as Name FROM student"; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{LastName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0003b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0003b-SQLServer/output.nq deleted file mode 100644 index 4ba0d6f1..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-SQLServer/output.nq +++ /dev/null @@ -1 +0,0 @@ - "VenusWilliams" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0003b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0003b-SQLServer/resource.sql deleted file mode 100644 index 13f10776..00000000 --- a/src/test/resources/rml-core/RMLTC0003b-SQLServer/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003c-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0003c-CSV/mapping.ttl deleted file mode 100644 index e0a70f33..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-CSV/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{FirstName} {LastName}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0003c-CSV/output.nq b/src/test/resources/rml-core/RMLTC0003c-CSV/output.nq deleted file mode 100644 index 180f90c2..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-CSV/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus Williams" . diff --git a/src/test/resources/rml-core/RMLTC0003c-CSV/student.csv b/src/test/resources/rml-core/RMLTC0003c-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0003c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0003c-JSON/mapping.ttl deleted file mode 100644 index 482bcf9c..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-JSON/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{FirstName} {LastName}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0003c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0003c-JSON/output.nq deleted file mode 100644 index 180f90c2..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-JSON/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus Williams" . diff --git a/src/test/resources/rml-core/RMLTC0003c-JSON/student.json b/src/test/resources/rml-core/RMLTC0003c-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0003c-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0003c-MySQL/mapping.ttl deleted file mode 100644 index c9d5d266..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-MySQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{FirstName} {LastName}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0003c-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0003c-MySQL/output.nq deleted file mode 100644 index 180f90c2..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-MySQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus Williams" . diff --git a/src/test/resources/rml-core/RMLTC0003c-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0003c-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/mapping.ttl deleted file mode 100644 index d4c7bea0..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{FirstName} {LastName}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/output.nq deleted file mode 100644 index 180f90c2..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus Williams" . diff --git a/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/resource.sql deleted file mode 100644 index 339e52c6..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-PostgreSQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE IF EXISTS student CASCADE ; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003c-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0003c-SPARQL/mapping.ttl deleted file mode 100644 index 3e576f26..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-SPARQL/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{FirstName.value} {LastName.value}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student{ID.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0003c-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0003c-SPARQL/output.nq deleted file mode 100644 index 180f90c2..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-SPARQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus Williams" . diff --git a/src/test/resources/rml-core/RMLTC0003c-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0003c-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0003c-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0003c-SQLServer/mapping.ttl deleted file mode 100644 index 8b4b1bb6..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-SQLServer/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{FirstName} {LastName}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0003c-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0003c-SQLServer/output.nq deleted file mode 100644 index 180f90c2..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-SQLServer/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus Williams" . diff --git a/src/test/resources/rml-core/RMLTC0003c-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0003c-SQLServer/resource.sql deleted file mode 100644 index 13f10776..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-SQLServer/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0003c-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0003c-XML/mapping.ttl deleted file mode 100644 index 87372229..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-XML/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{FirstName} {LastName}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0003c-XML/output.nq b/src/test/resources/rml-core/RMLTC0003c-XML/output.nq deleted file mode 100644 index 180f90c2..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-XML/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Venus Williams" . diff --git a/src/test/resources/rml-core/RMLTC0003c-XML/student.xml b/src/test/resources/rml-core/RMLTC0003c-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0003c-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0004a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0004a-CSV/mapping.ttl deleted file mode 100644 index e2fd7725..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-CSV/mapping.ttl +++ /dev/null @@ -1,41 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Student" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student; - rml:template "http://example.com/{Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Sport; - rml:template "http://example.com/{Sport}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0004a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0004a-CSV/output.nq deleted file mode 100644 index 164ca8ba..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-CSV/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - . - "Tennis" . - . - diff --git a/src/test/resources/rml-core/RMLTC0004a-CSV/student_sport.csv b/src/test/resources/rml-core/RMLTC0004a-CSV/student_sport.csv deleted file mode 100644 index 3c88eaa3..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-CSV/student_sport.csv +++ /dev/null @@ -1,2 +0,0 @@ -Student,Sport -Venus,Tennis diff --git a/src/test/resources/rml-core/RMLTC0004a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0004a-JSON/mapping.ttl deleted file mode 100644 index bc212d7f..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-JSON/mapping.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Student" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student; - rml:template "http://example.com/{Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Sport; - rml:template "http://example.com/{Sport}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0004a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0004a-JSON/output.nq deleted file mode 100644 index 164ca8ba..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-JSON/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - . - "Tennis" . - . - diff --git a/src/test/resources/rml-core/RMLTC0004a-JSON/student_sport.json b/src/test/resources/rml-core/RMLTC0004a-JSON/student_sport.json deleted file mode 100644 index 5e537b36..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-JSON/student_sport.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "students": [{ - "Student": "Venus", - "Sport":"Tennis" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0004a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0004a-MySQL/mapping.ttl deleted file mode 100644 index 51eaa9f7..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-MySQL/mapping.ttl +++ /dev/null @@ -1,44 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Student" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student; - rml:template "http://example.com/{Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Sport; - rml:template "http://example.com/{Sport}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0004a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0004a-MySQL/output.nq deleted file mode 100644 index 164ca8ba..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-MySQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - . - "Tennis" . - . - diff --git a/src/test/resources/rml-core/RMLTC0004a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0004a-MySQL/resource.sql deleted file mode 100644 index a98ea0fa..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-MySQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student_sport; - -CREATE TABLE student_sport ( - Student VARCHAR(50), - Sport VARCHAR(50) -); -INSERT INTO student_sport values ('Venus', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0004a-MySQL/student_sport.csv b/src/test/resources/rml-core/RMLTC0004a-MySQL/student_sport.csv deleted file mode 100644 index 3c88eaa3..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-MySQL/student_sport.csv +++ /dev/null @@ -1,2 +0,0 @@ -Student,Sport -Venus,Tennis diff --git a/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/mapping.ttl deleted file mode 100644 index b1f8ac41..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,44 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Student" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student; - rml:template "http://example.com/{Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Sport; - rml:template "http://example.com/{Sport}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/output.nq deleted file mode 100644 index ab10283d..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus" . - . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/resource.sql deleted file mode 100644 index e3fbd520..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -DROP TABLE IF EXISTS student_sport; - -CREATE TABLE student_sport ( - "Student" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student_sport values ('Venus', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/student_sport.csv b/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/student_sport.csv deleted file mode 100644 index 3c88eaa3..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-PostgreSQL/student_sport.csv +++ /dev/null @@ -1,2 +0,0 @@ -Student,Sport -Venus,Tennis diff --git a/src/test/resources/rml-core/RMLTC0004a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0004a-SPARQL/mapping.ttl deleted file mode 100644 index 5053c863..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-SPARQL/mapping.ttl +++ /dev/null @@ -1,66 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - -ex:TriplesMap1 a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Student - WHERE { - ?x a ; - foaf:name ?Student . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Student.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student; - rml:template "http://example.com/{Student.value}" - ] . - -ex:TriplesMap2 a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Sport - WHERE { - ?x a ; - ?sportObject . - ?sportObject foaf:name ?Sport . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sport.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Sport; - rml:template "http://example.com/{Sport.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0004a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0004a-SPARQL/output.nq deleted file mode 100644 index ab10283d..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-SPARQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus" . - . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0004a-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0004a-SPARQL/resource.ttl deleted file mode 100644 index 8435fe0c..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-SPARQL/resource.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix foaf: . -@prefix ns1: . - -[] a ns1:Student ; - ns1:plays [ a ns1:Sport ; - foaf:name "Tennis" ] ; - foaf:name "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0004a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0004a-SQLServer/mapping.ttl deleted file mode 100644 index 8df779a1..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-SQLServer/mapping.ttl +++ /dev/null @@ -1,44 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Student" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student; - rml:template "http://example.com/{Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Sport; - rml:template "http://example.com/{Sport}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0004a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0004a-SQLServer/output.nq deleted file mode 100644 index 164ca8ba..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-SQLServer/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - . - "Tennis" . - . - diff --git a/src/test/resources/rml-core/RMLTC0004a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0004a-SQLServer/resource.sql deleted file mode 100644 index 6424aeaa..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-SQLServer/resource.sql +++ /dev/null @@ -1,7 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student_sport; -CREATE TABLE student_sport ( - "Student" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student_sport values ('Venus', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0004a-SQLServer/student_sport.csv b/src/test/resources/rml-core/RMLTC0004a-SQLServer/student_sport.csv deleted file mode 100644 index 3c88eaa3..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-SQLServer/student_sport.csv +++ /dev/null @@ -1,2 +0,0 @@ -Student,Sport -Venus,Tennis diff --git a/src/test/resources/rml-core/RMLTC0004a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0004a-XML/mapping.ttl deleted file mode 100644 index 9ccb70fa..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-XML/mapping.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Student" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student; - rml:template "http://example.com/{Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Sport; - rml:template "http://example.com/{Sport}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0004a-XML/output.nq b/src/test/resources/rml-core/RMLTC0004a-XML/output.nq deleted file mode 100644 index 164ca8ba..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - . - "Tennis" . - . - diff --git a/src/test/resources/rml-core/RMLTC0004a-XML/student_sport.xml b/src/test/resources/rml-core/RMLTC0004a-XML/student_sport.xml deleted file mode 100644 index 73b448c3..00000000 --- a/src/test/resources/rml-core/RMLTC0004a-XML/student_sport.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - Venus - Tennis - - diff --git a/src/test/resources/rml-core/RMLTC0004b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0004b-CSV/mapping.ttl deleted file mode 100644 index b34afb2e..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-CSV/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}"; - rml:termType rml:Literal - ] . diff --git a/src/test/resources/rml-core/RMLTC0004b-CSV/student.csv b/src/test/resources/rml-core/RMLTC0004b-CSV/student.csv deleted file mode 100644 index 4e683bbe..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -Name -Venus diff --git a/src/test/resources/rml-core/RMLTC0004b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0004b-JSON/mapping.ttl deleted file mode 100644 index 6a0624ef..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-JSON/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}"; - rml:termType rml:Literal - ] . diff --git a/src/test/resources/rml-core/RMLTC0004b-JSON/student.json b/src/test/resources/rml-core/RMLTC0004b-JSON/student.json deleted file mode 100644 index b3ae4c4e..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-JSON/student.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "students": [{ - "Name":"Venus" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0004b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0004b-MySQL/mapping.ttl deleted file mode 100644 index 0214c8a7..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-MySQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}"; - rml:termType rml:Literal - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0004b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0004b-MySQL/resource.sql deleted file mode 100644 index 04afa4e1..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-MySQL/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; -CREATE TABLE student ( - Name VARCHAR(50) -); -INSERT INTO student values ('Venus'); diff --git a/src/test/resources/rml-core/RMLTC0004b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0004b-PostgreSQL/mapping.ttl deleted file mode 100644 index 7e30b9e2..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}"; - rml:termType rml:Literal - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0004b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0004b-PostgreSQL/resource.sql deleted file mode 100644 index 67e5510f..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-PostgreSQL/resource.sql +++ /dev/null @@ -1,5 +0,0 @@ -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "Name" VARCHAR(50) -); -INSERT INTO student values ('Venus'); diff --git a/src/test/resources/rml-core/RMLTC0004b-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0004b-SPARQL/mapping.ttl deleted file mode 100644 index e425cb50..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-SPARQL/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - -ex:TriplesMap1 a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name - WHERE { - ?x foaf:name ?Name . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name.value}"; - rml:termType rml:Literal - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0004b-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0004b-SPARQL/resource.ttl deleted file mode 100644 index ac86df29..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-SPARQL/resource.ttl +++ /dev/null @@ -1,4 +0,0 @@ -@prefix foaf: . - -[] foaf:name "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0004b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0004b-SQLServer/mapping.ttl deleted file mode 100644 index f652128d..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-SQLServer/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}"; - rml:termType rml:Literal - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0004b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0004b-SQLServer/resource.sql deleted file mode 100644 index f38006ab..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-SQLServer/resource.sql +++ /dev/null @@ -1,6 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "Name" VARCHAR(50) -); -INSERT INTO student values ('Venus'); diff --git a/src/test/resources/rml-core/RMLTC0004b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0004b-XML/mapping.ttl deleted file mode 100644 index 6423cf78..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-XML/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}"; - rml:termType rml:Literal - ] . diff --git a/src/test/resources/rml-core/RMLTC0004b-XML/student.xml b/src/test/resources/rml-core/RMLTC0004b-XML/student.xml deleted file mode 100644 index f104648b..00000000 --- a/src/test/resources/rml-core/RMLTC0004b-XML/student.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - Venus - - diff --git a/src/test/resources/rml-core/RMLTC0005a-CSV/ious.csv b/src/test/resources/rml-core/RMLTC0005a-CSV/ious.csv deleted file mode 100644 index 49ce65ff..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-CSV/ious.csv +++ /dev/null @@ -1,4 +0,0 @@ -fname,lname,amount -Bob,Smith,30.0E0 -Sue,Jones,20.0E0 -Bob,Smith,30.0E0 diff --git a/src/test/resources/rml-core/RMLTC0005a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0005a-CSV/mapping.ttl deleted file mode 100644 index 4b90b2ea..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-CSV/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "ious.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:owes - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{fname};{lname}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0005a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0005a-CSV/output.nq deleted file mode 100644 index 64e91da4..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-CSV/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "30.0E0" . - . - "20.0E0" . - diff --git a/src/test/resources/rml-core/RMLTC0005a-JSON/ious.json b/src/test/resources/rml-core/RMLTC0005a-JSON/ious.json deleted file mode 100644 index b30b9ffa..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-JSON/ious.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "persons": [ - { - "fname": "Bob", - "lname": "Smith", - "amount": "30.0E0" - }, - { - "fname": "Sue", - "lname": "Jones", - "amount": "20.0E0" - }, - { - "fname": "Bob", - "lname": "Smith", - "amount": "30.0E0" - } - ] -} diff --git a/src/test/resources/rml-core/RMLTC0005a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0005a-JSON/mapping.ttl deleted file mode 100644 index 9232cb2b..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-JSON/mapping.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "ious.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:owes - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{fname};{lname}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0005a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0005a-JSON/output.nq deleted file mode 100644 index 64e91da4..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-JSON/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "30.0E0" . - . - "20.0E0" . - diff --git a/src/test/resources/rml-core/RMLTC0005a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0005a-MySQL/mapping.ttl deleted file mode 100644 index e34e5337..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-MySQL/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:owes - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{fname};{lname}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0005a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0005a-MySQL/output.nq deleted file mode 100644 index 30bc4b1d..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-MySQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "3.0E1"^^ . - . - "2.0E1"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0005a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0005a-MySQL/resource.sql deleted file mode 100644 index bad6cddf..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.IOUs; -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); diff --git a/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/mapping.ttl deleted file mode 100644 index f929dda4..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:owes - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{fname};{lname}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/output.nq deleted file mode 100644 index 30bc4b1d..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "3.0E1"^^ . - . - "2.0E1"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/resource.sql deleted file mode 100644 index 32767803..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS IOUs; -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); diff --git a/src/test/resources/rml-core/RMLTC0005a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0005a-SQLServer/mapping.ttl deleted file mode 100644 index 95579a1c..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-SQLServer/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:owes - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{fname};{lname}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0005a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0005a-SQLServer/output.nq deleted file mode 100644 index 30bc4b1d..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-SQLServer/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "3.0E1"^^ . - . - "2.0E1"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0005a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0005a-SQLServer/resource.sql deleted file mode 100644 index 64a717bb..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-SQLServer/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS IOUs; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); diff --git a/src/test/resources/rml-core/RMLTC0005a-XML/ious.xml b/src/test/resources/rml-core/RMLTC0005a-XML/ious.xml deleted file mode 100644 index 83fe72a2..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-XML/ious.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Bob - Smith - 30.0E0 - - - Sue - Jones - 20.0E0 - - - Bob - Smith - 30.0E0 - - diff --git a/src/test/resources/rml-core/RMLTC0005a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0005a-XML/mapping.ttl deleted file mode 100644 index 9c0e0c4d..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-XML/mapping.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/persons/person"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "ious.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:owes - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{fname};{lname}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0005a-XML/output.nq b/src/test/resources/rml-core/RMLTC0005a-XML/output.nq deleted file mode 100644 index 64e91da4..00000000 --- a/src/test/resources/rml-core/RMLTC0005a-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "30.0E0" . - . - "20.0E0" . - diff --git a/src/test/resources/rml-core/RMLTC0005b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0005b-MySQL/mapping.ttl deleted file mode 100644 index dd7f2618..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-MySQL/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix d2rq: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:template "{fname}_{lname}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0005b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0005b-MySQL/output.nq deleted file mode 100644 index e9744d9a..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-MySQL/output.nq +++ /dev/null @@ -1,9 +0,0 @@ -_:Bob_Smith . -_:Bob_Smith "Bob" . -_:Bob_Smith "Smith" . -_:Bob_Smith "3.0E1"^^ . -_:Sue_Jones . -_:Sue_Jones "Sue" . -_:Sue_Jones "Jones" . -_:Sue_Jones "2.0E1"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0005b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0005b-MySQL/resource.sql deleted file mode 100644 index bad6cddf..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.IOUs; -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); diff --git a/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/mapping.ttl deleted file mode 100644 index a5796754..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix d2rq: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:template "{fname}_{lname}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/output.nq deleted file mode 100644 index e9744d9a..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/output.nq +++ /dev/null @@ -1,9 +0,0 @@ -_:Bob_Smith . -_:Bob_Smith "Bob" . -_:Bob_Smith "Smith" . -_:Bob_Smith "3.0E1"^^ . -_:Sue_Jones . -_:Sue_Jones "Sue" . -_:Sue_Jones "Jones" . -_:Sue_Jones "2.0E1"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/resource.sql deleted file mode 100644 index 32767803..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS IOUs; -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); diff --git a/src/test/resources/rml-core/RMLTC0005b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0005b-SQLServer/mapping.ttl deleted file mode 100644 index 50a859f7..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-SQLServer/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix d2rq: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:template "{fname}_{lname}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0005b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0005b-SQLServer/output.nq deleted file mode 100644 index e9744d9a..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-SQLServer/output.nq +++ /dev/null @@ -1,9 +0,0 @@ -_:Bob_Smith . -_:Bob_Smith "Bob" . -_:Bob_Smith "Smith" . -_:Bob_Smith "3.0E1"^^ . -_:Sue_Jones . -_:Sue_Jones "Sue" . -_:Sue_Jones "Jones" . -_:Sue_Jones "2.0E1"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0005b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0005b-SQLServer/resource.sql deleted file mode 100644 index 660f8c86..00000000 --- a/src/test/resources/rml-core/RMLTC0005b-SQLServer/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS IOUs; -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); diff --git a/src/test/resources/rml-core/RMLTC0006a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0006a-CSV/mapping.ttl deleted file mode 100644 index 47582add..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-CSV/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:constant "Bad Student" - ]; - rml:predicateMap [ - rml:constant ex:description - ] - ]; - rml:subjectMap [ - rml:constant ex:BadStudent; - rml:graphMap [ - rml:constant - ] - ] . diff --git a/src/test/resources/rml-core/RMLTC0006a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0006a-CSV/output.nq deleted file mode 100644 index 4e6fd3ef..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-CSV/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Bad Student" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0006a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0006a-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0006a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0006a-JSON/mapping.ttl deleted file mode 100644 index 3196ff7a..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-JSON/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:constant "Bad Student" - ]; - rml:predicateMap [ - rml:constant ex:description - ] - ]; - rml:subjectMap [ - rml:constant ex:BadStudent; - rml:graphMap [ - rml:constant - ] - ] . diff --git a/src/test/resources/rml-core/RMLTC0006a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0006a-JSON/output.nq deleted file mode 100644 index 4e6fd3ef..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-JSON/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Bad Student" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0006a-JSON/student.json b/src/test/resources/rml-core/RMLTC0006a-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0006a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0006a-MySQL/mapping.ttl deleted file mode 100644 index b793aa7a..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-MySQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:constant "Bad Student" - ]; - rml:predicateMap [ - rml:constant ex:description - ] - ]; - rml:subjectMap [ - rml:constant ex:BadStudent; - rml:graphMap [ - rml:constant - ] - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0006a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0006a-MySQL/output.nq deleted file mode 100644 index 4e6fd3ef..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-MySQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Bad Student" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0006a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0006a-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/mapping.ttl deleted file mode 100644 index 2a8f540d..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:constant "Bad Student" - ]; - rml:predicateMap [ - rml:constant ex:description - ] - ]; - rml:subjectMap [ - rml:constant ex:BadStudent; - rml:graphMap [ - rml:constant - ] - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/output.nq deleted file mode 100644 index 4e6fd3ef..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Bad Student" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0006a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0006a-SPARQL/mapping.ttl deleted file mode 100644 index b6820692..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-SPARQL/mapping.ttl +++ /dev/null @@ -1,39 +0,0 @@ -@prefix ex: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - -ex:TriplesMap1 a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?BadStudent ?LastName ?ID - WHERE { - - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:constant "Bad Student" - ]; - rml:predicateMap [ - rml:constant ex:description - ] - ]; - rml:subjectMap [ - rml:constant ex:BadStudent; - rml:graphMap [ - rml:constant - ] - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0006a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0006a-SPARQL/output.nq deleted file mode 100644 index 4e6fd3ef..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-SPARQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Bad Student" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0006a-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0006a-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0006a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0006a-SQLServer/mapping.ttl deleted file mode 100644 index 00e232f7..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-SQLServer/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:constant "Bad Student" - ]; - rml:predicateMap [ - rml:constant ex:description - ] - ]; - rml:subjectMap [ - rml:constant ex:BadStudent; - rml:graphMap [ - rml:constant - ] - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0006a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0006a-SQLServer/output.nq deleted file mode 100644 index 4e6fd3ef..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-SQLServer/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Bad Student" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0006a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0006a-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0006a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0006a-XML/mapping.ttl deleted file mode 100644 index 2f08a03b..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-XML/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:constant "Bad Student" - ]; - rml:predicateMap [ - rml:constant ex:description - ] - ]; - rml:subjectMap [ - rml:constant ex:BadStudent; - rml:graphMap [ - rml:constant - ] - ] . diff --git a/src/test/resources/rml-core/RMLTC0006a-XML/output.nq b/src/test/resources/rml-core/RMLTC0006a-XML/output.nq deleted file mode 100644 index 4e6fd3ef..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-XML/output.nq +++ /dev/null @@ -1 +0,0 @@ - "Bad Student" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0006a-XML/student.xml b/src/test/resources/rml-core/RMLTC0006a-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0006a-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0007a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0007a-CSV/mapping.ttl deleted file mode 100644 index 0c4bf5c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-CSV/mapping.ttl +++ /dev/null @@ -1,19 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0007a-CSV/output.nq deleted file mode 100644 index 76f87f89..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0007a-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0007a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007a-JSON/mapping.ttl deleted file mode 100644 index 79fd925f..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-JSON/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007a-JSON/output.nq deleted file mode 100644 index 76f87f89..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-JSON/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007a-JSON/student.json b/src/test/resources/rml-core/RMLTC0007a-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0007a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007a-MySQL/mapping.ttl deleted file mode 100644 index db739fa2..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-MySQL/mapping.ttl +++ /dev/null @@ -1,24 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0007a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0007a-MySQL/output.nq deleted file mode 100644 index 76f87f89..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-MySQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0007a-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/mapping.ttl deleted file mode 100644 index af254a4e..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,24 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/output.nq deleted file mode 100644 index 76f87f89..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007a-SPARQL/mapping.ttl deleted file mode 100644 index 42b09838..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-SPARQL/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rdf: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID.value}/{FirstName.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0007a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0007a-SPARQL/output.nq deleted file mode 100644 index 76f87f89..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-SPARQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007a-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0007a-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0007a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0007a-SQLServer/mapping.ttl deleted file mode 100644 index 8d4b6cc7..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-SQLServer/mapping.ttl +++ /dev/null @@ -1,24 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0007a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0007a-SQLServer/output.nq deleted file mode 100644 index 76f87f89..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-SQLServer/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0007a-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0007a-XML/mapping.ttl deleted file mode 100644 index 90686dfc..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-XML/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007a-XML/output.nq b/src/test/resources/rml-core/RMLTC0007a-XML/output.nq deleted file mode 100644 index 76f87f89..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-XML/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007a-XML/student.xml b/src/test/resources/rml-core/RMLTC0007a-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0007a-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0007b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0007b-CSV/mapping.ttl deleted file mode 100644 index 038756a4..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-CSV/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0007b-CSV/output.nq deleted file mode 100644 index 5c4eb261..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-CSV/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007b-CSV/student.csv b/src/test/resources/rml-core/RMLTC0007b-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0007b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007b-JSON/mapping.ttl deleted file mode 100644 index 2f6423e5..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-JSON/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007b-JSON/output.nq deleted file mode 100644 index 5c4eb261..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-JSON/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007b-JSON/student.json b/src/test/resources/rml-core/RMLTC0007b-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0007b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007b-MySQL/mapping.ttl deleted file mode 100644 index 7af7a434..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-MySQL/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0007b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0007b-MySQL/output.nq deleted file mode 100644 index 5c4eb261..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-MySQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0007b-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/mapping.ttl deleted file mode 100644 index cf2eea01..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/output.nq deleted file mode 100644 index 5c4eb261..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007b-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007b-SPARQL/mapping.ttl deleted file mode 100644 index 77045f25..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-SPARQL/mapping.ttl +++ /dev/null @@ -1,38 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rdf: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "FirstName.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID.value}/{FirstName.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0007b-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0007b-SPARQL/output.nq deleted file mode 100644 index 5c4eb261..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-SPARQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007b-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0007b-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0007b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0007b-SQLServer/mapping.ttl deleted file mode 100644 index 95fad185..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-SQLServer/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0007b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0007b-SQLServer/output.nq deleted file mode 100644 index 5c4eb261..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-SQLServer/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0007b-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0007b-XML/mapping.ttl deleted file mode 100644 index 7e3adee1..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-XML/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007b-XML/output.nq b/src/test/resources/rml-core/RMLTC0007b-XML/output.nq deleted file mode 100644 index 5c4eb261..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-XML/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007b-XML/student.xml b/src/test/resources/rml-core/RMLTC0007b-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0007b-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0007c-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0007c-CSV/mapping.ttl deleted file mode 100644 index 172bab17..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-CSV/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student, foaf:Person; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007c-CSV/output.nq b/src/test/resources/rml-core/RMLTC0007c-CSV/output.nq deleted file mode 100644 index fb4d7fe2..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-CSV/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10" . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007c-CSV/student.csv b/src/test/resources/rml-core/RMLTC0007c-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007c-JSON/mapping.ttl deleted file mode 100644 index 4e1aee0b..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-JSON/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student, foaf:Person; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq deleted file mode 100644 index fb4d7fe2..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10" . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/student.json b/src/test/resources/rml-core/RMLTC0007c-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0007c-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007c-MySQL/mapping.ttl deleted file mode 100644 index 82326cd6..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-MySQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student, foaf:Person; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0007c-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0007c-MySQL/output.nq deleted file mode 100644 index ae78ddfb..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-MySQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007c-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0007c-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/mapping.ttl deleted file mode 100644 index 9d146a37..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student, foaf:Person; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/output.nq deleted file mode 100644 index ae78ddfb..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007c-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007c-SPARQL/mapping.ttl deleted file mode 100644 index 478c50f8..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-SPARQL/mapping.ttl +++ /dev/null @@ -1,34 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student, foaf:Person; - rml:template "http://example.com/Student/{ID.value}/{FirstName.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0007c-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0007c-SPARQL/output.nq deleted file mode 100644 index 84570f21..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-SPARQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus" . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007c-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0007c-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0007c-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0007c-SQLServer/mapping.ttl deleted file mode 100644 index 66f13465..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-SQLServer/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student, foaf:Person; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0007c-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0007c-SQLServer/output.nq deleted file mode 100644 index ae78ddfb..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-SQLServer/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007c-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0007c-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007c-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0007c-XML/mapping.ttl deleted file mode 100644 index 511b917d..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-XML/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class ex:Student, foaf:Person; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007c-XML/output.nq b/src/test/resources/rml-core/RMLTC0007c-XML/output.nq deleted file mode 100644 index fb4d7fe2..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10" . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007c-XML/student.xml b/src/test/resources/rml-core/RMLTC0007c-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0007c-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0007d-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0007d-CSV/mapping.ttl deleted file mode 100644 index ebce721d..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-CSV/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:object ex:Student; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007d-CSV/output.nq b/src/test/resources/rml-core/RMLTC0007d-CSV/output.nq deleted file mode 100644 index 2f24266d..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-CSV/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10" . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007d-CSV/student.csv b/src/test/resources/rml-core/RMLTC0007d-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007d-JSON/mapping.ttl deleted file mode 100644 index 86eff9fe..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-JSON/mapping.ttl +++ /dev/null @@ -1,34 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:object ex:Student; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq deleted file mode 100644 index 2f24266d..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10" . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/student.json b/src/test/resources/rml-core/RMLTC0007d-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0007d-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007d-MySQL/mapping.ttl deleted file mode 100644 index 5712c9cc..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-MySQL/mapping.ttl +++ /dev/null @@ -1,38 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:object ex:Student; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0007d-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0007d-MySQL/output.nq deleted file mode 100644 index ae78ddfb..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-MySQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007d-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0007d-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/mapping.ttl deleted file mode 100644 index f05bf2ed..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,38 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:object ex:Student; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/output.nq deleted file mode 100644 index ae78ddfb..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007d-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007d-SPARQL/mapping.ttl deleted file mode 100644 index 1cac4f47..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-SPARQL/mapping.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rdf: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:object ex:Student; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "FirstName.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID.value}/{FirstName.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0007d-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0007d-SPARQL/output.nq deleted file mode 100644 index 84570f21..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-SPARQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus" . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007d-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0007d-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0007d-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0007d-SQLServer/mapping.ttl deleted file mode 100644 index 8849b336..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-SQLServer/mapping.ttl +++ /dev/null @@ -1,38 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:object ex:Student; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0007d-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0007d-SQLServer/output.nq deleted file mode 100644 index ae78ddfb..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-SQLServer/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007d-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0007d-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007d-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0007d-XML/mapping.ttl deleted file mode 100644 index 2de8b887..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-XML/mapping.ttl +++ /dev/null @@ -1,34 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:object ex:Student; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007d-XML/output.nq b/src/test/resources/rml-core/RMLTC0007d-XML/output.nq deleted file mode 100644 index 2f24266d..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Venus" . - "10" . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0007d-XML/student.xml b/src/test/resources/rml-core/RMLTC0007d-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0007d-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0007e-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0007e-CSV/mapping.ttl deleted file mode 100644 index 8de7095d..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-CSV/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007e-CSV/output.nq b/src/test/resources/rml-core/RMLTC0007e-CSV/output.nq deleted file mode 100644 index 4cbaaf55..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-CSV/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "10" . - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007e-CSV/student.csv b/src/test/resources/rml-core/RMLTC0007e-CSV/student.csv deleted file mode 100644 index df9d2d69..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name -10,Venus diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007e-JSON/mapping.ttl deleted file mode 100644 index 44b814a3..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-JSON/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq deleted file mode 100644 index 4cbaaf55..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "10" . - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/student.json b/src/test/resources/rml-core/RMLTC0007e-JSON/student.json deleted file mode 100644 index 0f6f797f..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-JSON/student.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0007e-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007e-MySQL/mapping.ttl deleted file mode 100644 index c051b269..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-MySQL/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0007e-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0007e-MySQL/output.nq deleted file mode 100644 index c5ea4c49..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-MySQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "10"^^ . - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007e-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0007e-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/mapping.ttl deleted file mode 100644 index 93f0b13a..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/output.nq deleted file mode 100644 index c5ea4c49..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "10"^^ . - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007e-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007e-SPARQL/mapping.ttl deleted file mode 100644 index 4e362e6f..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-SPARQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID.value}/{FirstName.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0007e-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0007e-SPARQL/output.nq deleted file mode 100644 index 1548749b..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-SPARQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007e-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0007e-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0007e-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0007e-SQLServer/mapping.ttl deleted file mode 100644 index 37de1347..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-SQLServer/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0007e-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0007e-SQLServer/output.nq deleted file mode 100644 index c5ea4c49..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-SQLServer/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "10"^^ . - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007e-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0007e-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007e-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0007e-XML/mapping.ttl deleted file mode 100644 index 58a876d4..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-XML/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007e-XML/output.nq b/src/test/resources/rml-core/RMLTC0007e-XML/output.nq deleted file mode 100644 index 4cbaaf55..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-XML/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "10" . - "Venus" . - . - diff --git a/src/test/resources/rml-core/RMLTC0007e-XML/student.xml b/src/test/resources/rml-core/RMLTC0007e-XML/student.xml deleted file mode 100644 index b2a6a9ac..00000000 --- a/src/test/resources/rml-core/RMLTC0007e-XML/student.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 10 - Venus - - diff --git a/src/test/resources/rml-core/RMLTC0007f-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0007f-CSV/mapping.ttl deleted file mode 100644 index 1160c8bf..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-CSV/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007f-CSV/output.nq b/src/test/resources/rml-core/RMLTC0007f-CSV/output.nq deleted file mode 100644 index d4694d78..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-CSV/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - . - "Venus" . - "10" . - diff --git a/src/test/resources/rml-core/RMLTC0007f-CSV/student.csv b/src/test/resources/rml-core/RMLTC0007f-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007f-JSON/mapping.ttl deleted file mode 100644 index 838a06b0..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-JSON/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq deleted file mode 100644 index d4694d78..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - . - "Venus" . - "10" . - diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/student.json b/src/test/resources/rml-core/RMLTC0007f-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0007f-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007f-MySQL/mapping.ttl deleted file mode 100644 index cb5ce945..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-MySQL/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0007f-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0007f-MySQL/output.nq deleted file mode 100644 index fb6a536c..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-MySQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - . - "Venus" . - "10"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0007f-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0007f-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/mapping.ttl deleted file mode 100644 index 67b94e7e..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/output.nq deleted file mode 100644 index fb6a536c..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - . - "Venus" . - "10"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007f-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007f-SPARQL/mapping.ttl deleted file mode 100644 index 26318a46..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-SPARQL/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rdf: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID.value}/{FirstName.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0007f-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0007f-SPARQL/output.nq deleted file mode 100644 index 1548749b..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-SPARQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - . - diff --git a/src/test/resources/rml-core/RMLTC0007f-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0007f-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0007f-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0007f-SQLServer/mapping.ttl deleted file mode 100644 index 61e58591..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-SQLServer/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0007f-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0007f-SQLServer/output.nq deleted file mode 100644 index fb6a536c..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-SQLServer/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - . - "Venus" . - "10"^^ . - diff --git a/src/test/resources/rml-core/RMLTC0007f-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0007f-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007f-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0007f-XML/mapping.ttl deleted file mode 100644 index b9ccf20e..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-XML/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph ex:PersonGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007f-XML/output.nq b/src/test/resources/rml-core/RMLTC0007f-XML/output.nq deleted file mode 100644 index d4694d78..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-XML/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - . - "Venus" . - "10" . - diff --git a/src/test/resources/rml-core/RMLTC0007f-XML/student.xml b/src/test/resources/rml-core/RMLTC0007f-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0007f-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0007g-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0007g-CSV/mapping.ttl deleted file mode 100644 index 07641fdd..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-CSV/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph rml:defaultGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007g-CSV/output.nq b/src/test/resources/rml-core/RMLTC0007g-CSV/output.nq deleted file mode 100644 index 6c29bcce..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0007g-CSV/student.csv b/src/test/resources/rml-core/RMLTC0007g-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0007g-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007g-JSON/mapping.ttl deleted file mode 100644 index 3d6fb710..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-JSON/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph rml:defaultGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007g-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007g-JSON/output.nq deleted file mode 100644 index 6c29bcce..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-JSON/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0007g-JSON/student.json b/src/test/resources/rml-core/RMLTC0007g-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0007g-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007g-MySQL/mapping.ttl deleted file mode 100644 index 95cf92ac..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-MySQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph rml:defaultGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0007g-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0007g-MySQL/output.nq deleted file mode 100644 index 6c29bcce..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-MySQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0007g-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0007g-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/mapping.ttl deleted file mode 100644 index bb47312d..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph rml:defaultGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/output.nq deleted file mode 100644 index 6c29bcce..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007g-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007g-SPARQL/mapping.ttl deleted file mode 100644 index 09958b72..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-SPARQL/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph rml:defaultGraph; - rml:template "http://example.com/Student/{ID.value}/{FirstName.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0007g-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0007g-SPARQL/output.nq deleted file mode 100644 index 6c29bcce..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-SPARQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0007g-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0007g-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0007g-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0007g-SQLServer/mapping.ttl deleted file mode 100644 index 0cb0116a..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-SQLServer/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph rml:defaultGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0007g-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0007g-SQLServer/output.nq deleted file mode 100644 index 6c29bcce..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-SQLServer/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0007g-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0007g-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007g-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0007g-XML/mapping.ttl deleted file mode 100644 index 942a30b4..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-XML/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graph rml:defaultGraph; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007g-XML/output.nq b/src/test/resources/rml-core/RMLTC0007g-XML/output.nq deleted file mode 100644 index 6c29bcce..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-XML/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus" . - diff --git a/src/test/resources/rml-core/RMLTC0007g-XML/student.xml b/src/test/resources/rml-core/RMLTC0007g-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0007g-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0007h-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0007h-CSV/mapping.ttl deleted file mode 100644 index 6be1b2bc..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-CSV/mapping.ttl +++ /dev/null @@ -1,24 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graphMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007h-CSV/student.csv b/src/test/resources/rml-core/RMLTC0007h-CSV/student.csv deleted file mode 100644 index 1851cef9..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams diff --git a/src/test/resources/rml-core/RMLTC0007h-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007h-JSON/mapping.ttl deleted file mode 100644 index b85c1fc5..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-JSON/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graphMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007h-JSON/student.json b/src/test/resources/rml-core/RMLTC0007h-JSON/student.json deleted file mode 100644 index dcdd9388..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "FirstName":"Venus", - "LastName":"Williams" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0007h-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007h-MySQL/mapping.ttl deleted file mode 100644 index 3d622a90..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-MySQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graphMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0007h-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0007h-MySQL/resource.sql deleted file mode 100644 index 0135d051..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(50), - LastName VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007h-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007h-PostgreSQL/mapping.ttl deleted file mode 100644 index 2fb1fa99..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graphMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0007h-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0007h-PostgreSQL/resource.sql deleted file mode 100644 index b5c63bc3..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007h-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0007h-SPARQL/mapping.ttl deleted file mode 100644 index e323fc9a..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-SPARQL/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?FirstName ?LastName ?ID - WHERE { - ?x foaf:firstName ?FirstName ; - foaf:lastName ?LastName ; - rdf:ID ?ID . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graphMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:template "http://example.com/Student/{ID.value}/{FirstName.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0007h-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0007h-SPARQL/resource.ttl deleted file mode 100644 index f4a7ed47..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-SPARQL/resource.ttl +++ /dev/null @@ -1,7 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "10" ; - foaf:firstName "Venus" ; - foaf:lastName "Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0007h-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0007h-SQLServer/mapping.ttl deleted file mode 100644 index 976ef9d6..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-SQLServer/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graphMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0007h-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0007h-SQLServer/resource.sql deleted file mode 100644 index 976627c7..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "FirstName" VARCHAR(50), - "LastName" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus', 'Williams'); diff --git a/src/test/resources/rml-core/RMLTC0007h-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0007h-XML/mapping.ttl deleted file mode 100644 index 6288a1e5..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-XML/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:graphMap [ - rml:reference "Name"; - rml:termType rml:Literal - ]; - rml:template "http://example.com/Student/{ID}/{FirstName}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0007h-XML/student.xml b/src/test/resources/rml-core/RMLTC0007h-XML/student.xml deleted file mode 100644 index 44eab80f..00000000 --- a/src/test/resources/rml-core/RMLTC0007h-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus - Williams - - diff --git a/src/test/resources/rml-core/RMLTC0008a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0008a-CSV/mapping.ttl deleted file mode 100644 index 0764fee6..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-CSV/mapping.ttl +++ /dev/null @@ -1,38 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate ex:Sport - ]; - rml:subjectMap [ - rml:graphMap [ - rml:template "http://example.com/graph/Student/{ID}/{Name}" - ]; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0008a-CSV/output.nq deleted file mode 100644 index 2856ef24..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-CSV/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "Venus Williams" . - "10" . - "Tennis" . - diff --git a/src/test/resources/rml-core/RMLTC0008a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0008a-CSV/student.csv deleted file mode 100644 index fb130b76..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name,Sport -10,Venus Williams,Tennis diff --git a/src/test/resources/rml-core/RMLTC0008a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0008a-JSON/mapping.ttl deleted file mode 100644 index 235fc633..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-JSON/mapping.ttl +++ /dev/null @@ -1,39 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate ex:Sport - ]; - rml:subjectMap [ - rml:graphMap [ - rml:template "http://example.com/graph/Student/{ID}/{Name}" - ]; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0008a-JSON/output.nq deleted file mode 100644 index 2856ef24..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-JSON/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "Venus Williams" . - "10" . - "Tennis" . - diff --git a/src/test/resources/rml-core/RMLTC0008a-JSON/student.json b/src/test/resources/rml-core/RMLTC0008a-JSON/student.json deleted file mode 100644 index cd7526f3..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus Williams", - "Sport": "Tennis" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0008a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008a-MySQL/mapping.ttl deleted file mode 100644 index dbe815e6..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-MySQL/mapping.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate ex:Sport - ]; - rml:subjectMap [ - rml:graphMap [ - rml:template "http://example.com/graph/Student/{ID}/{Name}" - ]; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0008a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0008a-MySQL/output.nq deleted file mode 100644 index 8c3c01f8..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-MySQL/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - "Venus Williams" . - "10"^^ . - "Tennis" . - - diff --git a/src/test/resources/rml-core/RMLTC0008a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0008a-MySQL/resource.sql deleted file mode 100644 index 31e00260..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50), - Sport VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/mapping.ttl deleted file mode 100644 index f84e0538..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate ex:Sport - ]; - rml:subjectMap [ - rml:graphMap [ - rml:template "http://example.com/graph/Student/{ID}/{Name}" - ]; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/output.nq deleted file mode 100644 index 8c3c01f8..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - "Venus Williams" . - "10"^^ . - "Tennis" . - - diff --git a/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/resource.sql deleted file mode 100644 index 3ad893a6..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008a-SPARQL/mapping.ttl deleted file mode 100644 index 97d3504b..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-SPARQL/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rdf: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?Sport ?ID - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID ; - ?sportObject . - ?sportObject foaf:name ?Sport . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID.value" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "Sport.value" - ]; - rml:predicate ex:Sport - ]; - rml:subjectMap [ - rml:graphMap [ - rml:template "http://example.com/graph/Student/{ID.value}/{Name.value}" - ]; - rml:template "http://example.com/Student/{ID.value}/{Name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0008a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0008a-SPARQL/output.nq deleted file mode 100644 index 2856ef24..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-SPARQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "Venus Williams" . - "10" . - "Tennis" . - diff --git a/src/test/resources/rml-core/RMLTC0008a-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0008a-SPARQL/resource.ttl deleted file mode 100644 index e7007e36..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-SPARQL/resource.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix ns1: . -@prefix rdf: . - -[] ns1:plays [ a ns1:Sport ; - foaf:name "Tennis" ] ; - rdf:ID "10" ; - foaf:name "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0008a-SQLServer/mapping.ttl deleted file mode 100644 index e0220849..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-SQLServer/mapping.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate ex:Sport - ]; - rml:subjectMap [ - rml:graphMap [ - rml:template "http://example.com/graph/Student/{ID}/{Name}" - ]; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0008a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0008a-SQLServer/output.nq deleted file mode 100644 index 8c3c01f8..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-SQLServer/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - "Venus Williams" . - "10"^^ . - "Tennis" . - - diff --git a/src/test/resources/rml-core/RMLTC0008a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0008a-SQLServer/resource.sql deleted file mode 100644 index e9b41d95..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0008a-XML/mapping.ttl deleted file mode 100644 index e9f3ac3f..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-XML/mapping.ttl +++ /dev/null @@ -1,39 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "Sport" - ]; - rml:predicate ex:Sport - ]; - rml:subjectMap [ - rml:graphMap [ - rml:template "http://example.com/graph/Student/{ID}/{Name}" - ]; - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008a-XML/output.nq b/src/test/resources/rml-core/RMLTC0008a-XML/output.nq deleted file mode 100644 index 2856ef24..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "Venus Williams" . - "10" . - "Tennis" . - diff --git a/src/test/resources/rml-core/RMLTC0008a-XML/student.xml b/src/test/resources/rml-core/RMLTC0008a-XML/student.xml deleted file mode 100644 index 9ae75cc8..00000000 --- a/src/test/resources/rml-core/RMLTC0008a-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus Williams - Tennis - - diff --git a/src/test/resources/rml-core/RMLTC0008b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0008b-CSV/mapping.ttl deleted file mode 100644 index f6dc834f..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-CSV/mapping.ttl +++ /dev/null @@ -1,53 +0,0 @@ -@prefix activity: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:Sport - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a rml:RefObjectMap; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:object activity:Sport; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/{Sport}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0008b-CSV/output.nq deleted file mode 100644 index 7742ae45..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-CSV/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - "Venus Williams" . - "10" . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0008b-CSV/student.csv b/src/test/resources/rml-core/RMLTC0008b-CSV/student.csv deleted file mode 100644 index fb130b76..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name,Sport -10,Venus Williams,Tennis diff --git a/src/test/resources/rml-core/RMLTC0008b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0008b-JSON/mapping.ttl deleted file mode 100644 index 81ebfe7d..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-JSON/mapping.ttl +++ /dev/null @@ -1,55 +0,0 @@ -@prefix activity: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:Sport - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a rml:RefObjectMap; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:object activity:Sport; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/{Sport}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0008b-JSON/output.nq deleted file mode 100644 index 7742ae45..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-JSON/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - "Venus Williams" . - "10" . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0008b-JSON/student.json b/src/test/resources/rml-core/RMLTC0008b-JSON/student.json deleted file mode 100644 index cd7526f3..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus Williams", - "Sport": "Tennis" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0008b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008b-MySQL/mapping.ttl deleted file mode 100644 index 0b2c01af..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-MySQL/mapping.ttl +++ /dev/null @@ -1,56 +0,0 @@ -@prefix activity: . -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:Sport - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a rml:RefObjectMap; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object activity:Sport; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/{Sport}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0008b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0008b-MySQL/output.nq deleted file mode 100644 index 9271c2c5..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-MySQL/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - "Venus Williams" . - "10"^^ . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0008b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0008b-MySQL/resource.sql deleted file mode 100644 index 31e00260..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50), - Sport VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/mapping.ttl deleted file mode 100644 index 0a068c2e..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,56 +0,0 @@ -@prefix activity: . -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:Sport - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a rml:RefObjectMap; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object activity:Sport; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/{Sport}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/output.nq deleted file mode 100644 index 9271c2c5..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - "Venus Williams" . - "10"^^ . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/resource.sql deleted file mode 100644 index 3ad893a6..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008b-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008b-SPARQL/mapping.ttl deleted file mode 100644 index 35ffb33c..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-SPARQL/mapping.ttl +++ /dev/null @@ -1,77 +0,0 @@ -@prefix activity: . -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rdf: . -@prefix rml: . -@prefix sd: . - -ex:TriplesMap1 a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?ID - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID ; - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap ex:RefObjectMap1; - rml:predicate ex:Sport - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID.value" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID.value}/{Name.value}" - ] . - -ex:RefObjectMap1 a rml:RefObjectMap; - rml:parentTriplesMap ex:TriplesMap2 . - -ex:TriplesMap2 a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Sport - WHERE { - ?x a . - ?x foaf:name ?Sport . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:object activity:Sport; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/{Sport.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0008b-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0008b-SPARQL/output.nq deleted file mode 100644 index 7742ae45..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-SPARQL/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - "Venus Williams" . - "10" . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0008b-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0008b-SPARQL/resource.ttl deleted file mode 100644 index e7007e36..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-SPARQL/resource.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix ns1: . -@prefix rdf: . - -[] ns1:plays [ a ns1:Sport ; - foaf:name "Tennis" ] ; - rdf:ID "10" ; - foaf:name "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0008b-SQLServer/mapping.ttl deleted file mode 100644 index 08c9aab6..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-SQLServer/mapping.ttl +++ /dev/null @@ -1,56 +0,0 @@ -@prefix activity: . -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:Sport - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a rml:RefObjectMap; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:object activity:Sport; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/{Sport}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0008b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0008b-SQLServer/output.nq deleted file mode 100644 index 9271c2c5..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-SQLServer/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - "Venus Williams" . - "10"^^ . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0008b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0008b-SQLServer/resource.sql deleted file mode 100644 index e9b41d95..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0008b-XML/mapping.ttl deleted file mode 100644 index ae1f2f5f..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-XML/mapping.ttl +++ /dev/null @@ -1,55 +0,0 @@ -@prefix activity: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:Sport - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a rml:RefObjectMap; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:object activity:Sport; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "http://example.com/{Sport}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008b-XML/output.nq b/src/test/resources/rml-core/RMLTC0008b-XML/output.nq deleted file mode 100644 index 7742ae45..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-XML/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - "Venus Williams" . - "10" . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0008b-XML/student.xml b/src/test/resources/rml-core/RMLTC0008b-XML/student.xml deleted file mode 100644 index 9ae75cc8..00000000 --- a/src/test/resources/rml-core/RMLTC0008b-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus Williams - Tennis - - diff --git a/src/test/resources/rml-core/RMLTC0008c-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0008c-CSV/mapping.ttl deleted file mode 100644 index 1dd7e877..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-CSV/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name, foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008c-CSV/output.nq b/src/test/resources/rml-core/RMLTC0008c-CSV/output.nq deleted file mode 100644 index d36f700c..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-CSV/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus Williams" . - "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008c-CSV/student.csv b/src/test/resources/rml-core/RMLTC0008c-CSV/student.csv deleted file mode 100644 index fb130b76..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name,Sport -10,Venus Williams,Tennis diff --git a/src/test/resources/rml-core/RMLTC0008c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0008c-JSON/mapping.ttl deleted file mode 100644 index 3fa6f387..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-JSON/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name, foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0008c-JSON/output.nq deleted file mode 100644 index d36f700c..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-JSON/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus Williams" . - "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008c-JSON/student.json b/src/test/resources/rml-core/RMLTC0008c-JSON/student.json deleted file mode 100644 index cd7526f3..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus Williams", - "Sport": "Tennis" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0008c-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008c-MySQL/mapping.ttl deleted file mode 100644 index e4467dba..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-MySQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name, foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0008c-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0008c-MySQL/output.nq deleted file mode 100644 index d36f700c..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-MySQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus Williams" . - "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008c-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0008c-MySQL/resource.sql deleted file mode 100644 index 31e00260..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-MySQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50), - Sport VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/mapping.ttl deleted file mode 100644 index 21bc9fbd..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name, foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/output.nq deleted file mode 100644 index d36f700c..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus Williams" . - "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/resource.sql deleted file mode 100644 index 3ad893a6..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-PostgreSQL/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008c-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0008c-SPARQL/mapping.ttl deleted file mode 100644 index 54f6196f..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-SPARQL/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?ID - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID ; - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate ex:name, foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID.value}/{Name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0008c-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0008c-SPARQL/output.nq deleted file mode 100644 index d36f700c..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-SPARQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus Williams" . - "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008c-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0008c-SPARQL/resource.ttl deleted file mode 100644 index e7007e36..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-SPARQL/resource.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix foaf: . -@prefix ns1: . -@prefix rdf: . - -[] ns1:plays [ a ns1:Sport ; - foaf:name "Tennis" ] ; - rdf:ID "10" ; - foaf:name "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008c-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0008c-SQLServer/mapping.ttl deleted file mode 100644 index add0e4ae..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-SQLServer/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name, foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0008c-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0008c-SQLServer/output.nq deleted file mode 100644 index d36f700c..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-SQLServer/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus Williams" . - "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008c-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0008c-SQLServer/resource.sql deleted file mode 100644 index e9b41d95..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-SQLServer/resource.sql +++ /dev/null @@ -1,8 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0008c-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0008c-XML/mapping.ttl deleted file mode 100644 index 188d69e8..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-XML/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name, foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0008c-XML/output.nq b/src/test/resources/rml-core/RMLTC0008c-XML/output.nq deleted file mode 100644 index d36f700c..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-XML/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "Venus Williams" . - "Venus Williams" . - diff --git a/src/test/resources/rml-core/RMLTC0008c-XML/student.xml b/src/test/resources/rml-core/RMLTC0008c-XML/student.xml deleted file mode 100644 index 9ae75cc8..00000000 --- a/src/test/resources/rml-core/RMLTC0008c-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - 10 - Venus Williams - Tennis - - diff --git a/src/test/resources/rml-core/RMLTC0009a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0009a-CSV/mapping.ttl deleted file mode 100644 index 560934a1..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-CSV/mapping.ttl +++ /dev/null @@ -1,48 +0,0 @@ -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/sport_{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0009a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0009a-CSV/output.nq deleted file mode 100644 index b0b89f8b..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-CSV/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0009a-CSV/sport.csv b/src/test/resources/rml-core/RMLTC0009a-CSV/sport.csv deleted file mode 100644 index 800f4446..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-CSV/sport.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name -100,Tennis diff --git a/src/test/resources/rml-core/RMLTC0009a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0009a-CSV/student.csv deleted file mode 100644 index 1ed4c175..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-CSV/student.csv +++ /dev/null @@ -1,3 +0,0 @@ -ID,Sport,Name -10,100,Venus Williams -20,,Demi Moore diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0009a-JSON/mapping.ttl deleted file mode 100644 index 906ab93e..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-JSON/mapping.ttl +++ /dev/null @@ -1,50 +0,0 @@ -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.sports[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/sport_{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0009a-JSON/output.nq deleted file mode 100644 index b0b89f8b..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-JSON/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/sport.json b/src/test/resources/rml-core/RMLTC0009a-JSON/sport.json deleted file mode 100644 index 98b89704..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-JSON/sport.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "sports": [ - { - "ID": 100, - "Name": "Tennis" - } - ] -} diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/student.json b/src/test/resources/rml-core/RMLTC0009a-JSON/student.json deleted file mode 100644 index a99528c1..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-JSON/student.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "students" : [ - { - "ID": 10, - "Sport": 100, - "Name": "Venus Williams" - }, - { - "ID": 20, - "Name": "Demi Moore" - } - ] -} diff --git a/src/test/resources/rml-core/RMLTC0009a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009a-MySQL/mapping.ttl deleted file mode 100644 index 6de77ad5..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-MySQL/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/sport_{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0009a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0009a-MySQL/output.nq deleted file mode 100644 index b0b89f8b..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-MySQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0009a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0009a-MySQL/resource.sql deleted file mode 100644 index 6775e444..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-MySQL/resource.sql +++ /dev/null @@ -1,18 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - Sport VARCHAR(50), - Name VARCHAR(50) -); -INSERT INTO student values ('10', '100', 'Venus Williams'); -INSERT INTO student values ('20', NULL , 'Demi Moore'); - -DROP TABLE IF EXISTS test.sport; - -CREATE TABLE sport ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO sport values ('100', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/mapping.ttl deleted file mode 100644 index b2be3662..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/sport_{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/note.md b/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/note.md deleted file mode 100644 index 7c87bd86..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/note.md +++ /dev/null @@ -1,4 +0,0 @@ -## Change note - -Changes `Sport.ID` column from `INTEGER` to `VARCHAR` since postgres does not support joining on -columns of different types. diff --git a/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/output.nq deleted file mode 100644 index b0b89f8b..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/resource.sql deleted file mode 100644 index 0f674565..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-PostgreSQL/resource.sql +++ /dev/null @@ -1,17 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "Sport" VARCHAR(50), - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', '100', 'Venus Williams'); -INSERT INTO student values ('20', NULL , 'Demi Moore'); - -DROP TABLE IF EXISTS sport; - -CREATE TABLE sport ( - "ID" VARCHAR(50), - "Name" VARCHAR(50) -); -INSERT INTO sport values ('100', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0009a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009a-SPARQL/mapping.ttl deleted file mode 100644 index 907d5e2a..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-SPARQL/mapping.ttl +++ /dev/null @@ -1,79 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rdfs: . -@prefix rml: . -@prefix sd: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?ID ?Sport - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID ; - ?sportObject . - OPTIONAL { ?sportObject a ; - rdf:ID ?Sport . } - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{ID.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?ID ?Name - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID ; - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/sport_{ID.value}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0009a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0009a-SPARQL/output.nq deleted file mode 100644 index b0b89f8b..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-SPARQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0009a-SPARQL/resource1.ttl b/src/test/resources/rml-core/RMLTC0009a-SPARQL/resource1.ttl deleted file mode 100644 index 676bdb38..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-SPARQL/resource1.ttl +++ /dev/null @@ -1,13 +0,0 @@ -@prefix foaf: . -@prefix ns1: . -@prefix rdf: . - -[] ns1:plays [ a ns1:Sport ; - rdf:ID "100" ] ; - rdf:ID "10" ; - foaf:name "Venus Williams" . - -[] ns1:plays [ a ns1:Sport ] ; - rdf:ID "20" ; - foaf:name "Demi Moore" . - diff --git a/src/test/resources/rml-core/RMLTC0009a-SPARQL/resource2.ttl b/src/test/resources/rml-core/RMLTC0009a-SPARQL/resource2.ttl deleted file mode 100644 index d69ef52e..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-SPARQL/resource2.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "100" ; - foaf:name "Tennis" . - diff --git a/src/test/resources/rml-core/RMLTC0009a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0009a-SQLServer/mapping.ttl deleted file mode 100644 index bb76cc7b..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-SQLServer/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/sport_{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0009a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0009a-SQLServer/output.nq deleted file mode 100644 index b0b89f8b..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-SQLServer/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0009a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0009a-SQLServer/resource.sql deleted file mode 100644 index 2b79a5d4..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-SQLServer/resource.sql +++ /dev/null @@ -1,17 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "Sport" VARCHAR(50), - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', '100', 'Venus Williams'); -INSERT INTO student values ('20', NULL , 'Demi Moore'); - -DROP TABLE IF EXISTS sport; - -CREATE TABLE sport ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO sport values ('100', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0009a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0009a-XML/mapping.ttl deleted file mode 100644 index 675df8ee..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-XML/mapping.ttl +++ /dev/null @@ -1,50 +0,0 @@ -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/sports/sport"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/sport_{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0009a-XML/output.nq b/src/test/resources/rml-core/RMLTC0009a-XML/output.nq deleted file mode 100644 index b0b89f8b..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-XML/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - "Tennis" . - . diff --git a/src/test/resources/rml-core/RMLTC0009a-XML/sport.xml b/src/test/resources/rml-core/RMLTC0009a-XML/sport.xml deleted file mode 100644 index 1c02bdb8..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-XML/sport.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 100 - Tennis - - diff --git a/src/test/resources/rml-core/RMLTC0009a-XML/student.xml b/src/test/resources/rml-core/RMLTC0009a-XML/student.xml deleted file mode 100644 index a66c01aa..00000000 --- a/src/test/resources/rml-core/RMLTC0009a-XML/student.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 10 - Venus Williams - 100 - - - 20 - Demi Moore - - diff --git a/src/test/resources/rml-core/RMLTC0009b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0009b-CSV/mapping.ttl deleted file mode 100644 index 10635ed6..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-CSV/mapping.ttl +++ /dev/null @@ -1,54 +0,0 @@ -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:graph ; - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:graph ; - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/sport_{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0009b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0009b-CSV/output.nq deleted file mode 100644 index aef6b08c..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-CSV/output.nq +++ /dev/null @@ -1,8 +0,0 @@ - . - "Venus Williams" . - . - "Demi Moore" . - . - "Tennis" . - . - . diff --git a/src/test/resources/rml-core/RMLTC0009b-CSV/sport.csv b/src/test/resources/rml-core/RMLTC0009b-CSV/sport.csv deleted file mode 100644 index 800f4446..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-CSV/sport.csv +++ /dev/null @@ -1,2 +0,0 @@ -ID,Name -100,Tennis diff --git a/src/test/resources/rml-core/RMLTC0009b-CSV/student.csv b/src/test/resources/rml-core/RMLTC0009b-CSV/student.csv deleted file mode 100644 index 1ed4c175..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-CSV/student.csv +++ /dev/null @@ -1,3 +0,0 @@ -ID,Sport,Name -10,100,Venus Williams -20,,Demi Moore diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0009b-JSON/mapping.ttl deleted file mode 100644 index 026676d6..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-JSON/mapping.ttl +++ /dev/null @@ -1,56 +0,0 @@ -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:graph ; - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:graph ; - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.sports[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/sport_{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0009b-JSON/output.nq deleted file mode 100644 index aef6b08c..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-JSON/output.nq +++ /dev/null @@ -1,8 +0,0 @@ - . - "Venus Williams" . - . - "Demi Moore" . - . - "Tennis" . - . - . diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/sport.json b/src/test/resources/rml-core/RMLTC0009b-JSON/sport.json deleted file mode 100644 index 98b89704..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-JSON/sport.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "sports": [ - { - "ID": 100, - "Name": "Tennis" - } - ] -} diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/student.json b/src/test/resources/rml-core/RMLTC0009b-JSON/student.json deleted file mode 100644 index a99528c1..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-JSON/student.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "students" : [ - { - "ID": 10, - "Sport": 100, - "Name": "Venus Williams" - }, - { - "ID": 20, - "Name": "Demi Moore" - } - ] -} diff --git a/src/test/resources/rml-core/RMLTC0009b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009b-MySQL/mapping.ttl deleted file mode 100644 index 26e61b51..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-MySQL/mapping.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:graph ; - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:graph ; - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/sport_{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0009b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0009b-MySQL/output.nq deleted file mode 100644 index aef6b08c..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-MySQL/output.nq +++ /dev/null @@ -1,8 +0,0 @@ - . - "Venus Williams" . - . - "Demi Moore" . - . - "Tennis" . - . - . diff --git a/src/test/resources/rml-core/RMLTC0009b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0009b-MySQL/resource.sql deleted file mode 100644 index 18cb6cd9..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-MySQL/resource.sql +++ /dev/null @@ -1,18 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - Sport VARCHAR(50), - Name VARCHAR(50) -); -INSERT INTO student values ('10', '100', 'Venus Williams'); -INSERT INTO student values ('20', NULL, 'Demi Moore'); - -DROP TABLE IF EXISTS test.sport; - -CREATE TABLE sport ( - ID INTEGER, - Name VARCHAR(50) -); -INSERT INTO sport values ('100', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/mapping.ttl deleted file mode 100644 index b04272f3..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:graph ; - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:graph ; - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/sport_{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/note.md b/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/note.md deleted file mode 100644 index 7c87bd86..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/note.md +++ /dev/null @@ -1,4 +0,0 @@ -## Change note - -Changes `Sport.ID` column from `INTEGER` to `VARCHAR` since postgres does not support joining on -columns of different types. diff --git a/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/output.nq deleted file mode 100644 index aef6b08c..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/output.nq +++ /dev/null @@ -1,8 +0,0 @@ - . - "Venus Williams" . - . - "Demi Moore" . - . - "Tennis" . - . - . diff --git a/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/resource.sql deleted file mode 100644 index be021479..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-PostgreSQL/resource.sql +++ /dev/null @@ -1,17 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "Sport" VARCHAR(50), - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', '100', 'Venus Williams'); -INSERT INTO student values ('20', NULL, 'Demi Moore'); - -DROP TABLE IF EXISTS sport; - -CREATE TABLE sport ( - "ID" VARCHAR(50), - "Name" VARCHAR(50) -); -INSERT INTO sport values ('100', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0009b-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009b-SPARQL/mapping.ttl deleted file mode 100644 index 18ce4dc3..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-SPARQL/mapping.ttl +++ /dev/null @@ -1,85 +0,0 @@ -@prefix foaf: . -@prefix formats: . -@prefix rdfs: . -@prefix rml: . -@prefix sd: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?ID ?Sport - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID ; - ?sportObject . - OPTIONAL { ?sportObject a ; - rdf:ID ?Sport . } - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:graph ; - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate foaf:name - ], [ - rml:graph ; - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport.value"; - rml:parent "ID.value" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/student_{ID.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?ID ?Name - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID ; - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name.value" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/sport_{ID.value}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0009b-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0009b-SPARQL/output.nq deleted file mode 100644 index aef6b08c..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-SPARQL/output.nq +++ /dev/null @@ -1,8 +0,0 @@ - . - "Venus Williams" . - . - "Demi Moore" . - . - "Tennis" . - . - . diff --git a/src/test/resources/rml-core/RMLTC0009b-SPARQL/resource1.ttl b/src/test/resources/rml-core/RMLTC0009b-SPARQL/resource1.ttl deleted file mode 100644 index 676bdb38..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-SPARQL/resource1.ttl +++ /dev/null @@ -1,13 +0,0 @@ -@prefix foaf: . -@prefix ns1: . -@prefix rdf: . - -[] ns1:plays [ a ns1:Sport ; - rdf:ID "100" ] ; - rdf:ID "10" ; - foaf:name "Venus Williams" . - -[] ns1:plays [ a ns1:Sport ] ; - rdf:ID "20" ; - foaf:name "Demi Moore" . - diff --git a/src/test/resources/rml-core/RMLTC0009b-SPARQL/resource2.ttl b/src/test/resources/rml-core/RMLTC0009b-SPARQL/resource2.ttl deleted file mode 100644 index d69ef52e..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-SPARQL/resource2.ttl +++ /dev/null @@ -1,6 +0,0 @@ -@prefix foaf: . -@prefix rdf: . - -[] rdf:ID "100" ; - foaf:name "Tennis" . - diff --git a/src/test/resources/rml-core/RMLTC0009b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0009b-SQLServer/mapping.ttl deleted file mode 100644 index fb79327e..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-SQLServer/mapping.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:graph ; - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:graph ; - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/sport_{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0009b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0009b-SQLServer/output.nq deleted file mode 100644 index aef6b08c..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-SQLServer/output.nq +++ /dev/null @@ -1,8 +0,0 @@ - . - "Venus Williams" . - . - "Demi Moore" . - . - "Tennis" . - . - . diff --git a/src/test/resources/rml-core/RMLTC0009b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0009b-SQLServer/resource.sql deleted file mode 100644 index ac6eca67..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-SQLServer/resource.sql +++ /dev/null @@ -1,18 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "Sport" VARCHAR(50), - "Name" VARCHAR(50) -); -INSERT INTO student values ('10', '100', 'Venus Williams'); -INSERT INTO student values ('20', NULL, 'Demi Moore'); - -DROP TABLE IF EXISTS sport; - -CREATE TABLE sport ( - "ID" INTEGER, - "Name" VARCHAR(50) -); -INSERT INTO sport values ('100', 'Tennis'); diff --git a/src/test/resources/rml-core/RMLTC0009b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0009b-XML/mapping.ttl deleted file mode 100644 index 010b4c72..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-XML/mapping.ttl +++ /dev/null @@ -1,56 +0,0 @@ -@prefix foaf: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:graph ; - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:graph ; - rml:objectMap [ a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "ID" - ]; - rml:parentTriplesMap - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/student_{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/sports/sport"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:class ; - rml:graph ; - rml:template "http://example.com/resource/sport_{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0009b-XML/output.nq b/src/test/resources/rml-core/RMLTC0009b-XML/output.nq deleted file mode 100644 index aef6b08c..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-XML/output.nq +++ /dev/null @@ -1,8 +0,0 @@ - . - "Venus Williams" . - . - "Demi Moore" . - . - "Tennis" . - . - . diff --git a/src/test/resources/rml-core/RMLTC0009b-XML/sport.xml b/src/test/resources/rml-core/RMLTC0009b-XML/sport.xml deleted file mode 100644 index 1c02bdb8..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-XML/sport.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - 100 - Tennis - - diff --git a/src/test/resources/rml-core/RMLTC0009b-XML/student.xml b/src/test/resources/rml-core/RMLTC0009b-XML/student.xml deleted file mode 100644 index a66c01aa..00000000 --- a/src/test/resources/rml-core/RMLTC0009b-XML/student.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - 10 - Venus Williams - 100 - - - 20 - Demi Moore - - diff --git a/src/test/resources/rml-core/RMLTC0009c-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009c-MySQL/mapping.ttl deleted file mode 100644 index d91b6e5a..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-MySQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Name, COUNT(Sport) - FROM Student - GROUP BY Name - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0009c-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0009c-MySQL/output.nq deleted file mode 100644 index f789cbf8..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-MySQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - - diff --git a/src/test/resources/rml-core/RMLTC0009c-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0009c-MySQL/resource.sql deleted file mode 100644 index 4076cd0f..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-MySQL/resource.sql +++ /dev/null @@ -1,21 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Sport; -DROP TABLE IF EXISTS test.Student; - -CREATE TABLE Sport ( -ID integer, -Name varchar (50), -PRIMARY KEY (ID) -); - -CREATE TABLE Student ( -ID integer, -Name varchar(50), -Sport integer, -PRIMARY KEY (ID), -FOREIGN KEY(Sport) REFERENCES Sport(ID) -); - -INSERT INTO Sport (ID, Name) VALUES (100,'Tennis'); -INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100); -INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL); diff --git a/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/mapping.ttl deleted file mode 100644 index ac18f544..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Name, COUNT(Sport) - FROM Student - GROUP BY Name - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/output.nq deleted file mode 100644 index f789cbf8..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - - diff --git a/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/resource.sql deleted file mode 100644 index 068f4d87..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-PostgreSQL/resource.sql +++ /dev/null @@ -1,20 +0,0 @@ -DROP TABLE IF EXISTS Sport; -DROP TABLE IF EXISTS Student; - -CREATE TABLE Sport ( -ID integer, -Name varchar (50), -PRIMARY KEY (ID) -); - -CREATE TABLE Student ( -ID integer, -Name varchar(50), -Sport integer, -PRIMARY KEY (ID), -FOREIGN KEY(Sport) REFERENCES Sport(ID) -); - -INSERT INTO Sport (ID, Name) VALUES (100,'Tennis'); -INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100); -INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL); diff --git a/src/test/resources/rml-core/RMLTC0009c-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0009c-SQLServer/mapping.ttl deleted file mode 100644 index 23c4f1dd..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-SQLServer/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Name, COUNT(Sport) - FROM Student - GROUP BY Name - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0009c-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0009c-SQLServer/output.nq deleted file mode 100644 index f789cbf8..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-SQLServer/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Venus Williams" . - "Demi Moore" . - - diff --git a/src/test/resources/rml-core/RMLTC0009c-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0009c-SQLServer/resource.sql deleted file mode 100644 index e23c539d..00000000 --- a/src/test/resources/rml-core/RMLTC0009c-SQLServer/resource.sql +++ /dev/null @@ -1,21 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Sport; -DROP TABLE IF EXISTS Student; - -CREATE TABLE Sport ( -ID integer, -Name varchar (50), -PRIMARY KEY (ID) -); - -CREATE TABLE Student ( -ID integer, -Name varchar(50), -Sport integer, -PRIMARY KEY (ID), -FOREIGN KEY(Sport) REFERENCES Sport(ID) -); - -INSERT INTO Sport (ID, Name) VALUES (100,'Tennis'); -INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100); -INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL); diff --git a/src/test/resources/rml-core/RMLTC0009d-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009d-MySQL/mapping.ttl deleted file mode 100644 index ce5b8cd7..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-MySQL/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Name, COUNT(Sport) as SPORTCOUNT - FROM Student - GROUP BY Name - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "SPORTCOUNT" - ]; - rml:predicate ex:numSport - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0009d-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0009d-MySQL/output.nq deleted file mode 100644 index 9ecd9fc2..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-MySQL/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - "Venus Williams" . - "1"^^ . - "Demi Moore" . - "0"^^ . - - - diff --git a/src/test/resources/rml-core/RMLTC0009d-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0009d-MySQL/resource.sql deleted file mode 100644 index a5947eb9..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-MySQL/resource.sql +++ /dev/null @@ -1,21 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Student; -DROP TABLE IF EXISTS test.Sport; - -CREATE TABLE Sport ( -ID integer, -Name varchar (50), -PRIMARY KEY (ID) -); - -CREATE TABLE Student ( -ID integer, -Name varchar(50), -Sport integer, -PRIMARY KEY (ID), -FOREIGN KEY(Sport) REFERENCES Sport(ID) -); - -INSERT INTO Sport (ID, Name) VALUES (100,'Tennis'); -INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100); -INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL); diff --git a/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/mapping.ttl deleted file mode 100644 index a701020d..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Name, COUNT(Sport) as SPORTCOUNT - FROM Student - GROUP BY Name - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "sportcount" - ]; - rml:predicate ex:numSport - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/output.nq deleted file mode 100644 index 9ecd9fc2..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - "Venus Williams" . - "1"^^ . - "Demi Moore" . - "0"^^ . - - - diff --git a/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/resource.sql deleted file mode 100644 index d8ba9270..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-PostgreSQL/resource.sql +++ /dev/null @@ -1,20 +0,0 @@ -DROP TABLE IF EXISTS Student; -DROP TABLE IF EXISTS Sport; - -CREATE TABLE Sport ( -ID integer, -Name varchar (50), -PRIMARY KEY (ID) -); - -CREATE TABLE Student ( -ID integer, -Name varchar(50), -Sport integer, -PRIMARY KEY (ID), -FOREIGN KEY(Sport) REFERENCES Sport(ID) -); - -INSERT INTO Sport (ID, Name) VALUES (100,'Tennis'); -INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100); -INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL); diff --git a/src/test/resources/rml-core/RMLTC0009d-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0009d-SQLServer/mapping.ttl deleted file mode 100644 index e50b0333..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-SQLServer/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Name, COUNT(Sport) as SPORTCOUNT - FROM Student - GROUP BY Name - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "SPORTCOUNT" - ]; - rml:predicate ex:numSport - ]; - rml:subjectMap [ - rml:template "http://example.com/resource/student_{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0009d-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0009d-SQLServer/output.nq deleted file mode 100644 index 9ecd9fc2..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-SQLServer/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - "Venus Williams" . - "1"^^ . - "Demi Moore" . - "0"^^ . - - - diff --git a/src/test/resources/rml-core/RMLTC0009d-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0009d-SQLServer/resource.sql deleted file mode 100644 index ad1775c0..00000000 --- a/src/test/resources/rml-core/RMLTC0009d-SQLServer/resource.sql +++ /dev/null @@ -1,21 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Student; -DROP TABLE IF EXISTS Sport; - -CREATE TABLE Sport ( -ID integer, -Name varchar (50), -PRIMARY KEY (ID) -); - -CREATE TABLE Student ( -ID integer, -Name varchar(50), -Sport integer, -PRIMARY KEY (ID), -FOREIGN KEY(Sport) REFERENCES Sport(ID) -); - -INSERT INTO Sport (ID, Name) VALUES (100,'Tennis'); -INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100); -INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL); diff --git a/src/test/resources/rml-core/RMLTC0010a-CSV/country_info.csv b/src/test/resources/rml-core/RMLTC0010a-CSV/country_info.csv deleted file mode 100644 index 67082bbd..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-CSV/country_info.csv +++ /dev/null @@ -1,4 +0,0 @@ -Country Code,Name,ISO 3166 -1,"Bolivia, Plurinational State of",BO -2,"Ireland",IE -3,"Saint Martin (French part)",MF diff --git a/src/test/resources/rml-core/RMLTC0010a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0010a-CSV/mapping.ttl deleted file mode 100644 index c1b0e5ce..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_info.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0010a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0010a-CSV/output.nq deleted file mode 100644 index 29911d6f..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-CSV/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010a-JSON/country_info.json b/src/test/resources/rml-core/RMLTC0010a-JSON/country_info.json deleted file mode 100644 index 4e8d578a..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-JSON/country_info.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "countries": [{ - "Country Code": 1, - "Name":"Bolivia, Plurinational State of", - "ISO 3166": "BO" - }, { - "Country Code": 2, - "Name":"Ireland", - "ISO 3166": "IE" - }, { - "Country Code": 3, - "Name":"Saint Martin (French part)", - "ISO 3166": "MF" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0010a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0010a-JSON/mapping.ttl deleted file mode 100644 index 68e3dd35..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.countries[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_info.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{$.['Country Code']}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0010a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0010a-JSON/output.nq deleted file mode 100644 index 29911d6f..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-JSON/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0010a-MySQL/mapping.ttl deleted file mode 100644 index 27735605..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0010a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0010a-MySQL/output.nq deleted file mode 100644 index 29911d6f..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-MySQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0010a-MySQL/resource.sql deleted file mode 100644 index 7a7aa74f..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-MySQL/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.country_info; - -CREATE TABLE country_info ( - `Country Code` INTEGER, - Name VARCHAR(100), - `ISO 3166` VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/mapping.ttl deleted file mode 100644 index 2c3734eb..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/output.nq deleted file mode 100644 index 29911d6f..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/resource.sql deleted file mode 100644 index 12f1652d..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-PostgreSQL/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE IF EXISTS country_info; - -CREATE TABLE country_info ( - "Country Code" INTEGER, - "Name" VARCHAR(100), - "ISO 3166" VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0010a-SQLServer/mapping.ttl deleted file mode 100644 index fdca61f9..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0010a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0010a-SQLServer/output.nq deleted file mode 100644 index 29911d6f..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-SQLServer/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0010a-SQLServer/resource.sql deleted file mode 100644 index 8c20c7bc..00000000 --- a/src/test/resources/rml-core/RMLTC0010a-SQLServer/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS country_info; - -CREATE TABLE country_info ( - "Country Code" INTEGER, - "Name" VARCHAR(100), - "ISO 3166" VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010b-CSV/country_info.csv b/src/test/resources/rml-core/RMLTC0010b-CSV/country_info.csv deleted file mode 100644 index c550dbf5..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-CSV/country_info.csv +++ /dev/null @@ -1,4 +0,0 @@ -Country Code,Name,ISO 3166 -1,"Bolivia, Plurinational State of",BO -2,Ireland,IE -3,"Saint Martin (French part)",MF diff --git a/src/test/resources/rml-core/RMLTC0010b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0010b-CSV/mapping.ttl deleted file mode 100644 index c425b43e..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_info.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0010b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0010b-CSV/output.nq deleted file mode 100644 index c92a08b0..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-CSV/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010b-JSON/country_info.json b/src/test/resources/rml-core/RMLTC0010b-JSON/country_info.json deleted file mode 100644 index 4e8d578a..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-JSON/country_info.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "countries": [{ - "Country Code": 1, - "Name":"Bolivia, Plurinational State of", - "ISO 3166": "BO" - }, { - "Country Code": 2, - "Name":"Ireland", - "ISO 3166": "IE" - }, { - "Country Code": 3, - "Name":"Saint Martin (French part)", - "ISO 3166": "MF" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0010b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0010b-JSON/mapping.ttl deleted file mode 100644 index 60f6394e..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.countries[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_info.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{$.['Country Code']}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0010b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0010b-JSON/output.nq deleted file mode 100644 index c92a08b0..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-JSON/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0010b-MySQL/mapping.ttl deleted file mode 100644 index 4f3f48c8..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0010b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0010b-MySQL/output.nq deleted file mode 100644 index c92a08b0..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-MySQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0010b-MySQL/resource.sql deleted file mode 100644 index 7a7aa74f..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-MySQL/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.country_info; - -CREATE TABLE country_info ( - `Country Code` INTEGER, - Name VARCHAR(100), - `ISO 3166` VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/mapping.ttl deleted file mode 100644 index 195c6fb6..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/output.nq deleted file mode 100644 index c92a08b0..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/resource.sql deleted file mode 100644 index 12f1652d..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-PostgreSQL/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE IF EXISTS country_info; - -CREATE TABLE country_info ( - "Country Code" INTEGER, - "Name" VARCHAR(100), - "ISO 3166" VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0010b-SQLServer/mapping.ttl deleted file mode 100644 index f925e352..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0010b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0010b-SQLServer/output.nq deleted file mode 100644 index c92a08b0..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-SQLServer/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0010b-SQLServer/resource.sql deleted file mode 100644 index 8c20c7bc..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-SQLServer/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS country_info; - -CREATE TABLE country_info ( - "Country Code" INTEGER, - "Name" VARCHAR(100), - "ISO 3166" VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010b-XML/country_info.xml b/src/test/resources/rml-core/RMLTC0010b-XML/country_info.xml deleted file mode 100644 index c47aa6ab..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-XML/country_info.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - 1 - Bolivia, Plurinational State of - BO - - - 2 - Ireland - IE - - - 3 - Saint Martin (French part) - MF - - - diff --git a/src/test/resources/rml-core/RMLTC0010b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0010b-XML/mapping.ttl deleted file mode 100644 index 44a0ce2d..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-XML/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/countries/country"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_info.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate ex:name - ]; - rml:subjectMap [ - rml:template "http://example.com/{CountryCode}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0010b-XML/output.nq b/src/test/resources/rml-core/RMLTC0010b-XML/output.nq deleted file mode 100644 index c92a08b0..00000000 --- a/src/test/resources/rml-core/RMLTC0010b-XML/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "Bolivia, Plurinational State of" . - "Ireland" . - "Saint Martin (French part)" . - diff --git a/src/test/resources/rml-core/RMLTC0010c-CSV/country_info.csv b/src/test/resources/rml-core/RMLTC0010c-CSV/country_info.csv deleted file mode 100644 index 2d42678e..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-CSV/country_info.csv +++ /dev/null @@ -1,4 +0,0 @@ -Country Code,Name,ISO 3166 -1,"Bolivia, Plurinational State of",BO -2,Ireland,IE -3,Saint Martin (French part),MF diff --git a/src/test/resources/rml-core/RMLTC0010c-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0010c-CSV/mapping.ttl deleted file mode 100644 index 715bbf2a..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-CSV/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_info.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}"; - rml:termType rml:Literal - ]; - rml:predicate ex:code - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0010c-CSV/output.nq b/src/test/resources/rml-core/RMLTC0010c-CSV/output.nq deleted file mode 100644 index 5c7e1080..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-CSV/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "{{{ BO }}}" . - "{{{ IE }}}" . - "{{{ MF }}}" . - diff --git a/src/test/resources/rml-core/RMLTC0010c-JSON/country_info.json b/src/test/resources/rml-core/RMLTC0010c-JSON/country_info.json deleted file mode 100644 index 4e8d578a..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-JSON/country_info.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "countries": [{ - "Country Code": 1, - "Name":"Bolivia, Plurinational State of", - "ISO 3166": "BO" - }, { - "Country Code": 2, - "Name":"Ireland", - "ISO 3166": "IE" - }, { - "Country Code": 3, - "Name":"Saint Martin (French part)", - "ISO 3166": "MF" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0010c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0010c-JSON/mapping.ttl deleted file mode 100644 index 67e61d6e..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-JSON/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.countries[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_info.json" - ] - ]; - rml:predicateObjectMap [ - rml:predicate ex:code; - rml:objectMap [ - rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}"; - rml:termType rml:Literal - ] - ]; - rml:subjectMap [ - rml:template "http://example.com/{$.['Country Code']}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0010c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0010c-JSON/output.nq deleted file mode 100644 index 5c7e1080..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-JSON/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "{{{ BO }}}" . - "{{{ IE }}}" . - "{{{ MF }}}" . - diff --git a/src/test/resources/rml-core/RMLTC0010c-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0010c-MySQL/mapping.ttl deleted file mode 100644 index 76afab7e..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-MySQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}"; - rml:termType rml:Literal - ]; - rml:predicate ex:code - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0010c-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0010c-MySQL/output.nq deleted file mode 100644 index 5c7e1080..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-MySQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "{{{ BO }}}" . - "{{{ IE }}}" . - "{{{ MF }}}" . - diff --git a/src/test/resources/rml-core/RMLTC0010c-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0010c-MySQL/resource.sql deleted file mode 100644 index 7a7aa74f..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-MySQL/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.country_info; - -CREATE TABLE country_info ( - `Country Code` INTEGER, - Name VARCHAR(100), - `ISO 3166` VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/mapping.ttl deleted file mode 100644 index 932ed73c..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}"; - rml:termType rml:Literal - ]; - rml:predicate ex:code - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/output.nq deleted file mode 100644 index 5c7e1080..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "{{{ BO }}}" . - "{{{ IE }}}" . - "{{{ MF }}}" . - diff --git a/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/resource.sql deleted file mode 100644 index 12f1652d..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-PostgreSQL/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE IF EXISTS country_info; - -CREATE TABLE country_info ( - "Country Code" INTEGER, - "Name" VARCHAR(100), - "ISO 3166" VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010c-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0010c-SQLServer/mapping.ttl deleted file mode 100644 index 8a72f22a..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-SQLServer/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "country_info" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}"; - rml:termType rml:Literal - ]; - rml:predicate ex:code - ]; - rml:subjectMap [ - rml:template "http://example.com/{Country Code}/{Name}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0010c-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0010c-SQLServer/output.nq deleted file mode 100644 index 5c7e1080..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-SQLServer/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "{{{ BO }}}" . - "{{{ IE }}}" . - "{{{ MF }}}" . - diff --git a/src/test/resources/rml-core/RMLTC0010c-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0010c-SQLServer/resource.sql deleted file mode 100644 index 8c20c7bc..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-SQLServer/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS country_info; - -CREATE TABLE country_info ( - "Country Code" INTEGER, - "Name" VARCHAR(100), - "ISO 3166" VARCHAR(10) -); -INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO'); -INSERT INTO country_info values ('2', 'Ireland', 'IE'); -INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF'); diff --git a/src/test/resources/rml-core/RMLTC0010c-XML/country_info.xml b/src/test/resources/rml-core/RMLTC0010c-XML/country_info.xml deleted file mode 100644 index c47aa6ab..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-XML/country_info.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - 1 - Bolivia, Plurinational State of - BO - - - 2 - Ireland - IE - - - 3 - Saint Martin (French part) - MF - - - diff --git a/src/test/resources/rml-core/RMLTC0010c-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0010c-XML/mapping.ttl deleted file mode 100644 index 4ecb5718..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-XML/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/countries/country"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_info.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "\\{\\{\\{ {ISO3166} \\}\\}\\}"; - rml:termType rml:Literal - ]; - rml:predicate ex:code - ]; - rml:subjectMap [ - rml:template "http://example.com/{CountryCode}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0010c-XML/output.nq b/src/test/resources/rml-core/RMLTC0010c-XML/output.nq deleted file mode 100644 index 5c7e1080..00000000 --- a/src/test/resources/rml-core/RMLTC0010c-XML/output.nq +++ /dev/null @@ -1,4 +0,0 @@ - "{{{ BO }}}" . - "{{{ IE }}}" . - "{{{ MF }}}" . - diff --git a/src/test/resources/rml-core/RMLTC0011a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0011a-MySQL/mapping.ttl deleted file mode 100644 index b99f63b0..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-MySQL/mapping.ttl +++ /dev/null @@ -1,72 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Student.ID as ID, - Student.FirstName as FirstName, - Student.LastName as LastName, - Sport.Description as Description, - Sport.ID as Sport_ID - FROM Student,Sport,Student_Sport - WHERE Student.ID = Student_Sport.ID_Student - AND Sport.ID = Student_Sport.ID_Sport; - """; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ], [ - rml:objectMap [ - rml:template "http://example.com/{Sport_ID}/{Description}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{FirstName};{LastName}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT * FROM Sport; - """; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Description" - ]; - rml:predicate ex:description - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Description}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0011a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0011a-MySQL/output.nq deleted file mode 100644 index 8d0bda97..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-MySQL/output.nq +++ /dev/null @@ -1,20 +0,0 @@ - "Tennis" . - "110"^^ . - . - "Williams" . - "Venus" . - "10"^^ . - "Football" . - "111"^^ . - . - "Villa" . - "David" . - "12"^^ . - "Formula1" . - "112"^^ . - "Alonso" . - "Fernando" . - "11"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0011a-MySQL/resource.sql deleted file mode 100644 index d5806a68..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-MySQL/resource.sql +++ /dev/null @@ -1,36 +0,0 @@ -USE test; -SET FOREIGN_KEY_CHECKS = 0; -DROP TABLE IF EXISTS test.Student_Sport; -DROP TABLE IF EXISTS test.Sport; -DROP TABLE IF EXISTS test.Student; -SET FOREIGN_KEY_CHECKS = 1; - -CREATE TABLE Student ( -ID integer PRIMARY KEY, -FirstName varchar(50), -LastName varchar(50) -); -CREATE TABLE Sport ( -ID integer PRIMARY KEY, -Description varchar(50) -); -CREATE TABLE Student_Sport ( -ID_Student integer, -ID_Sport integer, -PRIMARY KEY (ID_Student,ID_Sport), -FOREIGN KEY (ID_Student) REFERENCES Student(ID), -FOREIGN KEY (ID_Sport) REFERENCES Sport(ID) -); - -INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams'); -INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso'); -INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa'); - -INSERT INTO Sport (ID, Description) VALUES (110,'Tennis'); -INSERT INTO Sport (ID, Description) VALUES (111,'Football'); -INSERT INTO Sport (ID, Description) VALUES (112,'Formula1'); - -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111); diff --git a/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/mapping.ttl deleted file mode 100644 index 00faefd1..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,72 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Student.ID as ID, - Student.FirstName as FirstName, - Student.LastName as LastName, - Sport.Description as Description, - Sport.ID as Sport_ID - FROM Student,Sport,Student_Sport - WHERE Student.ID = Student_Sport.ID_Student - AND Sport.ID = Student_Sport.ID_Sport; - """; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "id" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "firstname" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "lastname" - ]; - rml:predicate ex:lastName - ], [ - rml:objectMap [ - rml:template "http://example.com/{sport_id}/{description}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/{id}/{firstname};{lastname}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT * FROM Sport ; - """; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "id" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "description" - ]; - rml:predicate ex:description - ]; - rml:subjectMap [ - rml:template "http://example.com/{id}/{description}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/output.nq deleted file mode 100644 index 8d0bda97..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/output.nq +++ /dev/null @@ -1,20 +0,0 @@ - "Tennis" . - "110"^^ . - . - "Williams" . - "Venus" . - "10"^^ . - "Football" . - "111"^^ . - . - "Villa" . - "David" . - "12"^^ . - "Formula1" . - "112"^^ . - "Alonso" . - "Fernando" . - "11"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/resource.sql deleted file mode 100644 index a256aa31..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-PostgreSQL/resource.sql +++ /dev/null @@ -1,33 +0,0 @@ -DROP TABLE IF EXISTS Student_Sport; -DROP TABLE IF EXISTS Sport CASCADE; -DROP TABLE IF EXISTS Student; - -CREATE TABLE Student ( -ID integer PRIMARY KEY, -FirstName varchar(50), -LastName varchar(50) -); -CREATE TABLE Sport ( -ID integer PRIMARY KEY, -Description varchar(50) -); -CREATE TABLE Student_Sport ( -ID_Student integer, -ID_Sport integer, -PRIMARY KEY (ID_Student,ID_Sport), -FOREIGN KEY (ID_Student) REFERENCES Student(ID), -FOREIGN KEY (ID_Sport) REFERENCES Sport(ID) -); - -INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams'); -INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso'); -INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa'); - -INSERT INTO Sport (ID, Description) VALUES (110,'Tennis'); -INSERT INTO Sport (ID, Description) VALUES (111,'Football'); -INSERT INTO Sport (ID, Description) VALUES (112,'Formula1'); - -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111); diff --git a/src/test/resources/rml-core/RMLTC0011a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0011a-SQLServer/mapping.ttl deleted file mode 100644 index 1f3daafb..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-SQLServer/mapping.ttl +++ /dev/null @@ -1,72 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Student.ID as ID, - Student.FirstName as FirstName, - Student.LastName as LastName, - Sport.Description as Description, - Sport.ID as Sport_ID - FROM Student,Sport,Student_Sport - WHERE Student.ID = Student_Sport.ID_Student - AND Sport.ID = Student_Sport.ID_Sport; - """; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ], [ - rml:objectMap [ - rml:template "http://example.com/{Sport_ID}/{Description}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{FirstName};{LastName}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT * FROM Sport ; - """; - rml:referenceFormulation rml:SQL2008Query; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Description" - ]; - rml:predicate ex:description - ]; - rml:subjectMap [ - rml:template "http://example.com/{ID}/{Description}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0011a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0011a-SQLServer/output.nq deleted file mode 100644 index 8d0bda97..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-SQLServer/output.nq +++ /dev/null @@ -1,20 +0,0 @@ - "Tennis" . - "110"^^ . - . - "Williams" . - "Venus" . - "10"^^ . - "Football" . - "111"^^ . - . - "Villa" . - "David" . - "12"^^ . - "Formula1" . - "112"^^ . - "Alonso" . - "Fernando" . - "11"^^ . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0011a-SQLServer/resource.sql deleted file mode 100644 index 0002c8ec..00000000 --- a/src/test/resources/rml-core/RMLTC0011a-SQLServer/resource.sql +++ /dev/null @@ -1,33 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE Student ( -ID integer PRIMARY KEY, -FirstName varchar(50), -LastName varchar(50) -); -CREATE TABLE Sport ( -ID integer PRIMARY KEY, -Description varchar(50) -); -CREATE TABLE Student_Sport ( -ID_Student integer, -ID_Sport integer, -PRIMARY KEY (ID_Student,ID_Sport), -FOREIGN KEY (ID_Student) REFERENCES Student(ID), -FOREIGN KEY (ID_Sport) REFERENCES Sport(ID) -); - -INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams'); -INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso'); -INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa'); - -INSERT INTO Sport (ID, Description) VALUES (110,'Tennis'); -INSERT INTO Sport (ID, Description) VALUES (111,'Football'); -INSERT INTO Sport (ID, Description) VALUES (112,'Formula1'); - -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112); -INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111); diff --git a/src/test/resources/rml-core/RMLTC0011b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0011b-CSV/mapping.ttl deleted file mode 100644 index c2f079c6..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-CSV/mapping.ttl +++ /dev/null @@ -1,66 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://example.com/sport/{ID_Sport}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID_Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Description" - ]; - rml:predicate ex:description - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/sport/{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0011b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0011b-CSV/output.nq deleted file mode 100644 index d2759cec..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-CSV/output.nq +++ /dev/null @@ -1,17 +0,0 @@ - "Williams" . - "Venus" . - "Villa" . - "David" . - "Alonso" . - "Fernando" . - "Tennis" . - "110" . - "Football" . - "111" . - "Formula1" . - "112" . - . - . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011b-CSV/sport.csv b/src/test/resources/rml-core/RMLTC0011b-CSV/sport.csv deleted file mode 100644 index 98446d06..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-CSV/sport.csv +++ /dev/null @@ -1,4 +0,0 @@ -ID,Description -110,Tennis -111,Football -112,Formula1 diff --git a/src/test/resources/rml-core/RMLTC0011b-CSV/student.csv b/src/test/resources/rml-core/RMLTC0011b-CSV/student.csv deleted file mode 100644 index acf08c28..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-CSV/student.csv +++ /dev/null @@ -1,4 +0,0 @@ -ID,FirstName,LastName -10,Venus,Williams -11,Fernando,Alonso -12,David,Villa diff --git a/src/test/resources/rml-core/RMLTC0011b-CSV/student_sport.csv b/src/test/resources/rml-core/RMLTC0011b-CSV/student_sport.csv deleted file mode 100644 index 381e9213..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-CSV/student_sport.csv +++ /dev/null @@ -1,5 +0,0 @@ -ID_Student,ID_Sport -10,110 -11,111 -11,112 -12,111 diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0011b-JSON/mapping.ttl deleted file mode 100644 index 17da3046..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-JSON/mapping.ttl +++ /dev/null @@ -1,69 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.links[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://example.com/sport/{ID_Sport}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID_Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.sports[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Description" - ]; - rml:predicate ex:description - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/sport/{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0011b-JSON/output.nq deleted file mode 100644 index d2759cec..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-JSON/output.nq +++ /dev/null @@ -1,17 +0,0 @@ - "Williams" . - "Venus" . - "Villa" . - "David" . - "Alonso" . - "Fernando" . - "Tennis" . - "110" . - "Football" . - "111" . - "Formula1" . - "112" . - . - . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/sport.json b/src/test/resources/rml-core/RMLTC0011b-JSON/sport.json deleted file mode 100644 index 7d4615b0..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-JSON/sport.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "sports": [ - {"ID":110, "Description":"Tennis"}, - {"ID":111, "Description":"Football"}, - {"ID":112, "Description":"Formula1"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/student.json b/src/test/resources/rml-core/RMLTC0011b-JSON/student.json deleted file mode 100644 index 60771847..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-JSON/student.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "students": [ - {"ID":10, "FirstName":"Venus", "LastName":"Williams"}, - {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"}, - {"ID":12, "FirstName":"David", "LastName":"Villa"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/student_sport.json b/src/test/resources/rml-core/RMLTC0011b-JSON/student_sport.json deleted file mode 100644 index 19c60124..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-JSON/student_sport.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "links": [ - {"ID_Student":10, "ID_Sport":110}, - {"ID_Student":11, "ID_Sport":111}, - {"ID_Student":11, "ID_Sport":112}, - {"ID_Student":12, "ID_Sport":111} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0011b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0011b-MySQL/mapping.ttl deleted file mode 100644 index c2c696bc..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-MySQL/mapping.ttl +++ /dev/null @@ -1,67 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://example.com/sport/{ID_Sport}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID_Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Description" - ]; - rml:predicate ex:description - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/sport/{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0011b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0011b-MySQL/output.nq deleted file mode 100644 index 6a82565e..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-MySQL/output.nq +++ /dev/null @@ -1,17 +0,0 @@ - "Williams" . - "Venus" . - "Villa" . - "David" . - "Alonso" . - "Fernando" . - "Tennis" . - "110"^^ . - "Football" . - "111"^^ . - "Formula1" . - "112"^^ . - . - . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0011b-MySQL/resource.sql deleted file mode 100644 index 5e3ce10b..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-MySQL/resource.sql +++ /dev/null @@ -1,34 +0,0 @@ -USE test; -SET FOREIGN_KEY_CHECKS = 0; -DROP TABLE IF EXISTS test.student_sport; -DROP TABLE IF EXISTS test.student; -DROP TABLE IF EXISTS test.sport; -SET FOREIGN_KEY_CHECKS = 1; - -CREATE TABLE sport ( - ID INTEGER, - Description VARCHAR(200) -); -INSERT INTO sport values ('110','Tennis'); -INSERT INTO sport values ('111','Football'); -INSERT INTO sport values ('112','Formula1'); - - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(200), - LastName VARCHAR(200) -); -INSERT INTO student values ('10','Venus','Williams'); -INSERT INTO student values ('11','Fernando','Alonso'); -INSERT INTO student values ('12','David','Villa'); - - -CREATE TABLE student_sport ( - ID_Student INTEGER, - ID_Sport INTEGER -); -INSERT INTO student_sport values ('10', '110'); -INSERT INTO student_sport values ('11','111'); -INSERT INTO student_sport values ('11','112'); -INSERT INTO student_sport values ('12','111'); diff --git a/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/mapping.ttl deleted file mode 100644 index 6accd44c..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,67 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://example.com/sport/{id_sport}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{id_student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "firstname" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "lastname" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{id}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "description" - ]; - rml:predicate ex:description - ], [ - rml:objectMap [ - rml:reference "id" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/sport/{id}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/output.nq deleted file mode 100644 index 6a82565e..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/output.nq +++ /dev/null @@ -1,17 +0,0 @@ - "Williams" . - "Venus" . - "Villa" . - "David" . - "Alonso" . - "Fernando" . - "Tennis" . - "110"^^ . - "Football" . - "111"^^ . - "Formula1" . - "112"^^ . - . - . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/resource.sql deleted file mode 100644 index acdc4aa1..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-PostgreSQL/resource.sql +++ /dev/null @@ -1,31 +0,0 @@ -DROP TABLE IF EXISTS student_sport; -DROP TABLE IF EXISTS student; -DROP TABLE IF EXISTS sport; - -CREATE TABLE sport ( - ID INTEGER, - Description VARCHAR(200) -); -INSERT INTO sport values ('110','Tennis'); -INSERT INTO sport values ('111','Football'); -INSERT INTO sport values ('112','Formula1'); - - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(200), - LastName VARCHAR(200) -); -INSERT INTO student values ('10','Venus','Williams'); -INSERT INTO student values ('11','Fernando','Alonso'); -INSERT INTO student values ('12','David','Villa'); - - -CREATE TABLE student_sport ( - ID_Student INTEGER, - ID_Sport INTEGER -); -INSERT INTO student_sport values ('10', '110'); -INSERT INTO student_sport values ('11','111'); -INSERT INTO student_sport values ('11','112'); -INSERT INTO student_sport values ('12','111'); diff --git a/src/test/resources/rml-core/RMLTC0011b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0011b-SQLServer/mapping.ttl deleted file mode 100644 index 192a0032..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-SQLServer/mapping.ttl +++ /dev/null @@ -1,67 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student_sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://example.com/sport/{ID_Sport}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID_Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "sport" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Description" - ]; - rml:predicate ex:description - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/sport/{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0011b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0011b-SQLServer/output.nq deleted file mode 100644 index 6a82565e..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-SQLServer/output.nq +++ /dev/null @@ -1,17 +0,0 @@ - "Williams" . - "Venus" . - "Villa" . - "David" . - "Alonso" . - "Fernando" . - "Tennis" . - "110"^^ . - "Football" . - "111"^^ . - "Formula1" . - "112"^^ . - . - . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0011b-SQLServer/resource.sql deleted file mode 100644 index d7644c70..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-SQLServer/resource.sql +++ /dev/null @@ -1,32 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student_sport; -DROP TABLE IF EXISTS student; -DROP TABLE IF EXISTS sport; - -CREATE TABLE sport ( - ID INTEGER, - Description VARCHAR(200) -); -INSERT INTO sport values ('110','Tennis'); -INSERT INTO sport values ('111','Football'); -INSERT INTO sport values ('112','Formula1'); - - -CREATE TABLE student ( - ID INTEGER, - FirstName VARCHAR(200), - LastName VARCHAR(200) -); -INSERT INTO student values ('10','Venus','Williams'); -INSERT INTO student values ('11','Fernando','Alonso'); -INSERT INTO student values ('12','David','Villa'); - - -CREATE TABLE student_sport ( - ID_Student INTEGER, - ID_Sport INTEGER -); -INSERT INTO student_sport values ('10', '110'); -INSERT INTO student_sport values ('11','111'); -INSERT INTO student_sport values ('11','112'); -INSERT INTO student_sport values ('12','111'); diff --git a/src/test/resources/rml-core/RMLTC0011b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0011b-XML/mapping.ttl deleted file mode 100644 index decc7ad2..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-XML/mapping.ttl +++ /dev/null @@ -1,69 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/links/link"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student_sport.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://example.com/sport/{ID_Sport}" - ]; - rml:predicate ex:plays - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID_Student}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/Students/Student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/student/{ID}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/Sports/Sport"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "sport.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Description" - ]; - rml:predicate ex:description - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ]; - rml:subjectMap [ - rml:template "http://example.com/sport/{ID}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0011b-XML/output.nq b/src/test/resources/rml-core/RMLTC0011b-XML/output.nq deleted file mode 100644 index d2759cec..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-XML/output.nq +++ /dev/null @@ -1,17 +0,0 @@ - "Williams" . - "Venus" . - "Villa" . - "David" . - "Alonso" . - "Fernando" . - "Tennis" . - "110" . - "Football" . - "111" . - "Formula1" . - "112" . - . - . - . - . - diff --git a/src/test/resources/rml-core/RMLTC0011b-XML/sport.xml b/src/test/resources/rml-core/RMLTC0011b-XML/sport.xml deleted file mode 100644 index a44806ba..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-XML/sport.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - 110 - Tennis - - - 111 - Football - - - 112 - Formula1 - - diff --git a/src/test/resources/rml-core/RMLTC0011b-XML/student.xml b/src/test/resources/rml-core/RMLTC0011b-XML/student.xml deleted file mode 100644 index 8d0a2ccd..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-XML/student.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - 10 - Venus - Williams - - - 11 - Fernando - Alonso - - - 12 - David - Villa - - diff --git a/src/test/resources/rml-core/RMLTC0011b-XML/student_sport.xml b/src/test/resources/rml-core/RMLTC0011b-XML/student_sport.xml deleted file mode 100644 index 3eeb2e92..00000000 --- a/src/test/resources/rml-core/RMLTC0011b-XML/student_sport.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - 10 - 110 - - - 11 - 111 - - - 11 - 112 - - - 12 - 111 - - diff --git a/src/test/resources/rml-core/RMLTC0012a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0012a-CSV/mapping.ttl deleted file mode 100644 index 6500c2d7..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-CSV/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}{lname}{amount}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0012a-CSV/output.nq deleted file mode 100644 index 7f9ce194..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-CSV/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith30 "30" . -_:BobSmith30 "Bob Smith" . -_:SueJones20 "20" . -_:SueJones20 "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012a-CSV/persons.csv b/src/test/resources/rml-core/RMLTC0012a-CSV/persons.csv deleted file mode 100644 index 6d1909d9..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-CSV/persons.csv +++ /dev/null @@ -1,4 +0,0 @@ -fname,lname,amount -Bob,Smith,30 -Sue,Jones,20 -Bob,Smith,30 diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0012a-JSON/mapping.ttl deleted file mode 100644 index 3db1ba6f..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-JSON/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}{lname}{amount}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0012a-JSON/output.nq deleted file mode 100644 index 7f9ce194..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-JSON/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith30 "30" . -_:BobSmith30 "Bob Smith" . -_:SueJones20 "20" . -_:SueJones20 "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0012a-JSON/persons.json deleted file mode 100644 index 513e9890..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-JSON/persons.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "persons": [ - {"fname":"Bob","lname":"Smith","amount":30}, - {"fname":"Sue","lname":"Jones","amount":20}, - {"fname":"Bob","lname":"Smith","amount":30} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0012a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012a-MySQL/mapping.ttl deleted file mode 100644 index c038ff8d..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-MySQL/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0012a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0012a-MySQL/output.nq deleted file mode 100644 index 10e4040a..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-MySQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:Bob_Smith_30 "30"^^ . -_:Bob_Smith_30 "Bob Smith" . -_:Sue_Jones_20 "20"^^ . -_:Sue_Jones_20 "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0012a-MySQL/resource.sql deleted file mode 100644 index 34ace06d..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-MySQL/resource.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.IOUs; -DROP TABLE IF EXISTS test.Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount INT); -/* We replaced DOUBLE with INT, because the datatype conversion is different across databases, and this test case is not relevant to that aspect */ -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/mapping.ttl deleted file mode 100644 index e126236d..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/output.nq deleted file mode 100644 index 10e4040a..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:Bob_Smith_30 "30"^^ . -_:Bob_Smith_30 "Bob Smith" . -_:Sue_Jones_20 "20"^^ . -_:Sue_Jones_20 "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/resource.sql deleted file mode 100644 index af98da75..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-PostgreSQL/resource.sql +++ /dev/null @@ -1,17 +0,0 @@ -DROP TABLE IF EXISTS IOUs; -DROP TABLE IF EXISTS Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount INT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012a-SPARQL/mapping.ttl deleted file mode 100644 index 65c6092f..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-SPARQL/mapping.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - rml:logicalSource [ - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?fname ?lname ?amount - WHERE { - ?x foaf:firstName ?fname ; - foaf:lastName ?lname ; - ?amount . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname.value} {lname.value}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount.value" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname.value}{lname.value}{amount.value}"; - rml:termType rml:BlankNode - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0012a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0012a-SPARQL/output.nq deleted file mode 100644 index 7f9ce194..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-SPARQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith30 "30" . -_:BobSmith30 "Bob Smith" . -_:SueJones20 "20" . -_:SueJones20 "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012a-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0012a-SPARQL/resource.ttl deleted file mode 100644 index 142bb85c..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-SPARQL/resource.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix foaf: . -@prefix ns1: . - -[] ns1:amount "30" ; - foaf:firstName "Bob" ; - foaf:lastName "Smith" . - -[] ns1:amount "20" ; - foaf:firstName "Sue" ; - foaf:lastName "Jones" . - -[] ns1:amount "30" ; - foaf:firstName "Bob" ; - foaf:lastName "Smith" . - diff --git a/src/test/resources/rml-core/RMLTC0012a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0012a-SQLServer/mapping.ttl deleted file mode 100644 index be494b3a..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-SQLServer/mapping.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0012a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0012a-SQLServer/output.nq deleted file mode 100644 index 10e4040a..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-SQLServer/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:Bob_Smith_30 "30"^^ . -_:Bob_Smith_30 "Bob Smith" . -_:Sue_Jones_20 "20"^^ . -_:Sue_Jones_20 "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0012a-SQLServer/resource.sql deleted file mode 100644 index fecf09a9..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-SQLServer/resource.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS IOUs; -DROP TABLE IF EXISTS Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount INT); -/* We replaced DOUBLE with INT, because the datatype conversion is different across databases, and this test case is not relevant to that aspect */ -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0012a-XML/mapping.ttl deleted file mode 100644 index cedf2559..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-XML/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/Persons/Person"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}{lname}{amount}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012a-XML/output.nq b/src/test/resources/rml-core/RMLTC0012a-XML/output.nq deleted file mode 100644 index 7f9ce194..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith30 "30" . -_:BobSmith30 "Bob Smith" . -_:SueJones20 "20" . -_:SueJones20 "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012a-XML/persons.xml b/src/test/resources/rml-core/RMLTC0012a-XML/persons.xml deleted file mode 100644 index 775d21eb..00000000 --- a/src/test/resources/rml-core/RMLTC0012a-XML/persons.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Bob - Smith - 30 - - - Sue - Jones - 20 - - - Bob - Smith - 30 - - diff --git a/src/test/resources/rml-core/RMLTC0012b-CSV/lives.csv b/src/test/resources/rml-core/RMLTC0012b-CSV/lives.csv deleted file mode 100644 index d82b0a3a..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-CSV/lives.csv +++ /dev/null @@ -1,4 +0,0 @@ -fname,lname,city -Bob,Smith,London -Sue,Jones,Madrid -Bob,Smith,London diff --git a/src/test/resources/rml-core/RMLTC0012b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0012b-CSV/mapping.ttl deleted file mode 100644 index 1b55acb8..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-CSV/mapping.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "lives.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate ex:city - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0012b-CSV/output.nq deleted file mode 100644 index 0d556bbd..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-CSV/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith "London" . -_:BobSmith "Bob Smith" . -_:SueJones "Madrid" . -_:SueJones "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-CSV/persons.csv b/src/test/resources/rml-core/RMLTC0012b-CSV/persons.csv deleted file mode 100644 index 6d1909d9..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-CSV/persons.csv +++ /dev/null @@ -1,4 +0,0 @@ -fname,lname,amount -Bob,Smith,30 -Sue,Jones,20 -Bob,Smith,30 diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/lives.json b/src/test/resources/rml-core/RMLTC0012b-JSON/lives.json deleted file mode 100644 index 6ffc3601..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-JSON/lives.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "lives": [ - {"fname":"Bob","lname":"Smith","city":"London"}, - {"fname":"Sue","lname":"Jones","city":"Madrid"}, - {"fname":"Bob","lname":"Smith","city":"London"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0012b-JSON/mapping.ttl deleted file mode 100644 index c0cf0407..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-JSON/mapping.ttl +++ /dev/null @@ -1,44 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.lives[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "lives.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate ex:city - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0012b-JSON/output.nq deleted file mode 100644 index 0d556bbd..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-JSON/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith "London" . -_:BobSmith "Bob Smith" . -_:SueJones "Madrid" . -_:SueJones "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0012b-JSON/persons.json deleted file mode 100644 index 513e9890..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-JSON/persons.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "persons": [ - {"fname":"Bob","lname":"Smith","amount":30}, - {"fname":"Sue","lname":"Jones","amount":20}, - {"fname":"Bob","lname":"Smith","amount":30} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0012b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012b-MySQL/mapping.ttl deleted file mode 100644 index 985da040..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-MySQL/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "persons" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "lives" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate ex:city - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0012b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0012b-MySQL/output.nq deleted file mode 100644 index 0d556bbd..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-MySQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith "London" . -_:BobSmith "Bob Smith" . -_:SueJones "Madrid" . -_:SueJones "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0012b-MySQL/resource.sql deleted file mode 100644 index 29ad8c68..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-MySQL/resource.sql +++ /dev/null @@ -1,22 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.persons; - -CREATE TABLE persons ( - fname VARCHAR(200), - lname VARCHAR(200), - amount INTEGER -); -INSERT INTO persons values ('Bob','Smith','30'); -INSERT INTO persons values ('Sue','Jones','20'); -INSERT INTO persons values ('Bob','Smith','30'); - -DROP TABLE IF EXISTS test.lives; - -CREATE TABLE lives ( - fname VARCHAR(200), - lname VARCHAR(200), - city VARCHAR(200) -); -INSERT INTO lives values ('Bob','Smith','London'); -INSERT INTO lives values ('Sue','Jones','Madrid'); -INSERT INTO lives values ('Bob','Smith','London'); diff --git a/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/mapping.ttl deleted file mode 100644 index 54534022..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "persons" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "lives" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate ex:city - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/output.nq deleted file mode 100644 index 0d556bbd..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith "London" . -_:BobSmith "Bob Smith" . -_:SueJones "Madrid" . -_:SueJones "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/resource.sql deleted file mode 100644 index 2761bf68..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-PostgreSQL/resource.sql +++ /dev/null @@ -1,21 +0,0 @@ -DROP TABLE IF EXISTS persons; - -CREATE TABLE persons ( - "fname" VARCHAR(200), - "lname" VARCHAR(200), - "amount" INTEGER -); -INSERT INTO persons values ('Bob','Smith','30'); -INSERT INTO persons values ('Sue','Jones','20'); -INSERT INTO persons values ('Bob','Smith','30'); - -DROP TABLE IF EXISTS lives; - -CREATE TABLE lives ( - "fname" VARCHAR(200), - "lname" VARCHAR(200), - "city" VARCHAR(200) -); -INSERT INTO lives values ('Bob','Smith','London'); -INSERT INTO lives values ('Sue','Jones','Madrid'); -INSERT INTO lives values ('Bob','Smith','London'); diff --git a/src/test/resources/rml-core/RMLTC0012b-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012b-SPARQL/mapping.ttl deleted file mode 100644 index f36eec4d..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-SPARQL/mapping.ttl +++ /dev/null @@ -1,71 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?fname ?lname - WHERE { - ?x foaf:firstName ?fname ; - foaf:lastName ?lname ; - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname.value} {lname.value}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{fname.value}{lname.value}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?city ?fname ?lname - WHERE { - ?x foaf:firstName ?fname ; - foaf:lastName ?lname ; - ?city . - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "city.value" - ]; - rml:predicate ex:city - ]; - rml:subjectMap [ - rml:template "{fname.value}{lname.value}"; - rml:termType rml:BlankNode - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0012b-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0012b-SPARQL/output.nq deleted file mode 100644 index 0d556bbd..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-SPARQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith "London" . -_:BobSmith "Bob Smith" . -_:SueJones "Madrid" . -_:SueJones "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-SPARQL/resource1.ttl b/src/test/resources/rml-core/RMLTC0012b-SPARQL/resource1.ttl deleted file mode 100644 index 142bb85c..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-SPARQL/resource1.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix foaf: . -@prefix ns1: . - -[] ns1:amount "30" ; - foaf:firstName "Bob" ; - foaf:lastName "Smith" . - -[] ns1:amount "20" ; - foaf:firstName "Sue" ; - foaf:lastName "Jones" . - -[] ns1:amount "30" ; - foaf:firstName "Bob" ; - foaf:lastName "Smith" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-SPARQL/resource2.ttl b/src/test/resources/rml-core/RMLTC0012b-SPARQL/resource2.ttl deleted file mode 100644 index 5991d1f7..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-SPARQL/resource2.ttl +++ /dev/null @@ -1,15 +0,0 @@ -@prefix foaf: . -@prefix ns1: . - -[] ns1:city "London" ; - foaf:firstName "Bob" ; - foaf:lastName "Smith" . - -[] ns1:city "Madrid" ; - foaf:firstName "Sue" ; - foaf:lastName "Jones" . - -[] ns1:city "London" ; - foaf:firstName "Bob" ; - foaf:lastName "Smith" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0012b-SQLServer/mapping.ttl deleted file mode 100644 index dea61d54..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-SQLServer/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "persons" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "lives" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate ex:city - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0012b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0012b-SQLServer/output.nq deleted file mode 100644 index 0d556bbd..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-SQLServer/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith "London" . -_:BobSmith "Bob Smith" . -_:SueJones "Madrid" . -_:SueJones "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0012b-SQLServer/resource.sql deleted file mode 100644 index 03379770..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-SQLServer/resource.sql +++ /dev/null @@ -1,22 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS persons; - -CREATE TABLE persons ( - "fname" VARCHAR(200), - "lname" VARCHAR(200), - "amount" INTEGER -); -INSERT INTO persons values ('Bob','Smith','30'); -INSERT INTO persons values ('Sue','Jones','20'); -INSERT INTO persons values ('Bob','Smith','30'); - -DROP TABLE IF EXISTS lives; - -CREATE TABLE lives ( - "fname" VARCHAR(200), - "lname" VARCHAR(200), - "city" VARCHAR(200) -); -INSERT INTO lives values ('Bob','Smith','London'); -INSERT INTO lives values ('Sue','Jones','Madrid'); -INSERT INTO lives values ('Bob','Smith','London'); diff --git a/src/test/resources/rml-core/RMLTC0012b-XML/lives.xml b/src/test/resources/rml-core/RMLTC0012b-XML/lives.xml deleted file mode 100644 index f72fc8be..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-XML/lives.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Bob - Smith - London - - - Sue - Jones - Madrid - - - Bob - Smith - London - - diff --git a/src/test/resources/rml-core/RMLTC0012b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0012b-XML/mapping.ttl deleted file mode 100644 index 4b614e06..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-XML/mapping.ttl +++ /dev/null @@ -1,44 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/Persons/Person"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/Lives/Live"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "lives.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate ex:city - ]; - rml:subjectMap [ - rml:template "{fname}{lname}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012b-XML/output.nq b/src/test/resources/rml-core/RMLTC0012b-XML/output.nq deleted file mode 100644 index 0d556bbd..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ -_:BobSmith "London" . -_:BobSmith "Bob Smith" . -_:SueJones "Madrid" . -_:SueJones "Sue Jones" . - diff --git a/src/test/resources/rml-core/RMLTC0012b-XML/persons.xml b/src/test/resources/rml-core/RMLTC0012b-XML/persons.xml deleted file mode 100644 index 775d21eb..00000000 --- a/src/test/resources/rml-core/RMLTC0012b-XML/persons.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Bob - Smith - 30 - - - Sue - Jones - 20 - - - Bob - Smith - 30 - - diff --git a/src/test/resources/rml-core/RMLTC0012c-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0012c-CSV/mapping.ttl deleted file mode 100644 index 4bf23e7e..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-CSV/mapping.ttl +++ /dev/null @@ -1,24 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ] . diff --git a/src/test/resources/rml-core/RMLTC0012c-CSV/persons.csv b/src/test/resources/rml-core/RMLTC0012c-CSV/persons.csv deleted file mode 100644 index 6d1909d9..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-CSV/persons.csv +++ /dev/null @@ -1,4 +0,0 @@ -fname,lname,amount -Bob,Smith,30 -Sue,Jones,20 -Bob,Smith,30 diff --git a/src/test/resources/rml-core/RMLTC0012c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0012c-JSON/mapping.ttl deleted file mode 100644 index 56cd3473..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-JSON/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ] . diff --git a/src/test/resources/rml-core/RMLTC0012c-JSON/persons.json b/src/test/resources/rml-core/RMLTC0012c-JSON/persons.json deleted file mode 100644 index 513e9890..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-JSON/persons.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "persons": [ - {"fname":"Bob","lname":"Smith","amount":30}, - {"fname":"Sue","lname":"Jones","amount":20}, - {"fname":"Bob","lname":"Smith","amount":30} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0012c-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012c-MySQL/mapping.ttl deleted file mode 100644 index be18c725..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-MySQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0012c-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0012c-MySQL/resource.sql deleted file mode 100644 index 718792c7..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-MySQL/resource.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.IOUs; -DROP TABLE IF EXISTS test.Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012c-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012c-PostgreSQL/mapping.ttl deleted file mode 100644 index c09a8c04..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password "password"; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0012c-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0012c-PostgreSQL/resource.sql deleted file mode 100644 index 46e386f7..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-PostgreSQL/resource.sql +++ /dev/null @@ -1,18 +0,0 @@ -DROP TABLE IF EXISTS IOUs; -DROP TABLE IF EXISTS Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012c-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0012c-SQLServer/mapping.ttl deleted file mode 100644 index e6ae399d..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-SQLServer/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0012c-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0012c-SQLServer/resource.sql deleted file mode 100644 index 8fab5e6f..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-SQLServer/resource.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS IOUs; -DROP TABLE IF EXISTS Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012c-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0012c-XML/mapping.ttl deleted file mode 100644 index 70f35312..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-XML/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/Persons/Person"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ] . diff --git a/src/test/resources/rml-core/RMLTC0012c-XML/persons.xml b/src/test/resources/rml-core/RMLTC0012c-XML/persons.xml deleted file mode 100644 index 411760a1..00000000 --- a/src/test/resources/rml-core/RMLTC0012c-XML/persons.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Bob - Smith> - 30 - - - Sue - Jones> - 20 - - - Bob - Smith> - 30 - - diff --git a/src/test/resources/rml-core/RMLTC0012d-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0012d-CSV/mapping.ttl deleted file mode 100644 index ba324ed2..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-CSV/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ], [ - rml:template "{amount}_{fname}_{lname}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012d-CSV/persons.csv b/src/test/resources/rml-core/RMLTC0012d-CSV/persons.csv deleted file mode 100644 index 6d1909d9..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-CSV/persons.csv +++ /dev/null @@ -1,4 +0,0 @@ -fname,lname,amount -Bob,Smith,30 -Sue,Jones,20 -Bob,Smith,30 diff --git a/src/test/resources/rml-core/RMLTC0012d-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0012d-JSON/mapping.ttl deleted file mode 100644 index 442cb705..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-JSON/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ], [ - rml:template "{amount}_{fname}_{lname}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012d-JSON/persons.json b/src/test/resources/rml-core/RMLTC0012d-JSON/persons.json deleted file mode 100644 index 513e9890..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-JSON/persons.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "persons": [ - {"fname":"Bob","lname":"Smith","amount":30}, - {"fname":"Sue","lname":"Jones","amount":20}, - {"fname":"Bob","lname":"Smith","amount":30} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0012d-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012d-MySQL/mapping.ttl deleted file mode 100644 index cc24cc7d..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-MySQL/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}" - ], [ - rml:template "{amount}_{fname}_{lname}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0012d-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0012d-MySQL/resource.sql deleted file mode 100644 index 718792c7..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-MySQL/resource.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.IOUs; -DROP TABLE IF EXISTS test.Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012d-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012d-PostgreSQL/mapping.ttl deleted file mode 100644 index c8aa2a07..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}" - ], [ - rml:template "{amount}_{fname}_{lname}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password "password"; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0012d-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0012d-PostgreSQL/resource.sql deleted file mode 100644 index 46e386f7..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-PostgreSQL/resource.sql +++ /dev/null @@ -1,18 +0,0 @@ -DROP TABLE IF EXISTS IOUs; -DROP TABLE IF EXISTS Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012d-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0012d-SQLServer/mapping.ttl deleted file mode 100644 index 3d923cad..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-SQLServer/mapping.ttl +++ /dev/null @@ -1,27 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}" - ], [ - rml:template "{amount}_{fname}_{lname}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0012d-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0012d-SQLServer/resource.sql deleted file mode 100644 index 8fab5e6f..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-SQLServer/resource.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS IOUs; -DROP TABLE IF EXISTS Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012d-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0012d-XML/mapping.ttl deleted file mode 100644 index 9af658b5..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-XML/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/Persons/Person"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "{fname} {lname}"; - rml:termType rml:Literal - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ], [ - rml:template "{amount}_{fname}_{lname}"; - rml:termType rml:BlankNode - ] . diff --git a/src/test/resources/rml-core/RMLTC0012d-XML/persons.xml b/src/test/resources/rml-core/RMLTC0012d-XML/persons.xml deleted file mode 100644 index 775d21eb..00000000 --- a/src/test/resources/rml-core/RMLTC0012d-XML/persons.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Bob - Smith - 30 - - - Sue - Jones - 20 - - - Bob - Smith - 30 - - diff --git a/src/test/resources/rml-core/RMLTC0012e-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012e-MySQL/mapping.ttl deleted file mode 100644 index 9f3c7ca4..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-MySQL/mapping.ttl +++ /dev/null @@ -1,69 +0,0 @@ -@prefix d2rq: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:object ; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Lives" - ]; - rml:predicateObjectMap [ - rml:object ; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{city}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0012e-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0012e-MySQL/output.nq deleted file mode 100644 index a09639da..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-MySQL/output.nq +++ /dev/null @@ -1,18 +0,0 @@ -_:Bob_Smith_30 . -_:Bob_Smith_30 "Bob" . -_:Bob_Smith_30 "Smith" . -_:Bob_Smith_30 "3.0E1"^^ . -_:Sue_Jones_20 . -_:Sue_Jones_20 "Sue" . -_:Sue_Jones_20 "Jones" . -_:Sue_Jones_20 "2.0E1"^^ . -_:Bob_Smith_London . -_:Bob_Smith_London "Bob" . -_:Bob_Smith_London "Smith" . -_:Bob_Smith_London "London" . -_:Sue_Jones_Madrid . -_:Sue_Jones_Madrid "Sue" . -_:Sue_Jones_Madrid "Jones" . -_:Sue_Jones_Madrid "Madrid" . - - diff --git a/src/test/resources/rml-core/RMLTC0012e-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0012e-MySQL/resource.sql deleted file mode 100644 index 718792c7..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-MySQL/resource.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.IOUs; -DROP TABLE IF EXISTS test.Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/mapping.ttl deleted file mode 100644 index b143e99e..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,69 +0,0 @@ -@prefix d2rq: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:object ; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Lives" - ]; - rml:predicateObjectMap [ - rml:object ; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{city}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/output.nq deleted file mode 100644 index a09639da..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/output.nq +++ /dev/null @@ -1,18 +0,0 @@ -_:Bob_Smith_30 . -_:Bob_Smith_30 "Bob" . -_:Bob_Smith_30 "Smith" . -_:Bob_Smith_30 "3.0E1"^^ . -_:Sue_Jones_20 . -_:Sue_Jones_20 "Sue" . -_:Sue_Jones_20 "Jones" . -_:Sue_Jones_20 "2.0E1"^^ . -_:Bob_Smith_London . -_:Bob_Smith_London "Bob" . -_:Bob_Smith_London "Smith" . -_:Bob_Smith_London "London" . -_:Sue_Jones_Madrid . -_:Sue_Jones_Madrid "Sue" . -_:Sue_Jones_Madrid "Jones" . -_:Sue_Jones_Madrid "Madrid" . - - diff --git a/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/resource.sql deleted file mode 100644 index 46e386f7..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-PostgreSQL/resource.sql +++ /dev/null @@ -1,18 +0,0 @@ -DROP TABLE IF EXISTS IOUs; -DROP TABLE IF EXISTS Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0012e-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0012e-SQLServer/mapping.ttl deleted file mode 100644 index 3c5aa10a..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-SQLServer/mapping.ttl +++ /dev/null @@ -1,69 +0,0 @@ -@prefix d2rq: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "IOUs" - ]; - rml:predicateObjectMap [ - rml:object ; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "amount" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{amount}"; - rml:termType rml:BlankNode - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Lives" - ]; - rml:predicateObjectMap [ - rml:object ; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "fname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "lname" - ]; - rml:predicate - ], [ - rml:objectMap [ - rml:reference "city" - ]; - rml:predicate - ]; - rml:subjectMap [ - rml:template "{fname}_{lname}_{city}"; - rml:termType rml:BlankNode - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0012e-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0012e-SQLServer/output.nq deleted file mode 100644 index a09639da..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-SQLServer/output.nq +++ /dev/null @@ -1,18 +0,0 @@ -_:Bob_Smith_30 . -_:Bob_Smith_30 "Bob" . -_:Bob_Smith_30 "Smith" . -_:Bob_Smith_30 "3.0E1"^^ . -_:Sue_Jones_20 . -_:Sue_Jones_20 "Sue" . -_:Sue_Jones_20 "Jones" . -_:Sue_Jones_20 "2.0E1"^^ . -_:Bob_Smith_London . -_:Bob_Smith_London "Bob" . -_:Bob_Smith_London "Smith" . -_:Bob_Smith_London "London" . -_:Sue_Jones_Madrid . -_:Sue_Jones_Madrid "Sue" . -_:Sue_Jones_Madrid "Jones" . -_:Sue_Jones_Madrid "Madrid" . - - diff --git a/src/test/resources/rml-core/RMLTC0012e-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0012e-SQLServer/resource.sql deleted file mode 100644 index 8fab5e6f..00000000 --- a/src/test/resources/rml-core/RMLTC0012e-SQLServer/resource.sql +++ /dev/null @@ -1,19 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS IOUs; -DROP TABLE IF EXISTS Lives; - -CREATE TABLE IOUs ( - fname VARCHAR(20), - lname VARCHAR(20), - amount FLOAT); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20); -INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30); - -CREATE TABLE Lives ( - fname VARCHAR(20), - lname VARCHAR(20), - city VARCHAR(20)); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); -INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid'); -INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London'); diff --git a/src/test/resources/rml-core/RMLTC0013a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0013a-JSON/mapping.ttl deleted file mode 100644 index 92a69509..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "DateOfBirth" - ]; - rml:predicate ex:BirthDay - ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0013a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0013a-JSON/output.nq deleted file mode 100644 index e143b3ef..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-JSON/output.nq +++ /dev/null @@ -1 +0,0 @@ - "September, 2010" . diff --git a/src/test/resources/rml-core/RMLTC0013a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0013a-JSON/persons.json deleted file mode 100644 index d7472e18..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-JSON/persons.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "persons": [ - {"ID":"1","Name":"Alice","DateOfBirth":null}, - {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0013a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0013a-MySQL/mapping.ttl deleted file mode 100644 index eadfe810..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Person" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "DateOfBirth" - ]; - rml:predicate ex:BirthDay - ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0013a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0013a-MySQL/output.nq deleted file mode 100644 index 4b1bf1fa..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-MySQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "September, 2010" . - - diff --git a/src/test/resources/rml-core/RMLTC0013a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0013a-MySQL/resource.sql deleted file mode 100644 index 616495e9..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-MySQL/resource.sql +++ /dev/null @@ -1,12 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Person; - -CREATE TABLE Person ( -ID integer, -Name varchar(50), -DateOfBirth varchar(50), -PRIMARY KEY (ID) -); -INSERT INTO Person (ID, Name, DateOfBirth) VALUES (1,'Alice', NULL); -INSERT INTO Person (ID, Name, DateOfBirth) VALUES (2,'Bob', 'September, 2010'); - diff --git a/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/mapping.ttl deleted file mode 100644 index 93d6f35b..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Person" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "DateOfBirth" - ]; - rml:predicate ex:BirthDay - ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/note.md b/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/note.md deleted file mode 100644 index 026df640..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/note.md +++ /dev/null @@ -1,3 +0,0 @@ -## Change note - -Changed resource.sql to use quotes for column identifiers to use case-sensitive references. diff --git a/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/output.nq deleted file mode 100644 index 4b1bf1fa..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "September, 2010" . - - diff --git a/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/resource.sql deleted file mode 100644 index 03a372d2..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-PostgreSQL/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -DROP TABLE IF EXISTS Person; - -CREATE TABLE Person ( -"ID" integer, -"Name" varchar(50), -"DateOfBirth" varchar(50), -PRIMARY KEY ("ID") -); -INSERT INTO Person ("ID", "Name", "DateOfBirth") VALUES (1,'Alice', NULL); -INSERT INTO Person ("ID", "Name", "DateOfBirth") VALUES (2,'Bob', 'September, 2010'); - diff --git a/src/test/resources/rml-core/RMLTC0013a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0013a-SQLServer/mapping.ttl deleted file mode 100644 index f198ea56..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Person" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "DateOfBirth" - ]; - rml:predicate ex:BirthDay - ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0013a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0013a-SQLServer/output.nq deleted file mode 100644 index 4b1bf1fa..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-SQLServer/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "September, 2010" . - - diff --git a/src/test/resources/rml-core/RMLTC0013a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0013a-SQLServer/resource.sql deleted file mode 100644 index dd278769..00000000 --- a/src/test/resources/rml-core/RMLTC0013a-SQLServer/resource.sql +++ /dev/null @@ -1,12 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Person; - -CREATE TABLE Person ( -ID integer, -Name varchar(50), -DateOfBirth varchar(50), -PRIMARY KEY (ID) -); -INSERT INTO Person (ID, Name, DateOfBirth) VALUES (1,'Alice', NULL); -INSERT INTO Person (ID, Name, DateOfBirth) VALUES (2,'Bob', 'September, 2010'); - diff --git a/src/test/resources/rml-core/RMLTC0014d-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0014d-MySQL/mapping.ttl deleted file mode 100644 index 7377f7b4..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-MySQL/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT EMP.*, (CASE job - WHEN 'CLERK' THEN 'general-office' - WHEN 'NIGHTGUARD' THEN 'security' - WHEN 'ENGINEER' THEN 'engineering' - END) AS ROLE FROM EMP - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://data.example.com/roles/{ROLE}" - ]; - rml:predicate ex:role - ]; - rml:subjectMap [ - rml:template "http://data.example.com/employee/{empno}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0014d-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0014d-MySQL/output.nq deleted file mode 100644 index a1025c8a..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-MySQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - . diff --git a/src/test/resources/rml-core/RMLTC0014d-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0014d-MySQL/resource.sql deleted file mode 100644 index bd5eb080..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-MySQL/resource.sql +++ /dev/null @@ -1,25 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.DEPT; -DROP TABLE IF EXISTS test.EMP; -DROP TABLE IF EXISTS test.LIKES; - -CREATE TABLE DEPT ( - deptno INTEGER UNIQUE, - dname VARCHAR(30), - loc VARCHAR(100)); -INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK'); - -CREATE TABLE EMP ( - empno INTEGER PRIMARY KEY, - ename VARCHAR(100), - job VARCHAR(30), - deptno INTEGER REFERENCES DEPT (deptno), - etype VARCHAR(30)); -INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME'); - -CREATE TABLE LIKES ( - id INTEGER, - likeType VARCHAR(30), - likedObj VARCHAR(100)); -INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer'); -INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball'); diff --git a/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/mapping.ttl deleted file mode 100644 index 27108093..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT EMP.*, (CASE job - WHEN 'CLERK' THEN 'general-office' - WHEN 'NIGHTGUARD' THEN 'security' - WHEN 'ENGINEER' THEN 'engineering' - END) AS ROLE FROM EMP - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://data.example.com/roles/{role}" - ]; - rml:predicate ex:role - ]; - rml:subjectMap [ - rml:template "http://data.example.com/employee/{empno}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/output.nq deleted file mode 100644 index a1025c8a..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/output.nq +++ /dev/null @@ -1 +0,0 @@ - . diff --git a/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/resource.sql deleted file mode 100644 index 84570225..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-PostgreSQL/resource.sql +++ /dev/null @@ -1,24 +0,0 @@ -DROP TABLE IF EXISTS LIKES; -DROP TABLE IF EXISTS EMP; -DROP TABLE IF EXISTS DEPT; - -CREATE TABLE DEPT ( - deptno INTEGER UNIQUE, - dname VARCHAR(30), - loc VARCHAR(100)); -INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK'); - -CREATE TABLE EMP ( - empno INTEGER PRIMARY KEY, - ename VARCHAR(100), - job VARCHAR(30), - deptno INTEGER REFERENCES DEPT (deptno), - etype VARCHAR(30)); -INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME'); - -CREATE TABLE LIKES ( - id INTEGER, - likeType VARCHAR(30), - likedObj VARCHAR(100)); -INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer'); -INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball'); diff --git a/src/test/resources/rml-core/RMLTC0014d-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0014d-SQLServer/mapping.ttl deleted file mode 100644 index 64f797ae..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-SQLServer/mapping.ttl +++ /dev/null @@ -1,31 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT EMP.*, (CASE job - WHEN 'CLERK' THEN 'general-office' - WHEN 'NIGHTGUARD' THEN 'security' - WHEN 'ENGINEER' THEN 'engineering' - END) AS ROLE FROM EMP - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:template "http://data.example.com/roles/{ROLE}" - ]; - rml:predicate ex:role - ]; - rml:subjectMap [ - rml:template "http://data.example.com/employee/{empno}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0014d-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0014d-SQLServer/output.nq deleted file mode 100644 index a1025c8a..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-SQLServer/output.nq +++ /dev/null @@ -1 +0,0 @@ - . diff --git a/src/test/resources/rml-core/RMLTC0014d-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0014d-SQLServer/resource.sql deleted file mode 100644 index d39327c0..00000000 --- a/src/test/resources/rml-core/RMLTC0014d-SQLServer/resource.sql +++ /dev/null @@ -1,24 +0,0 @@ -USE TestDB; -EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' -EXEC sp_msforeachtable 'DROP TABLE ?' - -CREATE TABLE DEPT ( - deptno INTEGER UNIQUE, - dname VARCHAR(30), - loc VARCHAR(100)); -INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK'); - -CREATE TABLE EMP ( - empno INTEGER PRIMARY KEY, - ename VARCHAR(100), - job VARCHAR(30), - deptno INTEGER REFERENCES DEPT (deptno), - etype VARCHAR(30)); -INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME'); - -CREATE TABLE LIKES ( - id INTEGER, - likeType VARCHAR(30), - likedObj VARCHAR(100)); -INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer'); -INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball'); diff --git a/src/test/resources/rml-core/RMLTC0015a-CSV/country_en.csv b/src/test/resources/rml-core/RMLTC0015a-CSV/country_en.csv deleted file mode 100644 index 4dd0aa39..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-CSV/country_en.csv +++ /dev/null @@ -1,3 +0,0 @@ -Code,Name -BO,"Bolivia, Plurinational State of" -IE,Ireland diff --git a/src/test/resources/rml-core/RMLTC0015a-CSV/country_es.csv b/src/test/resources/rml-core/RMLTC0015a-CSV/country_es.csv deleted file mode 100644 index 63d50851..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-CSV/country_es.csv +++ /dev/null @@ -1,3 +0,0 @@ -Code,Name -BO,"Estado Plurinacional de Bolivia" -IE,Irlanda diff --git a/src/test/resources/rml-core/RMLTC0015a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0015a-CSV/mapping.ttl deleted file mode 100644 index 61d558f6..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-CSV/mapping.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_en.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "en"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_es.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "es"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0015a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0015a-CSV/output.nq deleted file mode 100644 index a80dd6a3..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-CSV/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - "Bolivia, Plurinational State of"@en . - "Estado Plurinacional de Bolivia"@es . - "Ireland"@en . - "Irlanda"@es . - - diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/country_en.json b/src/test/resources/rml-core/RMLTC0015a-JSON/country_en.json deleted file mode 100644 index 84a05519..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-JSON/country_en.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "countries": [ - {"Code": "BO", "Name": "Bolivia, Plurinational State of"}, - {"Code": "IE", "Name": "Ireland"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/country_es.json b/src/test/resources/rml-core/RMLTC0015a-JSON/country_es.json deleted file mode 100644 index b861adf0..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-JSON/country_es.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "countries": [ - {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"}, - {"Code": "IE", "Name": "Irlanda"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0015a-JSON/mapping.ttl deleted file mode 100644 index a9e90bfb..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-JSON/mapping.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.countries[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_en.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "en"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.countries[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_es.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "es"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0015a-JSON/output.nq deleted file mode 100644 index a80dd6a3..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-JSON/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - "Bolivia, Plurinational State of"@en . - "Estado Plurinacional de Bolivia"@es . - "Ireland"@en . - "Irlanda"@es . - - diff --git a/src/test/resources/rml-core/RMLTC0015a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0015a-MySQL/mapping.ttl deleted file mode 100644 index a09b514a..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-MySQL/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "en"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'ES'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "es"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0015a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0015a-MySQL/output.nq deleted file mode 100644 index a80dd6a3..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-MySQL/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - "Bolivia, Plurinational State of"@en . - "Estado Plurinacional de Bolivia"@es . - "Ireland"@en . - "Irlanda"@es . - - diff --git a/src/test/resources/rml-core/RMLTC0015a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0015a-MySQL/resource.sql deleted file mode 100644 index 52a4c88e..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-MySQL/resource.sql +++ /dev/null @@ -1,13 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Country; - -CREATE TABLE Country ( - Code VARCHAR(2), - Name VARCHAR(100), - Lan VARCHAR(10), - PRIMARY KEY (Code,Lan) -); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES'); diff --git a/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/mapping.ttl deleted file mode 100644 index a25b190b..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "en"; - rml:reference "name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'ES'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "es"; - rml:reference "name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/output.nq deleted file mode 100644 index a80dd6a3..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - "Bolivia, Plurinational State of"@en . - "Estado Plurinacional de Bolivia"@es . - "Ireland"@en . - "Irlanda"@es . - - diff --git a/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/resource.sql deleted file mode 100644 index 5640c8f8..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-PostgreSQL/resource.sql +++ /dev/null @@ -1,12 +0,0 @@ -DROP TABLE IF EXISTS Country; - -CREATE TABLE Country ( - Code VARCHAR(2), - Name VARCHAR(100), - Lan VARCHAR(10), - PRIMARY KEY (Code,Lan) -); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES'); diff --git a/src/test/resources/rml-core/RMLTC0015a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0015a-SQLServer/mapping.ttl deleted file mode 100644 index ceca9dad..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-SQLServer/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "en"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT \"Code\", \"Name\", \"Lan\" - FROM \"Country\" - WHERE \"Lan\" = 'ES'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "es"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0015a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0015a-SQLServer/output.nq deleted file mode 100644 index a80dd6a3..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-SQLServer/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - "Bolivia, Plurinational State of"@en . - "Estado Plurinacional de Bolivia"@es . - "Ireland"@en . - "Irlanda"@es . - - diff --git a/src/test/resources/rml-core/RMLTC0015a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0015a-SQLServer/resource.sql deleted file mode 100644 index a0a684ef..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-SQLServer/resource.sql +++ /dev/null @@ -1,13 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Country; - -CREATE TABLE Country ( - Code VARCHAR(2), - Name VARCHAR(100), - Lan VARCHAR(10), - PRIMARY KEY (Code,Lan) -); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES'); diff --git a/src/test/resources/rml-core/RMLTC0015a-XML/country_en.xml b/src/test/resources/rml-core/RMLTC0015a-XML/country_en.xml deleted file mode 100644 index be754f17..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-XML/country_en.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - BOBolivia, Plurinational State of - IEIreland - diff --git a/src/test/resources/rml-core/RMLTC0015a-XML/country_es.xml b/src/test/resources/rml-core/RMLTC0015a-XML/country_es.xml deleted file mode 100644 index 62bb8e4a..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-XML/country_es.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - BOEstado Plurinacional de Bolivia - IEIrlanda - diff --git a/src/test/resources/rml-core/RMLTC0015a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0015a-XML/mapping.ttl deleted file mode 100644 index 68f671ee..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-XML/mapping.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/countries/country"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_en.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "en"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/countries/country"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_es.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "es"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0015a-XML/output.nq b/src/test/resources/rml-core/RMLTC0015a-XML/output.nq deleted file mode 100644 index a80dd6a3..00000000 --- a/src/test/resources/rml-core/RMLTC0015a-XML/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - "Bolivia, Plurinational State of"@en . - "Estado Plurinacional de Bolivia"@es . - "Ireland"@en . - "Irlanda"@es . - - diff --git a/src/test/resources/rml-core/RMLTC0015b-CSV/country_en.csv b/src/test/resources/rml-core/RMLTC0015b-CSV/country_en.csv deleted file mode 100644 index 4dd0aa39..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-CSV/country_en.csv +++ /dev/null @@ -1,3 +0,0 @@ -Code,Name -BO,"Bolivia, Plurinational State of" -IE,Ireland diff --git a/src/test/resources/rml-core/RMLTC0015b-CSV/country_es.csv b/src/test/resources/rml-core/RMLTC0015b-CSV/country_es.csv deleted file mode 100644 index 63d50851..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-CSV/country_es.csv +++ /dev/null @@ -1,3 +0,0 @@ -Code,Name -BO,"Estado Plurinacional de Bolivia" -IE,Irlanda diff --git a/src/test/resources/rml-core/RMLTC0015b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0015b-CSV/mapping.ttl deleted file mode 100644 index 247e382b..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-CSV/mapping.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_en.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-english"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_es.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-spanish"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0015b-JSON/country_en.json b/src/test/resources/rml-core/RMLTC0015b-JSON/country_en.json deleted file mode 100644 index 84a05519..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-JSON/country_en.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "countries": [ - {"Code": "BO", "Name": "Bolivia, Plurinational State of"}, - {"Code": "IE", "Name": "Ireland"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0015b-JSON/country_es.json b/src/test/resources/rml-core/RMLTC0015b-JSON/country_es.json deleted file mode 100644 index b861adf0..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-JSON/country_es.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "countries": [ - {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"}, - {"Code": "IE", "Name": "Irlanda"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0015b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0015b-JSON/mapping.ttl deleted file mode 100644 index 168ef9d5..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-JSON/mapping.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.countries[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_en.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-english"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.countries[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_en.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-spanish"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0015b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0015b-MySQL/mapping.ttl deleted file mode 100644 index ec8847cf..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-MySQL/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-english"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-spanish"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0015b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0015b-MySQL/resource.sql deleted file mode 100644 index 52a4c88e..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-MySQL/resource.sql +++ /dev/null @@ -1,13 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Country; - -CREATE TABLE Country ( - Code VARCHAR(2), - Name VARCHAR(100), - Lan VARCHAR(10), - PRIMARY KEY (Code,Lan) -); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES'); diff --git a/src/test/resources/rml-core/RMLTC0015b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0015b-PostgreSQL/mapping.ttl deleted file mode 100644 index f0def09e..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-english"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-spanish"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0015b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0015b-PostgreSQL/resource.sql deleted file mode 100644 index 5640c8f8..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-PostgreSQL/resource.sql +++ /dev/null @@ -1,12 +0,0 @@ -DROP TABLE IF EXISTS Country; - -CREATE TABLE Country ( - Code VARCHAR(2), - Name VARCHAR(100), - Lan VARCHAR(10), - PRIMARY KEY (Code,Lan) -); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES'); diff --git a/src/test/resources/rml-core/RMLTC0015b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0015b-SQLServer/mapping.ttl deleted file mode 100644 index b1a77f3b..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-SQLServer/mapping.ttl +++ /dev/null @@ -1,51 +0,0 @@ -@prefix d2rq: . -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-english"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ - rml:iterator """ - SELECT Code, Name, Lan - FROM Country - WHERE Lan = 'EN'; - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-spanish"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0015b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0015b-SQLServer/resource.sql deleted file mode 100644 index a0a684ef..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-SQLServer/resource.sql +++ /dev/null @@ -1,13 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Country; - -CREATE TABLE Country ( - Code VARCHAR(2), - Name VARCHAR(100), - Lan VARCHAR(10), - PRIMARY KEY (Code,Lan) -); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN'); -INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES'); diff --git a/src/test/resources/rml-core/RMLTC0015b-XML/country_en.xml b/src/test/resources/rml-core/RMLTC0015b-XML/country_en.xml deleted file mode 100644 index be754f17..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-XML/country_en.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - BOBolivia, Plurinational State of - IEIreland - diff --git a/src/test/resources/rml-core/RMLTC0015b-XML/country_es.xml b/src/test/resources/rml-core/RMLTC0015b-XML/country_es.xml deleted file mode 100644 index 62bb8e4a..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-XML/country_es.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - BOEstado Plurinacional de Bolivia - IEIrlanda - diff --git a/src/test/resources/rml-core/RMLTC0015b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0015b-XML/mapping.ttl deleted file mode 100644 index 41211467..00000000 --- a/src/test/resources/rml-core/RMLTC0015b-XML/mapping.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix rdfs: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/countries/country"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_en.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-english"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/countries/country"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "country_es.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:language "a-spanish"; - rml:reference "Name" - ]; - rml:predicate rdfs:label - ]; - rml:subjectMap [ - rml:template "http://example.com/{Code}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0016a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016a-MySQL/mapping.ttl deleted file mode 100644 index 7d8ac19c..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-MySQL/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sex" - ]; - rml:predicate ex:gender - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient/{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0016a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0016a-MySQL/output.nq deleted file mode 100644 index c854ecf9..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-MySQL/output.nq +++ /dev/null @@ -1,16 +0,0 @@ - . - "10"^^ . - "Monica" . - "Geller" . - "female" . - . - "11"^^ . - "Rachel" . - "Green" . - "female" . - . - "12"^^ . - "Chandler" . - "Bing" . - "male" . - diff --git a/src/test/resources/rml-core/RMLTC0016a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0016a-MySQL/resource.sql deleted file mode 100644 index 1b0346e7..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-MySQL/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/mapping.ttl deleted file mode 100644 index 18ede22b..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "sex" - ]; - rml:predicate ex:gender - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "id" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "firstname" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "lastname" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient/{id}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/output.nq deleted file mode 100644 index c854ecf9..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/output.nq +++ /dev/null @@ -1,16 +0,0 @@ - . - "10"^^ . - "Monica" . - "Geller" . - "female" . - . - "11"^^ . - "Rachel" . - "Green" . - "female" . - . - "12"^^ . - "Chandler" . - "Bing" . - "male" . - diff --git a/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/resource.sql deleted file mode 100644 index 3fa73e67..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-PostgreSQL/resource.sql +++ /dev/null @@ -1,27 +0,0 @@ -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo BYTEA, -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0016a-SQLServer/mapping.ttl deleted file mode 100644 index 29373f89..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-SQLServer/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "Sex" - ]; - rml:predicate ex:gender - ], [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate ex:firstName - ], [ - rml:objectMap [ - rml:reference "LastName" - ]; - rml:predicate ex:lastName - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient/{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0016a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0016a-SQLServer/output.nq deleted file mode 100644 index c854ecf9..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-SQLServer/output.nq +++ /dev/null @@ -1,16 +0,0 @@ - . - "10"^^ . - "Monica" . - "Geller" . - "female" . - . - "11"^^ . - "Rachel" . - "Green" . - "female" . - . - "12"^^ . - "Chandler" . - "Bing" . - "male" . - diff --git a/src/test/resources/rml-core/RMLTC0016a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0016a-SQLServer/resource.sql deleted file mode 100644 index e1607220..00000000 --- a/src/test/resources/rml-core/RMLTC0016a-SQLServer/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate DATETIME, -PaidInAdvance BIT, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); diff --git a/src/test/resources/rml-core/RMLTC0016b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016b-MySQL/mapping.ttl deleted file mode 100644 index bafd2c79..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-MySQL/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "Weight" - ]; - rml:predicate ex:weight - ], [ - rml:objectMap [ - rml:reference "Height" - ]; - rml:predicate ex:height - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0016b-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0016b-MySQL/output.nq deleted file mode 100644 index 0801105b..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-MySQL/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - . - "8.025E1"^^ . - "1.65E0"^^ . - . - "7.022E1"^^ . - "1.7E0"^^ . - . - "9.031E1"^^ . - "1.76E0"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0016b-MySQL/resource.sql deleted file mode 100644 index 1b0346e7..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-MySQL/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/mapping.ttl deleted file mode 100644 index 14b93e75..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "weight" - ]; - rml:predicate ex:weight - ], [ - rml:objectMap [ - rml:reference "height" - ]; - rml:predicate ex:height - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{id}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/output.nq deleted file mode 100644 index 0801105b..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - . - "8.025E1"^^ . - "1.65E0"^^ . - . - "7.022E1"^^ . - "1.7E0"^^ . - . - "9.031E1"^^ . - "1.76E0"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/resource.sql deleted file mode 100644 index 3fa73e67..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-PostgreSQL/resource.sql +++ /dev/null @@ -1,27 +0,0 @@ -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo BYTEA, -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0016b-SQLServer/mapping.ttl deleted file mode 100644 index e0e8d53b..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-SQLServer/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "Weight" - ]; - rml:predicate ex:weight - ], [ - rml:objectMap [ - rml:reference "Height" - ]; - rml:predicate ex:height - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0016b-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0016b-SQLServer/output.nq deleted file mode 100644 index 0801105b..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-SQLServer/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - . - "8.025E1"^^ . - "1.65E0"^^ . - . - "7.022E1"^^ . - "1.7E0"^^ . - . - "9.031E1"^^ . - "1.76E0"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0016b-SQLServer/resource.sql deleted file mode 100644 index e1607220..00000000 --- a/src/test/resources/rml-core/RMLTC0016b-SQLServer/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate DATETIME, -PaidInAdvance BIT, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); diff --git a/src/test/resources/rml-core/RMLTC0016c-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016c-MySQL/mapping.ttl deleted file mode 100644 index ea0d4e4e..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-MySQL/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "BirthDate" - ]; - rml:predicate ex:birthdate - ], [ - rml:objectMap [ - rml:reference "EntranceDate" - ]; - rml:predicate ex:entrancedate - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0016c-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0016c-MySQL/output.nq deleted file mode 100644 index 020b5b7c..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-MySQL/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - . - "1981-10-10"^^ . - "2009-10-10T12:12:22"^^ . - . - "1982-11-12"^^ . - "2008-11-12T09:45:44"^^ . - . - "1978-04-06"^^ . - "2007-03-12T02:13:14"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016c-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0016c-MySQL/resource.sql deleted file mode 100644 index 1b0346e7..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-MySQL/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/mapping.ttl deleted file mode 100644 index b7eba2d1..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "birthdate" - ]; - rml:predicate ex:birthdate - ], [ - rml:objectMap [ - rml:reference "entrancedate" - ]; - rml:predicate ex:entrancedate - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{id}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/output.nq deleted file mode 100644 index 020b5b7c..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - . - "1981-10-10"^^ . - "2009-10-10T12:12:22"^^ . - . - "1982-11-12"^^ . - "2008-11-12T09:45:44"^^ . - . - "1978-04-06"^^ . - "2007-03-12T02:13:14"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/resource.sql deleted file mode 100644 index 3fa73e67..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-PostgreSQL/resource.sql +++ /dev/null @@ -1,27 +0,0 @@ -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo BYTEA, -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016c-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0016c-SQLServer/mapping.ttl deleted file mode 100644 index ead4ab31..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-SQLServer/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "BirthDate" - ]; - rml:predicate ex:birthdate - ], [ - rml:objectMap [ - rml:reference "EntranceDate" - ]; - rml:predicate ex:entrancedate - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0016c-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0016c-SQLServer/output.nq deleted file mode 100644 index 020b5b7c..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-SQLServer/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - . - "1981-10-10"^^ . - "2009-10-10T12:12:22"^^ . - . - "1982-11-12"^^ . - "2008-11-12T09:45:44"^^ . - . - "1978-04-06"^^ . - "2007-03-12T02:13:14"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016c-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0016c-SQLServer/resource.sql deleted file mode 100644 index e1607220..00000000 --- a/src/test/resources/rml-core/RMLTC0016c-SQLServer/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate DATETIME, -PaidInAdvance BIT, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); diff --git a/src/test/resources/rml-core/RMLTC0016d-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016d-MySQL/mapping.ttl deleted file mode 100644 index 4164f6f2..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-MySQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "PaidInAdvance" - ]; - rml:predicate ex:paid - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0016d-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0016d-MySQL/output.nq deleted file mode 100644 index 578b074e..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-MySQL/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - "false"^^ . - . - "true"^^ . - . - "true"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016d-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0016d-MySQL/resource.sql deleted file mode 100644 index 1b0346e7..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-MySQL/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/mapping.ttl deleted file mode 100644 index 5105f9af..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "paidinadvance" - ]; - rml:predicate ex:paid - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{id}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/output.nq deleted file mode 100644 index 578b074e..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - "false"^^ . - . - "true"^^ . - . - "true"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/resource.sql deleted file mode 100644 index 3fa73e67..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-PostgreSQL/resource.sql +++ /dev/null @@ -1,27 +0,0 @@ -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo BYTEA, -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016d-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0016d-SQLServer/mapping.ttl deleted file mode 100644 index 691cefd5..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-SQLServer/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:reference "PaidInAdvance" - ]; - rml:predicate ex:paid - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0016d-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0016d-SQLServer/output.nq deleted file mode 100644 index 578b074e..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-SQLServer/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - "false"^^ . - . - "true"^^ . - . - "true"^^ . diff --git a/src/test/resources/rml-core/RMLTC0016d-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0016d-SQLServer/resource.sql deleted file mode 100644 index e1607220..00000000 --- a/src/test/resources/rml-core/RMLTC0016d-SQLServer/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate DATETIME, -PaidInAdvance BIT, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); diff --git a/src/test/resources/rml-core/RMLTC0016e-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016e-MySQL/mapping.ttl deleted file mode 100644 index 34086d5f..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-MySQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:template "data:image/png;hex,{Photo}" - ]; - rml:predicate ex:photo - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0016e-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0016e-MySQL/output.nq deleted file mode 100644 index 789a3e30..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-MySQL/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0016e-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0016e-MySQL/resource.sql deleted file mode 100644 index 1b0346e7..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-MySQL/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/mapping.ttl deleted file mode 100644 index f6d99e51..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:template "data:image/png;hex,{photo}" - ]; - rml:predicate ex:photo - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{id}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/output.nq deleted file mode 100644 index 789a3e30..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/resource.sql deleted file mode 100644 index 51e63e7b..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-PostgreSQL/resource.sql +++ /dev/null @@ -1,27 +0,0 @@ -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate TIMESTAMP, -PaidInAdvance BOOLEAN, -Photo BYTEA, -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE, -'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE, -'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE, -'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082'); diff --git a/src/test/resources/rml-core/RMLTC0016e-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0016e-SQLServer/mapping.ttl deleted file mode 100644 index 2fbf776c..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-SQLServer/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Patient" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ], [ - rml:objectMap [ - rml:template "data:image/png;hex,{Photo}" - ]; - rml:predicate ex:photo - ]; - rml:subjectMap [ - rml:template "http://example.com/Patient{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0016e-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0016e-SQLServer/output.nq deleted file mode 100644 index 789a3e30..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-SQLServer/output.nq +++ /dev/null @@ -1,6 +0,0 @@ - . - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0016e-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0016e-SQLServer/resource.sql deleted file mode 100644 index e1607220..00000000 --- a/src/test/resources/rml-core/RMLTC0016e-SQLServer/resource.sql +++ /dev/null @@ -1,28 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Patient; - -CREATE TABLE Patient ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50), -Sex VARCHAR(6), -Weight REAL, -Height FLOAT, -BirthDate DATE, -EntranceDate DATETIME, -PaidInAdvance BIT, -Photo VARBINARY(200), -PRIMARY KEY (ID) -); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); - -INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo) -VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1, -CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY)); diff --git a/src/test/resources/rml-core/RMLTC0018a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0018a-MySQL/mapping.ttl deleted file mode 100644 index 65183549..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-MySQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0018a-MySQL/note.md b/src/test/resources/rml-core/RMLTC0018a-MySQL/note.md deleted file mode 100644 index 3defd1cb..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-MySQL/note.md +++ /dev/null @@ -1,4 +0,0 @@ -## Change note - -Changed output.nq to remove padding from char column reference values since -MySQL by default is not ANSI SQL compliant diff --git a/src/test/resources/rml-core/RMLTC0018a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0018a-MySQL/output.nq deleted file mode 100644 index bcb2490c..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-MySQL/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - "Venus" . - "10"^^ . - . - "Fernando" . - "20"^^ . - . - "David" . - "30"^^ . - . diff --git a/src/test/resources/rml-core/RMLTC0018a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0018a-MySQL/resource.sql deleted file mode 100644 index 23da1f17..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-MySQL/resource.sql +++ /dev/null @@ -1,13 +0,0 @@ -USE test; -SET FOREIGN_KEY_CHECKS = 0; -DROP TABLE IF EXISTS test.Student; -DROP TABLE IF EXISTS test.Student_Sport; -SET FOREIGN_KEY_CHECKS = 1; - -CREATE TABLE Student ( -ID INTEGER, -Name CHAR(15) -); -INSERT INTO Student (ID,Name) VALUES (10,'Venus'); -INSERT INTO Student (ID,Name) VALUES (20,'Fernando'); -INSERT INTO Student (ID,Name) VALUES (30,'David'); diff --git a/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/mapping.ttl deleted file mode 100644 index d2acedd1..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "id" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{id}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/output.nq deleted file mode 100644 index ae8816d4..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - "Venus " . - "10"^^ . - . - "Fernando " . - "20"^^ . - . - "David " . - "30"^^ . - . diff --git a/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/resource.sql deleted file mode 100644 index b2e9f677..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-PostgreSQL/resource.sql +++ /dev/null @@ -1,9 +0,0 @@ -DROP TABLE IF EXISTS Student CASCADE; - -CREATE TABLE Student ( -ID INTEGER, -Name CHAR(15) -); -INSERT INTO Student (ID,Name) VALUES (10,'Venus'); -INSERT INTO Student (ID,Name) VALUES (20,'Fernando'); -INSERT INTO Student (ID,Name) VALUES (30,'David'); diff --git a/src/test/resources/rml-core/RMLTC0018a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0018a-SQLServer/mapping.ttl deleted file mode 100644 index a3ad93dc..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-SQLServer/mapping.ttl +++ /dev/null @@ -1,32 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Student" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "ID" - ]; - rml:predicate ex:id - ], [ - rml:objectMap [ - rml:reference "Name" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{ID}" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0018a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0018a-SQLServer/output.nq deleted file mode 100644 index ae8816d4..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-SQLServer/output.nq +++ /dev/null @@ -1,9 +0,0 @@ - "Venus " . - "10"^^ . - . - "Fernando " . - "20"^^ . - . - "David " . - "30"^^ . - . diff --git a/src/test/resources/rml-core/RMLTC0018a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0018a-SQLServer/resource.sql deleted file mode 100644 index 971a3ad4..00000000 --- a/src/test/resources/rml-core/RMLTC0018a-SQLServer/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Student; - -CREATE TABLE Student ( -ID INTEGER, -Name CHAR(15) -); -INSERT INTO Student (ID,Name) VALUES (10,'Venus'); -INSERT INTO Student (ID,Name) VALUES (20,'Fernando'); -INSERT INTO Student (ID,Name) VALUES (30,'David'); diff --git a/src/test/resources/rml-core/RMLTC0019a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0019a-CSV/mapping.ttl deleted file mode 100644 index 5618ce88..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . diff --git a/src/test/resources/rml-core/RMLTC0019a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0019a-CSV/output.nq deleted file mode 100644 index d07559d8..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "http://example.com/ns#Jhon" . - "Carlos" . diff --git a/src/test/resources/rml-core/RMLTC0019a-CSV/persons.csv b/src/test/resources/rml-core/RMLTC0019a-CSV/persons.csv deleted file mode 100644 index d1b36144..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-CSV/persons.csv +++ /dev/null @@ -1,3 +0,0 @@ -ID,FirstName,LastName -10,http://example.com/ns#Jhon,Smith -20,Carlos,Mendoza diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0019a-JSON/mapping.ttl deleted file mode 100644 index 63a7b5f9..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq deleted file mode 100644 index d07559d8..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "http://example.com/ns#Jhon" . - "Carlos" . diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0019a-JSON/persons.json deleted file mode 100644 index 01420506..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-JSON/persons.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "persons": [ - { - "ID": 10, - "FirstName": "http://example.com/ns#Jhon", - "LastName": "Smith" - }, - { - "ID": 20, - "FirstName": "Carlos", - "LastName": "Mendoza" - } - ] -} diff --git a/src/test/resources/rml-core/RMLTC0019a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0019a-MySQL/mapping.ttl deleted file mode 100644 index 514e6594..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-MySQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT ID, FirstName, LastName - FROM Employee - WHERE ID < 30 - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0019a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0019a-MySQL/output.nq deleted file mode 100644 index d07559d8..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-MySQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "http://example.com/ns#Jhon" . - "Carlos" . diff --git a/src/test/resources/rml-core/RMLTC0019a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0019a-MySQL/resource.sql deleted file mode 100644 index 24988be6..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-MySQL/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Employee; - -CREATE TABLE Employee ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50) -); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo'); diff --git a/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/mapping.ttl deleted file mode 100644 index 0a57c29f..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT ID, FirstName, LastName - FROM Employee - WHERE ID < 30 - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "firstname" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "firstname" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/output.nq deleted file mode 100644 index d07559d8..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "http://example.com/ns#Jhon" . - "Carlos" . diff --git a/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/resource.sql deleted file mode 100644 index ae78dc8a..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-PostgreSQL/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE IF EXISTS Employee; - -CREATE TABLE Employee ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50) -); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo'); diff --git a/src/test/resources/rml-core/RMLTC0019a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0019a-SQLServer/mapping.ttl deleted file mode 100644 index 808b17d2..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-SQLServer/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - SELECT ID, FirstName, LastName - FROM Employee - WHERE ID < 30 - """; - rml:source ; - rml:referenceFormulation rml:SQL2008Query - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0019a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0019a-SQLServer/output.nq deleted file mode 100644 index d07559d8..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-SQLServer/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "http://example.com/ns#Jhon" . - "Carlos" . diff --git a/src/test/resources/rml-core/RMLTC0019a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0019a-SQLServer/resource.sql deleted file mode 100644 index 2ff708ef..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-SQLServer/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Employee; - -CREATE TABLE Employee ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50) -); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo'); diff --git a/src/test/resources/rml-core/RMLTC0019a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0019a-XML/mapping.ttl deleted file mode 100644 index 75e60005..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-XML/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/persons/person"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . diff --git a/src/test/resources/rml-core/RMLTC0019a-XML/output.nq b/src/test/resources/rml-core/RMLTC0019a-XML/output.nq deleted file mode 100644 index d07559d8..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-XML/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "http://example.com/ns#Jhon" . - "Carlos" . diff --git a/src/test/resources/rml-core/RMLTC0019a-XML/persons.xml b/src/test/resources/rml-core/RMLTC0019a-XML/persons.xml deleted file mode 100644 index 7579d58b..00000000 --- a/src/test/resources/rml-core/RMLTC0019a-XML/persons.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - 10 - http://example.com/ns#Jhon - Smith - - - 20 - Carlos - Mendoza - - diff --git a/src/test/resources/rml-core/RMLTC0019b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0019b-CSV/mapping.ttl deleted file mode 100644 index 5618ce88..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . diff --git a/src/test/resources/rml-core/RMLTC0019b-CSV/persons.csv b/src/test/resources/rml-core/RMLTC0019b-CSV/persons.csv deleted file mode 100644 index a89aea2e..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-CSV/persons.csv +++ /dev/null @@ -1,4 +0,0 @@ -ID,FirstName,LastName -10,http://example.com/ns#Jhon,Smith -20,Carlos,Mendoza -30,Juan Daniel,Crespo diff --git a/src/test/resources/rml-core/RMLTC0019b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0019b-JSON/mapping.ttl deleted file mode 100644 index 63a7b5f9..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . diff --git a/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json deleted file mode 100644 index ba1e6036..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "persons": [ - { - "ID": 10, - "FirstName": "http://example.com/ns#Jhon", - "LastName": "Smith" - }, - { - "ID": 20, - "FirstName": "Carlos", - "LastName": "Mendoza" - }, - { - "ID": 30, - "FirstName": "Juan Daniel", - "LastName": "Crespo" - } - ] -} diff --git a/src/test/resources/rml-core/RMLTC0019b-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0019b-MySQL/mapping.ttl deleted file mode 100644 index 788d1cce..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Employee" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0019b-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0019b-MySQL/resource.sql deleted file mode 100644 index 24988be6..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-MySQL/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Employee; - -CREATE TABLE Employee ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50) -); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo'); diff --git a/src/test/resources/rml-core/RMLTC0019b-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0019b-PostgreSQL/mapping.ttl deleted file mode 100644 index e7f00f33..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Employee" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "firstname" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "firstname" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0019b-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0019b-PostgreSQL/resource.sql deleted file mode 100644 index ae78dc8a..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-PostgreSQL/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE IF EXISTS Employee; - -CREATE TABLE Employee ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50) -); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo'); diff --git a/src/test/resources/rml-core/RMLTC0019b-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0019b-SQLServer/mapping.ttl deleted file mode 100644 index 9172f6ce..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Employee" - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0019b-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0019b-SQLServer/resource.sql deleted file mode 100644 index 2ff708ef..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-SQLServer/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Employee; - -CREATE TABLE Employee ( -ID INTEGER, -FirstName VARCHAR(50), -LastName VARCHAR(50) -); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza'); -INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo'); diff --git a/src/test/resources/rml-core/RMLTC0019b-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0019b-XML/mapping.ttl deleted file mode 100644 index 75e60005..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-XML/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/persons/person"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "FirstName" - ]; - rml:predicate foaf:name - ]; - rml:subjectMap [ - rml:reference "FirstName" - ] . diff --git a/src/test/resources/rml-core/RMLTC0019b-XML/persons.xml b/src/test/resources/rml-core/RMLTC0019b-XML/persons.xml deleted file mode 100644 index 4f01b2e5..00000000 --- a/src/test/resources/rml-core/RMLTC0019b-XML/persons.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - 10 - http://example.com/ns#Jhon - Smith - - - 20 - Carlos - Mendoza - - - 30 - Juan Daniel - Crespo - - diff --git a/src/test/resources/rml-core/RMLTC0020a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0020a-CSV/mapping.ttl deleted file mode 100644 index fb9c8f5d..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-CSV/mapping.ttl +++ /dev/null @@ -1,20 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "{Name}"; - rml:termType rml:IRI - ] . diff --git a/src/test/resources/rml-core/RMLTC0020a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0020a-CSV/output.nq deleted file mode 100644 index 65071a55..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-CSV/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0020a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0020a-CSV/student.csv deleted file mode 100644 index 289cde5c..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-CSV/student.csv +++ /dev/null @@ -1,6 +0,0 @@ -Name -http://example.com/company/Alice -Bob -Bob/Charles -path/../Danny -Emily Smith diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0020a-JSON/mapping.ttl deleted file mode 100644 index e3268b17..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-JSON/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "{Name}"; - rml:termType rml:IRI - ] . diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq deleted file mode 100644 index 65071a55..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/student.json b/src/test/resources/rml-core/RMLTC0020a-JSON/student.json deleted file mode 100644 index 3b14e8fd..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-JSON/student.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "students": [ - {"Name": "http://example.com/company/Alice"}, - {"Name": "Bob"}, - {"Name": "Bob/Charles"}, - {"Name": "path/../Danny"}, - {"Name": "Emily Smith"} - ] -} diff --git a/src/test/resources/rml-core/RMLTC0020a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0020a-MySQL/mapping.ttl deleted file mode 100644 index f60f5907..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-MySQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "{Name}"; - rml:termType rml:IRI - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . diff --git a/src/test/resources/rml-core/RMLTC0020a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0020a-MySQL/output.nq deleted file mode 100644 index 65071a55..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-MySQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0020a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0020a-MySQL/resource.sql deleted file mode 100644 index e3228e27..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-MySQL/resource.sql +++ /dev/null @@ -1,12 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.Student; - -CREATE TABLE Student ( -Name VARCHAR(50) -); - -INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice'); -INSERT INTO Student (Name) VALUES ('Bob'); -INSERT INTO Student (Name) VALUES ('Bob/Charles'); -INSERT INTO Student (Name) VALUES ('path/../Danny'); -INSERT INTO Student (Name) VALUES ('Emily Smith'); diff --git a/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/mapping.ttl deleted file mode 100644 index 646dbbf7..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "{name}"; - rml:termType rml:IRI - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . diff --git a/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/output.nq deleted file mode 100644 index 65071a55..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/resource.sql deleted file mode 100644 index 0bee3169..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-PostgreSQL/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -DROP TABLE IF EXISTS Student; - -CREATE TABLE Student ( -Name VARCHAR(50) -); - -INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice'); -INSERT INTO Student (Name) VALUES ('Bob'); -INSERT INTO Student (Name) VALUES ('Bob/Charles'); -INSERT INTO Student (Name) VALUES ('path/../Danny'); -INSERT INTO Student (Name) VALUES ('Emily Smith'); diff --git a/src/test/resources/rml-core/RMLTC0020a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0020a-SQLServer/mapping.ttl deleted file mode 100644 index f6e5b4f0..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-SQLServer/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix d2rq: . -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Student" - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "{Name}"; - rml:termType rml:IRI - ] . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . diff --git a/src/test/resources/rml-core/RMLTC0020a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0020a-SQLServer/output.nq deleted file mode 100644 index 65071a55..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-SQLServer/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0020a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0020a-SQLServer/resource.sql deleted file mode 100644 index 959a905b..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-SQLServer/resource.sql +++ /dev/null @@ -1,12 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS Student; - -CREATE TABLE Student ( -Name VARCHAR(50) -); - -INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice'); -INSERT INTO Student (Name) VALUES ('Bob'); -INSERT INTO Student (Name) VALUES ('Bob/Charles'); -INSERT INTO Student (Name) VALUES ('path/../Danny'); -INSERT INTO Student (Name) VALUES ('Emily Smith'); diff --git a/src/test/resources/rml-core/RMLTC0020a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0020a-XML/mapping.ttl deleted file mode 100644 index 8a179cce..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-XML/mapping.ttl +++ /dev/null @@ -1,21 +0,0 @@ -@prefix foaf: . -@prefix rdf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type - ]; - rml:subjectMap [ - rml:template "{Name}"; - rml:termType rml:IRI - ] . diff --git a/src/test/resources/rml-core/RMLTC0020a-XML/output.nq b/src/test/resources/rml-core/RMLTC0020a-XML/output.nq deleted file mode 100644 index 65071a55..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - . - . - . - . diff --git a/src/test/resources/rml-core/RMLTC0020a-XML/student.xml b/src/test/resources/rml-core/RMLTC0020a-XML/student.xml deleted file mode 100644 index 467bf17d..00000000 --- a/src/test/resources/rml-core/RMLTC0020a-XML/student.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - http://example.com/company/Alice - Bob - Bob/Charles - path/../Danny - Emily Smith - diff --git a/src/test/resources/rml-core/RMLTC0021a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0021a-CSV/mapping.ttl deleted file mode 100644 index 79799413..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-CSV/mapping.ttl +++ /dev/null @@ -1,25 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "Sport" - ]; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:sameSportAs - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0021a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0021a-CSV/output.nq deleted file mode 100644 index 4488c582..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-CSV/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - . - . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0021a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0021a-CSV/student.csv deleted file mode 100644 index 8a96794b..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-CSV/student.csv +++ /dev/null @@ -1,4 +0,0 @@ -ID,Name,Sport -10,Venus Williams,Tennis -20,Serena Williams,Tennis -30,Loena Hendrickx,Figure skating diff --git a/src/test/resources/rml-core/RMLTC0021a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0021a-JSON/mapping.ttl deleted file mode 100644 index 0603e541..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-JSON/mapping.ttl +++ /dev/null @@ -1,28 +0,0 @@ -@prefix activity: . -@prefix ex: . -@prefix rdf: . -@prefix rml: . - - a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "Sport" - ]; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:sameSportAs - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0021a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0021a-JSON/output.nq deleted file mode 100644 index 4488c582..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-JSON/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - . - . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0021a-JSON/student.json b/src/test/resources/rml-core/RMLTC0021a-JSON/student.json deleted file mode 100644 index a1d5027d..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-JSON/student.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "students": [{ - "ID": 10, - "Name":"Venus Williams", - "Sport": "Tennis" - }, { - "ID": 20, - "Name":"Serena Williams", - "Sport": "Tennis" - }, { - "ID": 30, - "Name":"Loena Hendrickx", - "Sport": "Figure skating" - }] -} diff --git a/src/test/resources/rml-core/RMLTC0021a-MySQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0021a-MySQL/mapping.ttl deleted file mode 100644 index 079d449f..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-MySQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; - d2rq:password ""; - d2rq:username "root" . - - a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "Sport" - ]; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:sameSportAs - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0021a-MySQL/output.nq b/src/test/resources/rml-core/RMLTC0021a-MySQL/output.nq deleted file mode 100644 index 4488c582..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-MySQL/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - . - . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0021a-MySQL/resource.sql b/src/test/resources/rml-core/RMLTC0021a-MySQL/resource.sql deleted file mode 100644 index d7f421d4..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-MySQL/resource.sql +++ /dev/null @@ -1,11 +0,0 @@ -USE test; -DROP TABLE IF EXISTS test.student; - -CREATE TABLE student ( - ID INTEGER, - Name VARCHAR(50), - Sport VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); -INSERT INTO student values ('20', 'Serena Williams', 'Tennis'); -INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating'); diff --git a/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/mapping.ttl deleted file mode 100644 index 7d2dff27..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "org.postgresql.Driver"; - d2rq:password ""; - d2rq:username "postgres" . - - a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "Sport" - ]; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:sameSportAs - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/output.nq b/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/output.nq deleted file mode 100644 index 4488c582..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - . - . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/resource.sql b/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/resource.sql deleted file mode 100644 index 9e31d74b..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-PostgreSQL/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE IF EXISTS student; - -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); -INSERT INTO student values ('20', 'Serena Williams', 'Tennis'); -INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating'); diff --git a/src/test/resources/rml-core/RMLTC0021a-SPARQL/mapping.ttl b/src/test/resources/rml-core/RMLTC0021a-SPARQL/mapping.ttl deleted file mode 100644 index 5e44b45c..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-SPARQL/mapping.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix ex: . -@prefix formats: . -@prefix rml: . -@prefix sd: . - -ex:RefObjectMap1 a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport.value"; - rml:parent "Sport.value" - ]; - rml:parentTriplesMap ex:TriplesMap1 . - -ex:TriplesMap1 a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator """ - PREFIX rdfs: - PREFIX foaf: - PREFIX rdf: - SELECT ?Name ?ID - WHERE { - ?x foaf:name ?Name ; - rdf:ID ?ID ; - } """; - rml:referenceFormulation formats:SPARQL_Results_JSON; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path - ] - ]; - rml:predicateObjectMap [ - rml:objectMap ex:RefObjectMap1; - rml:predicate ex:sameSportAs - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID.value}/{Name.value}" - ] . - - a sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query . diff --git a/src/test/resources/rml-core/RMLTC0021a-SPARQL/output.nq b/src/test/resources/rml-core/RMLTC0021a-SPARQL/output.nq deleted file mode 100644 index 4488c582..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-SPARQL/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - . - . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0021a-SPARQL/resource.ttl b/src/test/resources/rml-core/RMLTC0021a-SPARQL/resource.ttl deleted file mode 100644 index fd943016..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-SPARQL/resource.ttl +++ /dev/null @@ -1,19 +0,0 @@ -@prefix foaf: . -@prefix ns1: . -@prefix rdf: . - -[] ns1:plays [ a ns1:Sport ; - foaf:name "Tennis" ] ; - rdf:ID "10" ; - foaf:name "Venus Williams" . - -[] ns1:plays [ a ns1:Sport ; - foaf:name "Tennis" ] ; - rdf:ID "20" ; - foaf:name "Serena Williams" . - -[] ns1:plays [ a ns1:Sport ; - foaf:name "Figure skating" ] ; - rdf:ID "30" ; - foaf:name "Loena Hendrickx" . - diff --git a/src/test/resources/rml-core/RMLTC0021a-SQLServer/mapping.ttl b/src/test/resources/rml-core/RMLTC0021a-SQLServer/mapping.ttl deleted file mode 100644 index a3be9075..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-SQLServer/mapping.ttl +++ /dev/null @@ -1,30 +0,0 @@ -@prefix d2rq: . -@prefix ex: . -@prefix rml: . - - a d2rq:Database; - d2rq:jdbcDSN "CONNECTIONDSN"; - d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; - d2rq:password "YourSTRONG!Passw0rd;"; - d2rq:username "sa" . - - a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "Sport" - ]; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ - rml:source ; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "student" - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:sameSportAs - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0021a-SQLServer/output.nq b/src/test/resources/rml-core/RMLTC0021a-SQLServer/output.nq deleted file mode 100644 index 4488c582..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-SQLServer/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - . - . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0021a-SQLServer/resource.sql b/src/test/resources/rml-core/RMLTC0021a-SQLServer/resource.sql deleted file mode 100644 index 76d1c3e6..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-SQLServer/resource.sql +++ /dev/null @@ -1,10 +0,0 @@ -USE TestDB; -DROP TABLE IF EXISTS student; -CREATE TABLE student ( - "ID" INTEGER, - "Name" VARCHAR(50), - "Sport" VARCHAR(50) -); -INSERT INTO student values ('10', 'Venus Williams', 'Tennis'); -INSERT INTO student values ('20', 'Serena Williams', 'Tennis'); -INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating'); diff --git a/src/test/resources/rml-core/RMLTC0021a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0021a-XML/mapping.ttl deleted file mode 100644 index 60bf4a18..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-XML/mapping.ttl +++ /dev/null @@ -1,26 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:RefObjectMap; - rml:joinCondition [ - rml:child "Sport"; - rml:parent "Sport" - ]; - rml:parentTriplesMap . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/students/student"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap ; - rml:predicate ex:sameSportAs - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{ID}/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0021a-XML/output.nq b/src/test/resources/rml-core/RMLTC0021a-XML/output.nq deleted file mode 100644 index 4488c582..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-XML/output.nq +++ /dev/null @@ -1,7 +0,0 @@ - . - . - . - . - . - - diff --git a/src/test/resources/rml-core/RMLTC0021a-XML/student.xml b/src/test/resources/rml-core/RMLTC0021a-XML/student.xml deleted file mode 100644 index 2b184f7d..00000000 --- a/src/test/resources/rml-core/RMLTC0021a-XML/student.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - 10 - Venus Williams - Tennis - - - 20 - Serena Williams - Tennis - - - 30 - Loena Hendrickx - Figure skating - - diff --git a/src/test/resources/rml-core/RMLTC0022a-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0022a-CSV/mapping.ttl deleted file mode 100644 index af948398..00000000 --- a/src/test/resources/rml-core/RMLTC0022a-CSV/mapping.ttl +++ /dev/null @@ -1,29 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . -@prefix xsd: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:datatype xsd:string; - rml:reference "Name" - ]; - rml:predicate foaf:name - ], [ - rml:objectMap [ - rml:datatype xsd:int; - rml:reference "Age" - ]; - rml:predicate ex:age - ]; - rml:subjectMap [ - rml:template "http://example.com/{Name}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0022a-CSV/output.nq b/src/test/resources/rml-core/RMLTC0022a-CSV/output.nq deleted file mode 100644 index a25ee88a..00000000 --- a/src/test/resources/rml-core/RMLTC0022a-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "Venus"^^ . - "21"^^ . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0022a-CSV/student.csv b/src/test/resources/rml-core/RMLTC0022a-CSV/student.csv deleted file mode 100644 index 7af01247..00000000 --- a/src/test/resources/rml-core/RMLTC0022a-CSV/student.csv +++ /dev/null @@ -1,2 +0,0 @@ -Name,Age -Venus,21 diff --git a/src/test/resources/rml-core/RMLTC0022b-CSV/data.csv b/src/test/resources/rml-core/RMLTC0022b-CSV/data.csv deleted file mode 100644 index 00a92ee4..00000000 --- a/src/test/resources/rml-core/RMLTC0022b-CSV/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -FOO,BAR -1,string -2,int diff --git a/src/test/resources/rml-core/RMLTC0022b-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0022b-CSV/mapping.ttl deleted file mode 100644 index 40a4c33a..00000000 --- a/src/test/resources/rml-core/RMLTC0022b-CSV/mapping.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "data.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:datatypeMap [ - rml:template "http://www.w3.org/2001/XMLSchema#{BAR}" - ]; - rml:reference "FOO" - ]; - rml:predicate ex:x - ]; - rml:subjectMap [ - rml:template "http://example.com/{FOO}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0022b-CSV/output.nq b/src/test/resources/rml-core/RMLTC0022b-CSV/output.nq deleted file mode 100644 index c81c7378..00000000 --- a/src/test/resources/rml-core/RMLTC0022b-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "1"^^ . - "2"^^ . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0022c-CSV/data.csv b/src/test/resources/rml-core/RMLTC0022c-CSV/data.csv deleted file mode 100644 index 00a92ee4..00000000 --- a/src/test/resources/rml-core/RMLTC0022c-CSV/data.csv +++ /dev/null @@ -1,3 +0,0 @@ -FOO,BAR -1,string -2,int diff --git a/src/test/resources/rml-core/RMLTC0022c-CSV/mapping.ttl b/src/test/resources/rml-core/RMLTC0022c-CSV/mapping.ttl deleted file mode 100644 index 3aa1c86c..00000000 --- a/src/test/resources/rml-core/RMLTC0022c-CSV/mapping.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix ex: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:referenceFormulation rml:CSV; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "data.csv" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:datatypeMap [ - rml:template "datatype#{BAR}" - ]; - rml:reference "FOO" - ]; - rml:predicate ex:x - ]; - rml:subjectMap [ - rml:template "http://example.com/{FOO}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0022c-CSV/output.nq b/src/test/resources/rml-core/RMLTC0022c-CSV/output.nq deleted file mode 100644 index 593f6c51..00000000 --- a/src/test/resources/rml-core/RMLTC0022c-CSV/output.nq +++ /dev/null @@ -1,2 +0,0 @@ - "1"^^ . - "2"^^ . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0023a-XML/ious.xml b/src/test/resources/rml-core/RMLTC0023a-XML/ious.xml deleted file mode 100644 index aad50963..00000000 --- a/src/test/resources/rml-core/RMLTC0023a-XML/ious.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/test/resources/rml-core/RMLTC0023a-XML/mapping.ttl b/src/test/resources/rml-core/RMLTC0023a-XML/mapping.ttl deleted file mode 100644 index 16ac0cce..00000000 --- a/src/test/resources/rml-core/RMLTC0023a-XML/mapping.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "/persons/person"; - rml:referenceFormulation rml:XPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "ious.xml" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "@amount" - ]; - rml:predicate ex:owes - ]; - rml:subjectMap [ - rml:class foaf:Person; - rml:template "http://example.com/{@fname};{@lname}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0023a-XML/output.nq b/src/test/resources/rml-core/RMLTC0023a-XML/output.nq deleted file mode 100644 index 64e91da4..00000000 --- a/src/test/resources/rml-core/RMLTC0023a-XML/output.nq +++ /dev/null @@ -1,5 +0,0 @@ - . - "30.0E0" . - . - "20.0E0" . - diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/README.md b/src/test/resources/rml-core/RMLTC0026a-JSON/README.md deleted file mode 100644 index 85e87a24..00000000 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/README.md +++ /dev/null @@ -1,53 +0,0 @@ -## RMLTC0026a-JSON - -**Title**: "Generation of triples from arrays" - -**Description**: "Tests the generation of triples from array input data structures" - -**Error expected?** No - -**Input** -``` -{ - "persons": [ - {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} - ] -} - -``` - -**Mapping** -``` -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amounts" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{$.fname}/{$.lname}" - ] . - -``` - -**Output** -``` - "30" . - "40" . - "50" . - -``` - diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl deleted file mode 100644 index 780bd99a..00000000 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix ex: . -@prefix foaf: . -@prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amounts" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "http://example.com/Student/{$.fname}/{$.lname}" - ] . diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq deleted file mode 100644 index 3b8e09fb..00000000 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq +++ /dev/null @@ -1,3 +0,0 @@ - "30" . - "40" . - "50" . diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json deleted file mode 100644 index 705406a9..00000000 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "persons": [ - {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} - ] -} diff --git a/src/test/resources/rml-core/manifest.ttl b/src/test/resources/rml-core/manifest.ttl deleted file mode 100644 index dbde3f27..00000000 --- a/src/test/resources/rml-core/manifest.ttl +++ /dev/null @@ -1,3371 +0,0 @@ -@base . -@prefix dcterms: . -@prefix rmltest: . -@prefix test: . - - a test:TestCase; - dcterms:identifier "RMLTC0000-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0000-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0000-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0000-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0000-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0000-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0000-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001b-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001b-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0001b-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002b-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002b-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002b-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002c-CSV"; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002c-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002c-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002c-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002d-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002d-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002d-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0002e-CSV"; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002e-JSON"; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002e-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002e-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002e-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002e-XML"; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002f-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002f-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002f-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002g-JSON"; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002g-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002g-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002g-SPARQL"; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002g-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002h-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002h-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002h-SPARQL"; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002h-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002i-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002i-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002i-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002j-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002j-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0002j-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0003a-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0003a-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0003a-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0003b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003c-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003c-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003c-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003c-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003c-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003c-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0003c-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0004a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student_sport.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0004a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student_sport.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0004a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0004a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0004a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0004a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student_sport.csv"; - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0004a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student_sport.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0004b-CSV"; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0004b-JSON"; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0004b-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0004b-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0004b-SPARQL"; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0004b-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0004b-XML"; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0005a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "ious.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0005a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "ious.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0005a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0005a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0005a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0005a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "ious.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0005b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0005b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0005b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0006a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0006a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0006a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0006a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0006a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0006a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0006a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007b-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007b-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007b-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007c-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007c-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007c-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007c-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007c-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007c-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007c-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007d-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007d-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007d-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007d-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007d-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007d-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007d-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007e-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007e-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007e-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007e-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007e-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007e-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007e-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007f-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007f-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007f-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007f-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007f-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007f-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007f-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007g-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007g-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007g-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007g-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007g-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007g-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007g-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0007h-CSV"; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0007h-JSON"; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0007h-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0007h-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0007h-SPARQL"; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0007h-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0007h-XML"; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0008a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008b-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008b-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008b-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008c-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008c-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008c-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008c-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008c-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008c-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0008c-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.csv", "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.json", "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource1.ttl", "resource2.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.xml", "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.csv", "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009b-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.json", "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009b-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource1.ttl", "resource2.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009b-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.xml", "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009c-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009c-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009c-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009d-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009d-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0009d-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_info.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_info.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_info.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010b-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_info.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010b-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_info.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010c-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_info.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010c-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_info.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010c-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010c-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010c-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0010c-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_info.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.csv", "student.csv", "student_sport.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011b-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.json", "student.json", "student_sport.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0011b-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "sport.xml", "student.xml", "student_sport.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "persons.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "persons.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "persons.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "lives.csv", "persons.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012b-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "lives.json", "persons.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012b-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource1.ttl", "resource2.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012b-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "lives.xml", "persons.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012c-CSV"; - rmltest:input [ - rmltest:inputFile "persons.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012c-JSON"; - rmltest:input [ - rmltest:inputFile "persons.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012c-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012c-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012c-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012c-XML"; - rmltest:input [ - rmltest:inputFile "persons.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012d-CSV"; - rmltest:input [ - rmltest:inputFile "persons.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012d-JSON"; - rmltest:input [ - rmltest:inputFile "persons.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012d-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012d-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012d-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012d-XML"; - rmltest:input [ - rmltest:inputFile "persons.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0012e-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012e-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0012e-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0013a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "persons.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0013a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0013a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0013a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0014d-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0014d-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0014d-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0015a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_en.csv", "country_es.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0015a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_en.json", "country_es.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0015a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0015a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0015a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0015a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "country_en.xml", "country_es.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0015b-CSV"; - rmltest:input [ - rmltest:inputFile "country_en.csv", "country_es.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0015b-JSON"; - rmltest:input [ - rmltest:inputFile "country_en.json", "country_es.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0015b-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0015b-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0015b-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0015b-XML"; - rmltest:input [ - rmltest:inputFile "country_en.xml", "country_es.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0016a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016b-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016b-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016b-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016c-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016c-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016c-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016d-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016d-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016d-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016e-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016e-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0016e-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0018a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0018a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0018a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0019a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "persons.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0019a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "persons.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0019a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0019a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0019a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0019a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "persons.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0019b-CSV"; - rmltest:input [ - rmltest:inputFile "persons.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0019b-JSON"; - rmltest:input [ - rmltest:inputFile "persons.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0019b-MySQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0019b-PostgreSQL"; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0019b-SQLServer"; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0019b-XML"; - rmltest:input [ - rmltest:inputFile "persons.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl" . - - a test:TestCase; - dcterms:identifier "RMLTC0020a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0020a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0020a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0020a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0020a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0020a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0021a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0021a-JSON"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.json"; - rmltest:inputType "JSON" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0021a-MySQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "MySQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0021a-PostgreSQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:database [ - rmltest:sqlScriptFile "resource.sql" - ]; - rmltest:inputType "PostgreSQL" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0021a-SPARQL"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SPARQL"; - rmltest:tripleStore [ - rmltest:rdfFile "resource.ttl" - ] - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0021a-SQLServer"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputType "SQLServer" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0021a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0022a-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "student.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0022b-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "data.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0022c-CSV"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "data.csv"; - rmltest:inputType "CSV" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . - - a test:TestCase; - dcterms:identifier "RMLTC0023a-XML"; - rmltest:hasExpectedOutput true; - rmltest:input [ - rmltest:inputFile "ious.xml"; - rmltest:inputType "XML" - ]; - rmltest:mappingDocument "mapping.ttl"; - rmltest:output "output.nq" . diff --git a/src/test/resources/rml-io/NETCONF/README.md b/src/test/resources/rml-io/NETCONF/README.md deleted file mode 100644 index 13ebd128..00000000 --- a/src/test/resources/rml-io/NETCONF/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# NETCONF Server Instructions - -First, deploy the NETCONF server using a containerized version of netooper2: - -```bash -docker run -it -d -p 830:830 --name netopeer2-server sysrepo/sysrepo-netopeer2:latest -``` - -The NETCONF server listens locally on port 830 and runs a default configuration with username `netconf` and password `netconf`. - -After this, the possible RML mappings to transform the YANG Library 1.0 into RDF can be tested against the server: - -- [Subtree filter query](./subtree/mapping.ttl) -- [XPath filter query](./xpath/mapping.ttl) diff --git a/src/test/resources/rml-io/NETCONF/subtree/default.nq b/src/test/resources/rml-io/NETCONF/subtree/default.nq deleted file mode 100644 index 443e4ea9..00000000 --- a/src/test/resources/rml-io/NETCONF/subtree/default.nq +++ /dev/null @@ -1,160 +0,0 @@ - "ietf-netconf-acm"^^ . - "2018-02-14"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"^^ . - . - "ietf-subscribed-notifications"^^ . - "2019-09-09"^^ . - "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"^^ . - . - "ietf-yang-types"^^ . - "2013-07-15"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-types"^^ . - . - "ietf-tls-server"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tls-server"^^ . - . - "ietf-tls-common"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tls-common"^^ . - . - "ietf-tcp-client"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tcp-client"^^ . - . - "ietf-network-instance"^^ . - "2019-01-21"^^ . - "urn:ietf:params:xml:ns:yang:ietf-network-instance"^^ . - . - "ietf-netconf"^^ . - "2013-09-29"^^ . - "urn:ietf:params:xml:ns:netconf:base:1.0"^^ . - . - "ietf-netconf-monitoring"^^ . - "2010-10-04"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"^^ . - . - "ietf-interfaces"^^ . - "2018-02-20"^^ . - "urn:ietf:params:xml:ns:yang:ietf-interfaces"^^ . - . - "ietf-yang-schema-mount"^^ . - "2019-01-14"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"^^ . - . - "ietf-netconf-notifications"^^ . - "2012-02-06"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"^^ . - . - "ietf-datastores"^^ . - "2018-02-14"^^ . - "urn:ietf:params:xml:ns:yang:ietf-datastores"^^ . - . - "ietf-restconf"^^ . - "2017-01-26"^^ . - "urn:ietf:params:xml:ns:yang:ietf-restconf"^^ . - . - "sysrepo-monitoring"^^ . - "2022-08-19"^^ . - "http://www.sysrepo.org/yang/sysrepo-monitoring"^^ . - . - "ietf-yang-push"^^ . - "2019-09-09"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-push"^^ . - . - "ietf-yang-structure-ext"^^ . - "2020-06-17"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-structure-ext"^^ . - . - "notifications"^^ . - "2008-07-14"^^ . - "urn:ietf:params:xml:ns:netconf:notification:1.0"^^ . - . - "ietf-x509-cert-to-name"^^ . - "2014-12-10"^^ . - "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"^^ . - . - "ietf-truststore"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-truststore"^^ . - . - "ietf-yang-library"^^ . - "2019-01-04"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-library"^^ . - . - "ietf-tcp-server"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tcp-server"^^ . - . - "ietf-origin"^^ . - "2018-02-14"^^ . - "urn:ietf:params:xml:ns:yang:ietf-origin"^^ . - . - "ietf-netconf-nmda"^^ . - "2019-01-07"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"^^ . - . - "iana-crypt-hash"^^ . - "2014-08-06"^^ . - "urn:ietf:params:xml:ns:yang:iana-crypt-hash"^^ . - . - "ietf-tcp-common"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tcp-common"^^ . - . - "sysrepo-plugind"^^ . - "2022-08-26"^^ . - "urn:sysrepo:plugind"^^ . - . - "ietf-keystore"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-keystore"^^ . - . - "sysrepo"^^ . - "2021-10-08"^^ . - "http://www.sysrepo.org/yang/sysrepo"^^ . - . - "ietf-crypto-types"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-crypto-types"^^ . - . - "yang"^^ . - "2022-06-16"^^ . - "urn:ietf:params:xml:ns:yang:1"^^ . - . - "ietf-yang-metadata"^^ . - "2016-08-05"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-metadata"^^ . - . - "nc-notifications"^^ . - "2008-07-14"^^ . - "urn:ietf:params:xml:ns:netmod:notification"^^ . - . - "ietf-netconf-with-defaults"^^ . - "2011-06-01"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"^^ . - . - "ietf-inet-types"^^ . - "2013-07-15"^^ . - "urn:ietf:params:xml:ns:yang:ietf-inet-types"^^ . - . - "ietf-ssh-server"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-ssh-server"^^ . - . - "ietf-ssh-common"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-ssh-common"^^ . - . - "ietf-ip"^^ . - "2018-02-22"^^ . - "urn:ietf:params:xml:ns:yang:ietf-ip"^^ . - . - "ietf-netconf-server"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-server"^^ . - . - "ietf-yang-patch"^^ . - "2017-02-22"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-patch"^^ . - . diff --git a/src/test/resources/rml-io/NETCONF/subtree/mapping.ttl b/src/test/resources/rml-io/NETCONF/subtree/mapping.ttl deleted file mode 100644 index acb8d270..00000000 --- a/src/test/resources/rml-io/NETCONF/subtree/mapping.ttl +++ /dev/null @@ -1,94 +0,0 @@ -@prefix yl: . -@prefix ys: . -@prefix rml: . -@prefix xsd: . -@prefix core: . -@prefix dcterms: . -@prefix observable: . -@base . - -# Connection details to NETCONF server - a ys:NetconfServer ; - ys:socketAddress ; - ys:serverAccount ; - ys:hostKeyVerification "false" -. - -# In this example the NETCONF server is non-NMDA compatible. -# Thus, only operational and running datastores are available. - a ys:OperationalDatastore ; - ys:server -. - a ys:RunningDatastore ; - ys:server -. - - a observable:SocketAddress ; - observable:addressValue "localhost:830" -. - - a ys:ServerAccount ; - ys:username "netconf" ; - core:hasFacet -. - - a observable:AccountAuthenticationFacet ; - observable:password "netconf" ; - observable:passwordType "plain-text" -. - - a ys:SubtreeFilter ; - ys:subtreeValue ''' - - - - - '''; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource ; - rml:source [ a ys:Query, rml:Source ; - ys:sourceDatastore ; - ys:filter - ]; - rml:referenceFormulation [ a ys:NetconfQuerySource ; - rml:namespace [ a rml:Namespace ; - rml:namespacePrefix "yanglib" ; - rml:namespaceURL "urn:ietf:params:xml:ns:yang:ietf-yang-library" ; - ]; - ]; - rml:iterator "/yanglib:modules-state/yanglib:module"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/module/{yanglib:name/text()}:{yanglib:revision/text()}"; - rml:class yl:Module; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant yl:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "yanglib:name/text()"; - rml:datatype xsd:string; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant yl:revisionDate; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "yanglib:revision/text()"; - rml:datatype xsd:date; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant yl:namespace; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "yanglib:namespace/text()"; - rml:datatype xsd:anyURI; - ]; - ]; -. diff --git a/src/test/resources/rml-io/NETCONF/subtree/yanglibrary.xml b/src/test/resources/rml-io/NETCONF/subtree/yanglibrary.xml deleted file mode 100644 index a8ab1081..00000000 --- a/src/test/resources/rml-io/NETCONF/subtree/yanglibrary.xml +++ /dev/null @@ -1,301 +0,0 @@ - - 1 - - ietf-yang-metadata - 2016-08-05 - urn:ietf:params:xml:ns:yang:ietf-yang-metadata - import - - - yang - 2022-06-16 - urn:ietf:params:xml:ns:yang:1 - implement - - - ietf-inet-types - 2013-07-15 - urn:ietf:params:xml:ns:yang:ietf-inet-types - import - - - ietf-yang-types - 2013-07-15 - urn:ietf:params:xml:ns:yang:ietf-yang-types - import - - - ietf-yang-schema-mount - 2019-01-14 - urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount - implement - - - ietf-yang-structure-ext - 2020-06-17 - urn:ietf:params:xml:ns:yang:ietf-yang-structure-ext - import - - - sysrepo - 2021-10-08 - http://www.sysrepo.org/yang/sysrepo - implement - - - ietf-datastores - 2018-02-14 - file:///etc/sysrepo/yang/ietf-datastores@2018-02-14.yang - urn:ietf:params:xml:ns:yang:ietf-datastores - implement - - - ietf-yang-library - 2019-01-04 - file:///etc/sysrepo/yang/ietf-yang-library@2019-01-04.yang - urn:ietf:params:xml:ns:yang:ietf-yang-library - implement - - - ietf-netconf-acm - 2018-02-14 - file:///etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-acm - implement - - - sysrepo-monitoring - 2022-08-19 - file:///etc/sysrepo/yang/sysrepo-monitoring@2022-08-19.yang - http://www.sysrepo.org/yang/sysrepo-monitoring - implement - - - sysrepo-plugind - 2022-08-26 - file:///etc/sysrepo/yang/sysrepo-plugind@2022-08-26.yang - urn:sysrepo:plugind - implement - - - ietf-netconf - 2013-09-29 - file:///etc/sysrepo/yang/ietf-netconf@2013-09-29.yang - urn:ietf:params:xml:ns:netconf:base:1.0 - writable-running - candidate - confirmed-commit - rollback-on-error - validate - startup - url - xpath - implement - - - ietf-netconf-with-defaults - 2011-06-01 - file:///etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults - implement - - - ietf-netconf-notifications - 2012-02-06 - file:///etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-notifications - implement - - - ietf-origin - 2018-02-14 - file:///etc/sysrepo/yang/ietf-origin@2018-02-14.yang - urn:ietf:params:xml:ns:yang:ietf-origin - implement - - - ietf-netconf-monitoring - 2010-10-04 - file:///etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring - implement - - - ietf-netconf-nmda - 2019-01-07 - file:///etc/sysrepo/yang/ietf-netconf-nmda@2019-01-07.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-nmda - origin - with-defaults - implement - - - nc-notifications - 2008-07-14 - file:///etc/sysrepo/yang/nc-notifications@2008-07-14.yang - urn:ietf:params:xml:ns:netmod:notification - implement - - - notifications - 2008-07-14 - file:///etc/sysrepo/yang/notifications@2008-07-14.yang - urn:ietf:params:xml:ns:netconf:notification:1.0 - implement - - - ietf-x509-cert-to-name - 2014-12-10 - file:///etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang - urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name - implement - - - ietf-keystore - 2019-07-02 - file:///etc/sysrepo/yang/ietf-keystore@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-keystore - keystore-supported - implement - - - ietf-crypto-types - 2019-07-02 - file:///etc/sysrepo/yang/ietf-crypto-types@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-crypto-types - import - - - ietf-truststore - 2019-07-02 - file:///etc/sysrepo/yang/ietf-truststore@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-truststore - truststore-supported - x509-certificates - implement - - - ietf-tcp-common - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tcp-common@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tcp-common - keepalives-supported - implement - - - ietf-ssh-server - 2019-07-02 - file:///etc/sysrepo/yang/ietf-ssh-server@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-ssh-server - local-client-auth-supported - implement - - - ietf-ssh-common - 2019-07-02 - file:///etc/sysrepo/yang/ietf-ssh-common@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-ssh-common - import - - - iana-crypt-hash - 2014-08-06 - file:///etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang - urn:ietf:params:xml:ns:yang:iana-crypt-hash - import - - - ietf-tls-server - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tls-server@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tls-server - local-client-auth-supported - implement - - - ietf-tls-common - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tls-common@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tls-common - import - - - ietf-netconf-server - 2019-07-02 - file:///etc/sysrepo/yang/ietf-netconf-server@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-server - ssh-listen - tls-listen - ssh-call-home - tls-call-home - implement - - - ietf-tcp-client - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tcp-client@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tcp-client - import - - - ietf-tcp-server - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tcp-server@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tcp-server - import - - - ietf-interfaces - 2018-02-20 - file:///etc/sysrepo/yang/ietf-interfaces@2018-02-20.yang - urn:ietf:params:xml:ns:yang:ietf-interfaces - implement - - - ietf-ip - 2018-02-22 - file:///etc/sysrepo/yang/ietf-ip@2018-02-22.yang - urn:ietf:params:xml:ns:yang:ietf-ip - implement - - - ietf-network-instance - 2019-01-21 - file:///etc/sysrepo/yang/ietf-network-instance@2019-01-21.yang - urn:ietf:params:xml:ns:yang:ietf-network-instance - implement - - - ietf-subscribed-notifications - 2019-09-09 - file:///etc/sysrepo/yang/ietf-subscribed-notifications@2019-09-09.yang - urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications - encode-xml - replay - subtree - xpath - implement - - - ietf-restconf - 2017-01-26 - file:///etc/sysrepo/yang/ietf-restconf@2017-01-26.yang - urn:ietf:params:xml:ns:yang:ietf-restconf - import - - - ietf-yang-push - 2019-09-09 - file:///etc/sysrepo/yang/ietf-yang-push@2019-09-09.yang - urn:ietf:params:xml:ns:yang:ietf-yang-push - on-change - implement - - - ietf-yang-patch - 2017-02-22 - file:///etc/sysrepo/yang/ietf-yang-patch@2017-02-22.yang - urn:ietf:params:xml:ns:yang:ietf-yang-patch - import - - diff --git a/src/test/resources/rml-io/NETCONF/xpath/default.nq b/src/test/resources/rml-io/NETCONF/xpath/default.nq deleted file mode 100644 index 73b70967..00000000 --- a/src/test/resources/rml-io/NETCONF/xpath/default.nq +++ /dev/null @@ -1,160 +0,0 @@ - "ietf-netconf-acm"^^ . - "2018-02-14"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-acm"^^ . - . - "ietf-subscribed-notifications"^^ . - "2019-09-09"^^ . - "urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications"^^ . - . - "ietf-yang-types"^^ . - "2013-07-15"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-types"^^ . - . - "ietf-tls-server"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tls-server"^^ . - . - "ietf-tls-common"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tls-common"^^ . - . - "ietf-tcp-client"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tcp-client"^^ . - . - "ietf-network-instance"^^ . - "2019-01-21"^^ . - "urn:ietf:params:xml:ns:yang:ietf-network-instance"^^ . - . - "ietf-netconf"^^ . - "2013-09-29"^^ . - "urn:ietf:params:xml:ns:netconf:base:1.0"^^ . - . - "ietf-netconf-monitoring"^^ . - "2010-10-04"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"^^ . - . - "ietf-interfaces"^^ . - "2018-02-20"^^ . - "urn:ietf:params:xml:ns:yang:ietf-interfaces"^^ . - . - "ietf-yang-schema-mount"^^ . - "2019-01-14"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"^^ . - . - "ietf-netconf-notifications"^^ . - "2012-02-06"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-notifications"^^ . - . - "ietf-datastores"^^ . - "2018-02-14"^^ . - "urn:ietf:params:xml:ns:yang:ietf-datastores"^^ . - . - "ietf-restconf"^^ . - "2017-01-26"^^ . - "urn:ietf:params:xml:ns:yang:ietf-restconf"^^ . - . - "sysrepo-monitoring"^^ . - "2022-08-19"^^ . - "http://www.sysrepo.org/yang/sysrepo-monitoring"^^ . - . - "ietf-yang-push"^^ . - "2019-09-09"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-push"^^ . - . - "ietf-yang-structure-ext"^^ . - "2020-06-17"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-structure-ext"^^ . - . - "notifications"^^ . - "2008-07-14"^^ . - "urn:ietf:params:xml:ns:netconf:notification:1.0"^^ . - . - "ietf-x509-cert-to-name"^^ . - "2014-12-10"^^ . - "urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name"^^ . - . - "ietf-truststore"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-truststore"^^ . - . - "ietf-yang-library"^^ . - "2019-01-04"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-library"^^ . - . - "ietf-tcp-server"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tcp-server"^^ . - . - "ietf-origin"^^ . - "2018-02-14"^^ . - "urn:ietf:params:xml:ns:yang:ietf-origin"^^ . - . - "ietf-netconf-nmda"^^ . - "2019-01-07"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"^^ . - . - "iana-crypt-hash"^^ . - "2014-08-06"^^ . - "urn:ietf:params:xml:ns:yang:iana-crypt-hash"^^ . - . - "ietf-tcp-common"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-tcp-common"^^ . - . - "sysrepo-plugind"^^ . - "2022-08-26"^^ . - "urn:sysrepo:plugind"^^ . - . - "ietf-keystore"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-keystore"^^ . - . - "sysrepo"^^ . - "2021-10-08"^^ . - "http://www.sysrepo.org/yang/sysrepo"^^ . - . - "ietf-crypto-types"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-crypto-types"^^ . - . - "yang"^^ . - "2022-06-16"^^ . - "urn:ietf:params:xml:ns:yang:1"^^ . - . - "ietf-yang-metadata"^^ . - "2016-08-05"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-metadata"^^ . - . - "nc-notifications"^^ . - "2008-07-14"^^ . - "urn:ietf:params:xml:ns:netmod:notification"^^ . - . - "ietf-netconf-with-defaults"^^ . - "2011-06-01"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults"^^ . - . - "ietf-inet-types"^^ . - "2013-07-15"^^ . - "urn:ietf:params:xml:ns:yang:ietf-inet-types"^^ . - . - "ietf-ssh-server"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-ssh-server"^^ . - . - "ietf-ssh-common"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-ssh-common"^^ . - . - "ietf-ip"^^ . - "2018-02-22"^^ . - "urn:ietf:params:xml:ns:yang:ietf-ip"^^ . - . - "ietf-netconf-server"^^ . - "2019-07-02"^^ . - "urn:ietf:params:xml:ns:yang:ietf-netconf-server"^^ . - . - "ietf-yang-patch"^^ . - "2017-02-22"^^ . - "urn:ietf:params:xml:ns:yang:ietf-yang-patch"^^ . - . diff --git a/src/test/resources/rml-io/NETCONF/xpath/mapping.ttl b/src/test/resources/rml-io/NETCONF/xpath/mapping.ttl deleted file mode 100644 index da0f86ea..00000000 --- a/src/test/resources/rml-io/NETCONF/xpath/mapping.ttl +++ /dev/null @@ -1,95 +0,0 @@ -@prefix yl: . -@prefix ys: . -@prefix rml: . -@prefix xsd: . -@prefix core: . -@prefix dcterms: . -@prefix observable: . -@base . - -# Connection details to NETCONF server - a ys:NetconfServer ; - ys:socketAddress ; - ys:serverAccount ; - ys:hostKeyVerification "false" ; - ys:capability ys:XpathCapability , - ys:YangLibrary1.0 -. - - a ys:OperationalDatastore ; - ys:server -. - a ys:RunningDatastore ; - ys:server -. - - a observable:SocketAddress ; - observable:addressValue "localhost:830" -. - - a ys:ServerAccount ; - ys:username "netconf" ; - core:hasFacet -. - - a observable:AccountAuthenticationFacet ; - observable:password "netconf" ; - observable:passwordType "plain-text" -. - - a ys:XPathFilter ; - ys:xpathValue "/yanglib:modules-state"; - ys:namespace [ a ys:Namespace ; - ys:namespacePrefix "yanglib" ; - ys:namespaceURL "urn:ietf:params:xml:ns:yang:ietf-yang-library" ; - ]; -. - -# Note that ys:Query is processed as part of the RML mapping -# rml:iterator replaces the ys:Filter in the YANG query -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source [ a ys:Query, rml:Source ; - ys:sourceDatastore ; - ys:filter - ]; - rml:referenceFormulation [ a ys:NetconfQuerySource ; - rml:namespace [ a rml:Namespace ; - rml:namespacePrefix "yanglib" ; - rml:namespaceURL "urn:ietf:params:xml:ns:yang:ietf-yang-library" ; - ]; - ]; - rml:iterator "/yanglib:modules-state/yanglib:module"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/module/{yanglib:name/text()}:{yanglib:revision/text()}"; - rml:class yl:Module; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant yl:moduleName; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "yanglib:name/text()"; - rml:datatype xsd:string; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant yl:revisionDate; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "yanglib:revision/text()"; - rml:datatype xsd:date; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant yl:namespace; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "yanglib:namespace/text()"; - rml:datatype xsd:anyURI; - ]; - ]; -. diff --git a/src/test/resources/rml-io/NETCONF/xpath/yanglibrary.xml b/src/test/resources/rml-io/NETCONF/xpath/yanglibrary.xml deleted file mode 100644 index a8ab1081..00000000 --- a/src/test/resources/rml-io/NETCONF/xpath/yanglibrary.xml +++ /dev/null @@ -1,301 +0,0 @@ - - 1 - - ietf-yang-metadata - 2016-08-05 - urn:ietf:params:xml:ns:yang:ietf-yang-metadata - import - - - yang - 2022-06-16 - urn:ietf:params:xml:ns:yang:1 - implement - - - ietf-inet-types - 2013-07-15 - urn:ietf:params:xml:ns:yang:ietf-inet-types - import - - - ietf-yang-types - 2013-07-15 - urn:ietf:params:xml:ns:yang:ietf-yang-types - import - - - ietf-yang-schema-mount - 2019-01-14 - urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount - implement - - - ietf-yang-structure-ext - 2020-06-17 - urn:ietf:params:xml:ns:yang:ietf-yang-structure-ext - import - - - sysrepo - 2021-10-08 - http://www.sysrepo.org/yang/sysrepo - implement - - - ietf-datastores - 2018-02-14 - file:///etc/sysrepo/yang/ietf-datastores@2018-02-14.yang - urn:ietf:params:xml:ns:yang:ietf-datastores - implement - - - ietf-yang-library - 2019-01-04 - file:///etc/sysrepo/yang/ietf-yang-library@2019-01-04.yang - urn:ietf:params:xml:ns:yang:ietf-yang-library - implement - - - ietf-netconf-acm - 2018-02-14 - file:///etc/sysrepo/yang/ietf-netconf-acm@2018-02-14.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-acm - implement - - - sysrepo-monitoring - 2022-08-19 - file:///etc/sysrepo/yang/sysrepo-monitoring@2022-08-19.yang - http://www.sysrepo.org/yang/sysrepo-monitoring - implement - - - sysrepo-plugind - 2022-08-26 - file:///etc/sysrepo/yang/sysrepo-plugind@2022-08-26.yang - urn:sysrepo:plugind - implement - - - ietf-netconf - 2013-09-29 - file:///etc/sysrepo/yang/ietf-netconf@2013-09-29.yang - urn:ietf:params:xml:ns:netconf:base:1.0 - writable-running - candidate - confirmed-commit - rollback-on-error - validate - startup - url - xpath - implement - - - ietf-netconf-with-defaults - 2011-06-01 - file:///etc/sysrepo/yang/ietf-netconf-with-defaults@2011-06-01.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults - implement - - - ietf-netconf-notifications - 2012-02-06 - file:///etc/sysrepo/yang/ietf-netconf-notifications@2012-02-06.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-notifications - implement - - - ietf-origin - 2018-02-14 - file:///etc/sysrepo/yang/ietf-origin@2018-02-14.yang - urn:ietf:params:xml:ns:yang:ietf-origin - implement - - - ietf-netconf-monitoring - 2010-10-04 - file:///etc/sysrepo/yang/ietf-netconf-monitoring@2010-10-04.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring - implement - - - ietf-netconf-nmda - 2019-01-07 - file:///etc/sysrepo/yang/ietf-netconf-nmda@2019-01-07.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-nmda - origin - with-defaults - implement - - - nc-notifications - 2008-07-14 - file:///etc/sysrepo/yang/nc-notifications@2008-07-14.yang - urn:ietf:params:xml:ns:netmod:notification - implement - - - notifications - 2008-07-14 - file:///etc/sysrepo/yang/notifications@2008-07-14.yang - urn:ietf:params:xml:ns:netconf:notification:1.0 - implement - - - ietf-x509-cert-to-name - 2014-12-10 - file:///etc/sysrepo/yang/ietf-x509-cert-to-name@2014-12-10.yang - urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name - implement - - - ietf-keystore - 2019-07-02 - file:///etc/sysrepo/yang/ietf-keystore@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-keystore - keystore-supported - implement - - - ietf-crypto-types - 2019-07-02 - file:///etc/sysrepo/yang/ietf-crypto-types@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-crypto-types - import - - - ietf-truststore - 2019-07-02 - file:///etc/sysrepo/yang/ietf-truststore@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-truststore - truststore-supported - x509-certificates - implement - - - ietf-tcp-common - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tcp-common@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tcp-common - keepalives-supported - implement - - - ietf-ssh-server - 2019-07-02 - file:///etc/sysrepo/yang/ietf-ssh-server@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-ssh-server - local-client-auth-supported - implement - - - ietf-ssh-common - 2019-07-02 - file:///etc/sysrepo/yang/ietf-ssh-common@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-ssh-common - import - - - iana-crypt-hash - 2014-08-06 - file:///etc/sysrepo/yang/iana-crypt-hash@2014-08-06.yang - urn:ietf:params:xml:ns:yang:iana-crypt-hash - import - - - ietf-tls-server - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tls-server@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tls-server - local-client-auth-supported - implement - - - ietf-tls-common - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tls-common@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tls-common - import - - - ietf-netconf-server - 2019-07-02 - file:///etc/sysrepo/yang/ietf-netconf-server@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-netconf-server - ssh-listen - tls-listen - ssh-call-home - tls-call-home - implement - - - ietf-tcp-client - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tcp-client@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tcp-client - import - - - ietf-tcp-server - 2019-07-02 - file:///etc/sysrepo/yang/ietf-tcp-server@2019-07-02.yang - urn:ietf:params:xml:ns:yang:ietf-tcp-server - import - - - ietf-interfaces - 2018-02-20 - file:///etc/sysrepo/yang/ietf-interfaces@2018-02-20.yang - urn:ietf:params:xml:ns:yang:ietf-interfaces - implement - - - ietf-ip - 2018-02-22 - file:///etc/sysrepo/yang/ietf-ip@2018-02-22.yang - urn:ietf:params:xml:ns:yang:ietf-ip - implement - - - ietf-network-instance - 2019-01-21 - file:///etc/sysrepo/yang/ietf-network-instance@2019-01-21.yang - urn:ietf:params:xml:ns:yang:ietf-network-instance - implement - - - ietf-subscribed-notifications - 2019-09-09 - file:///etc/sysrepo/yang/ietf-subscribed-notifications@2019-09-09.yang - urn:ietf:params:xml:ns:yang:ietf-subscribed-notifications - encode-xml - replay - subtree - xpath - implement - - - ietf-restconf - 2017-01-26 - file:///etc/sysrepo/yang/ietf-restconf@2017-01-26.yang - urn:ietf:params:xml:ns:yang:ietf-restconf - import - - - ietf-yang-push - 2019-09-09 - file:///etc/sysrepo/yang/ietf-yang-push@2019-09-09.yang - urn:ietf:params:xml:ns:yang:ietf-yang-push - on-change - implement - - - ietf-yang-patch - 2017-02-22 - file:///etc/sysrepo/yang/ietf-yang-patch@2017-02-22.yang - urn:ietf:params:xml:ns:yang:ietf-yang-patch - import - - diff --git a/src/test/resources/rml-io/RMLSTC0001a/Friends.json b/src/test/resources/rml-io/RMLSTC0001a/Friends.json deleted file mode 100644 index 8e554498..00000000 --- a/src/test/resources/rml-io/RMLSTC0001a/Friends.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "id": 0, - "name": "Monica Geller", - "age": 33 - }, - { - "id": 1, - "name": "Rachel Green", - "age": 34 - }, - { - "id": 2, - "name": "Joey Tribbiani", - "age": 35 - }, - { - "id": 3, - "name": "Chandler Bing", - "age": 36 - }, - { - "id": 4, - "name": "Ross Geller", - "age": 37 - } -] diff --git a/src/test/resources/rml-io/RMLSTC0001a/default.nq b/src/test/resources/rml-io/RMLSTC0001a/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0001a/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0001a/mapping.ttl b/src/test/resources/rml-io/RMLSTC0001a/mapping.ttl deleted file mode 100644 index a0e95acd..00000000 --- a/src/test/resources/rml-io/RMLSTC0001a/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; - rml:encoding rml:UTF-8; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0001b/Friends-UTF16.json b/src/test/resources/rml-io/RMLSTC0001b/Friends-UTF16.json deleted file mode 100644 index 415e986531d4781633acb090c5a3a81837e3b2f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 664 zcmb7?F$=;l5QX2|UlBSxsHqB$ItYSGaTABy1`TM0I*It#)fXEA6-)?6!X8ouST4st=VS*xoU>qS>(*=b)9oSM`aaX#ztLVJPXujgj&fW?nzTp7{rq*-WDV diff --git a/src/test/resources/rml-io/RMLSTC0001b/default.nq b/src/test/resources/rml-io/RMLSTC0001b/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0001b/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0001b/mapping.ttl b/src/test/resources/rml-io/RMLSTC0001b/mapping.ttl deleted file mode 100644 index 9564ad5d..00000000 --- a/src/test/resources/rml-io/RMLSTC0001b/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; - rml:encoding rml:UTF-16; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0002a/Friends.json b/src/test/resources/rml-io/RMLSTC0002a/Friends.json deleted file mode 100644 index 8e554498..00000000 --- a/src/test/resources/rml-io/RMLSTC0002a/Friends.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "id": 0, - "name": "Monica Geller", - "age": 33 - }, - { - "id": 1, - "name": "Rachel Green", - "age": 34 - }, - { - "id": 2, - "name": "Joey Tribbiani", - "age": 35 - }, - { - "id": 3, - "name": "Chandler Bing", - "age": 36 - }, - { - "id": 4, - "name": "Ross Geller", - "age": 37 - } -] diff --git a/src/test/resources/rml-io/RMLSTC0002a/default.nq b/src/test/resources/rml-io/RMLSTC0002a/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0002a/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0002a/mapping.ttl b/src/test/resources/rml-io/RMLSTC0002a/mapping.ttl deleted file mode 100644 index 7f0030e7..00000000 --- a/src/test/resources/rml-io/RMLSTC0002a/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0002b/Friends.json.gz b/src/test/resources/rml-io/RMLSTC0002b/Friends.json.gz deleted file mode 100644 index 18bb45162065826a34773f6a10ba119bce30ad83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 166 zcmV;X09pSZiwFqII7Vau14eRbWo~41E^2dcZUBqsQc$Q?01^rcN|`B2Rtg3>5KdlV zZYq$g "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0002b/mapping.ttl b/src/test/resources/rml-io/RMLSTC0002b/mapping.ttl deleted file mode 100644 index e85be871..00000000 --- a/src/test/resources/rml-io/RMLSTC0002b/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; - rml:compression rml:gzip; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0002c/default.nq b/src/test/resources/rml-io/RMLSTC0002c/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0002c/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0002c/mapping.ttl b/src/test/resources/rml-io/RMLSTC0002c/mapping.ttl deleted file mode 100644 index 2a1ba1b4..00000000 --- a/src/test/resources/rml-io/RMLSTC0002c/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; - rml:compression rml:zip; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0002d/Friends.json.tar.xz b/src/test/resources/rml-io/RMLSTC0002d/Friends.json.tar.xz deleted file mode 100644 index c37fd5f8a600fbacc2e26ee89ae9d2ee5b7c0091..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10240 zcmeIvL2JS=7{>9O`zc;}mXS1X6?WV}Vc@=oU&WWVCk z1R~L#T60U_ul+&vaTf0d(V5bPsB}&FOmgzQ@aEH|Wx4FU+ZkHewzZ-B*);opPwVvP zrN1>OsI0IuyMt|M5v=uDfJXyW7I^FIiPphwx6XK%CF;?H&JwQ& "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0002d/mapping.ttl b/src/test/resources/rml-io/RMLSTC0002d/mapping.ttl deleted file mode 100644 index 2269a236..00000000 --- a/src/test/resources/rml-io/RMLSTC0002d/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; - rml:compression rml:tarxz; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0002e/default.nq b/src/test/resources/rml-io/RMLSTC0002e/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0002e/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0002e/mapping.ttl b/src/test/resources/rml-io/RMLSTC0002e/mapping.ttl deleted file mode 100644 index bc8868f8..00000000 --- a/src/test/resources/rml-io/RMLSTC0002e/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; - rml:compression rml:targz; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0003/Friends.nt b/src/test/resources/rml-io/RMLSTC0003/Friends.nt deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0003/Friends.nt +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0003/default.nq b/src/test/resources/rml-io/RMLSTC0003/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0003/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0003/mapping.ttl b/src/test/resources/rml-io/RMLSTC0003/mapping.ttl deleted file mode 100644 index f4a8bc06..00000000 --- a/src/test/resources/rml-io/RMLSTC0003/mapping.ttl +++ /dev/null @@ -1,41 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix void: . -@prefix formats: . -@base . - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source [ a rml:RelativePathSource; - rml:path "./Friends.nt"; - ]; - rml:iterator """ - PREFIX foaf: - - SELECT ?person ?name ?age WHERE { - ?person foaf:name ?name . - ?person foaf:age ?age . - } - """; - rml:referenceFormulation formats:SPARQL_Results_CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:reference "person"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0004a/Friends-NULL.csv b/src/test/resources/rml-io/RMLSTC0004a/Friends-NULL.csv deleted file mode 100644 index ab5f1924..00000000 --- a/src/test/resources/rml-io/RMLSTC0004a/Friends-NULL.csv +++ /dev/null @@ -1,7 +0,0 @@ -id;name;age -0;Monica Geller;33 -1;Rachel Green;34 -2;Joey Tribbiani;35 -3;Chandler Bing;36 -4;Ross Geller;37 -5;; diff --git a/src/test/resources/rml-io/RMLSTC0004a/default.nq b/src/test/resources/rml-io/RMLSTC0004a/default.nq deleted file mode 100644 index 93cbe17d..00000000 --- a/src/test/resources/rml-io/RMLSTC0004a/default.nq +++ /dev/null @@ -1,12 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . - "" . - "" . diff --git a/src/test/resources/rml-io/RMLSTC0004a/mapping.ttl b/src/test/resources/rml-io/RMLSTC0004a/mapping.ttl deleted file mode 100644 index 8cb88880..00000000 --- a/src/test/resources/rml-io/RMLSTC0004a/mapping.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix csvw: . -@prefix xsd: . -@base . - -<#CSVWSourceAccess> a rml:Source, csvw:Table; - csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004a/Friends-NULL.csv"^^xsd:anyURI ; - csvw:dialect [ a csvw:Dialect; - csvw:delimiter ";"; - csvw:encoding "UTF-8"; - csvw:header "1"^^xsd:boolean; - ]; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#CSVWSourceAccess>; - rml:referenceFormulation rml:CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0004b/Friends-NULL.csv b/src/test/resources/rml-io/RMLSTC0004b/Friends-NULL.csv deleted file mode 100644 index ab5f1924..00000000 --- a/src/test/resources/rml-io/RMLSTC0004b/Friends-NULL.csv +++ /dev/null @@ -1,7 +0,0 @@ -id;name;age -0;Monica Geller;33 -1;Rachel Green;34 -2;Joey Tribbiani;35 -3;Chandler Bing;36 -4;Ross Geller;37 -5;; diff --git a/src/test/resources/rml-io/RMLSTC0004b/default.nq b/src/test/resources/rml-io/RMLSTC0004b/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0004b/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0004b/mapping.ttl b/src/test/resources/rml-io/RMLSTC0004b/mapping.ttl deleted file mode 100644 index 4b656404..00000000 --- a/src/test/resources/rml-io/RMLSTC0004b/mapping.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix csvw: . -@prefix xsd: . -@base . - -<#CSVWSourceAccess> a rml:Source, csvw:Table; - csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004b/Friends-NULL.csv"^^xsd:anyURI ; - csvw:dialect [ a csvw:Dialect; - csvw:delimiter ";"; - csvw:encoding "UTF-8"; - csvw:header "1"^^xsd:boolean; - ]; - # Empty value is considered NULL - rml:null ""; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#CSVWSourceAccess>; - rml:referenceFormulation rml:CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0004c/Friends-NULL2.csv b/src/test/resources/rml-io/RMLSTC0004c/Friends-NULL2.csv deleted file mode 100644 index 2bbf9a5d..00000000 --- a/src/test/resources/rml-io/RMLSTC0004c/Friends-NULL2.csv +++ /dev/null @@ -1,8 +0,0 @@ -id;name;age -0;Monica Geller;33 -1;Rachel Green;34 -2;Joey Tribbiani;35 -3;Chandler Bing;36 -4;Ross Geller;37 -5;; -6;NULL;NULL diff --git a/src/test/resources/rml-io/RMLSTC0004c/default.nq b/src/test/resources/rml-io/RMLSTC0004c/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0004c/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0004c/mapping.ttl b/src/test/resources/rml-io/RMLSTC0004c/mapping.ttl deleted file mode 100644 index 6c365ee9..00000000 --- a/src/test/resources/rml-io/RMLSTC0004c/mapping.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix csvw: . -@prefix xsd: . -@base . - -<#CSVWSourceAccess> a rml:Source, csvw:Table; - csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004c/Friends-NULL2.csv"^^xsd:anyURI ; - csvw:dialect [ a csvw:Dialect; - csvw:delimiter ";"; - csvw:encoding "UTF-8"; - csvw:header "1"^^xsd:boolean; - ]; - # Empty value and 'NULL' are both considered NULL - rml:null ""; - rml:null "NULL"; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#CSVWSourceAccess>; - rml:referenceFormulation rml:CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0005a/Friends-NULL.csv b/src/test/resources/rml-io/RMLSTC0005a/Friends-NULL.csv deleted file mode 100644 index ab5f1924..00000000 --- a/src/test/resources/rml-io/RMLSTC0005a/Friends-NULL.csv +++ /dev/null @@ -1,7 +0,0 @@ -id;name;age -0;Monica Geller;33 -1;Rachel Green;34 -2;Joey Tribbiani;35 -3;Chandler Bing;36 -4;Ross Geller;37 -5;; diff --git a/src/test/resources/rml-io/RMLSTC0005a/default.nq b/src/test/resources/rml-io/RMLSTC0005a/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0005a/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0005a/mapping.ttl b/src/test/resources/rml-io/RMLSTC0005a/mapping.ttl deleted file mode 100644 index 383efa6b..00000000 --- a/src/test/resources/rml-io/RMLSTC0005a/mapping.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix csvw: . -@prefix xsd: . -@base . - -<#CSVWSourceAccess> a rml:Source, csvw:Table; - csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0005a/Friends-NULL.csv"^^xsd:anyURI ; - csvw:dialect [ a csvw:Dialect; - csvw:delimiter ";"; - csvw:encoding "UTF-8"; - csvw:header "1"^^xsd:boolean; - csvw:null "NULL"; - ]; - # Empty value is considered NULL and overrides CSVW - rml:null ""; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#CSVWSourceAccess>; - rml:referenceFormulation rml:CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0005b/Friends.csv b/src/test/resources/rml-io/RMLSTC0005b/Friends.csv deleted file mode 100644 index 0d40425fac25756f94dba61b1d882e623dc39b33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 212 zcmZXOu?oUK5JX>{ugE8;iCWlcAp~rKKM<2c4>Uro{CV}Q*vS+(?7W@Z_bW57VWi_m z(si7D3ugKQcau!-v}Eu6suGh~r3&V{*0ksHO@o?r$-Q7|nT4*gDe<)BXr4K#>|V47 gx0I`NJ9}a}{QfD~N{rqV)Jm$>wYELf|4nO&50cp;`v3p{ diff --git a/src/test/resources/rml-io/RMLSTC0005b/default.nq b/src/test/resources/rml-io/RMLSTC0005b/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0005b/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0005b/mapping.ttl b/src/test/resources/rml-io/RMLSTC0005b/mapping.ttl deleted file mode 100644 index 9ac12738..00000000 --- a/src/test/resources/rml-io/RMLSTC0005b/mapping.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix csvw: . -@prefix xsd: . -@base . - -<#CSVWSourceAccess> a rml:Source, csvw:Table; - csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0005b/Friends.csv"^^xsd:anyURI ; - csvw:dialect [ a csvw:Dialect; - csvw:delimiter ";"; - csvw:encoding "UTF-8"; - csvw:header "1"^^xsd:boolean; - ]; - # Encoding is UTF-16 and overrides CSVW - rml:encoding rml:UTF-16; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#CSVWSourceAccess>; - rml:referenceFormulation rml:CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0006a/Friends.json b/src/test/resources/rml-io/RMLSTC0006a/Friends.json deleted file mode 100644 index 8e554498..00000000 --- a/src/test/resources/rml-io/RMLSTC0006a/Friends.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "id": 0, - "name": "Monica Geller", - "age": 33 - }, - { - "id": 1, - "name": "Rachel Green", - "age": 34 - }, - { - "id": 2, - "name": "Joey Tribbiani", - "age": 35 - }, - { - "id": 3, - "name": "Chandler Bing", - "age": 36 - }, - { - "id": 4, - "name": "Ross Geller", - "age": 37 - } -] diff --git a/src/test/resources/rml-io/RMLSTC0006a/default.nq b/src/test/resources/rml-io/RMLSTC0006a/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0006a/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0006a/mapping.ttl b/src/test/resources/rml-io/RMLSTC0006a/mapping.ttl deleted file mode 100644 index 32b9aa32..00000000 --- a/src/test/resources/rml-io/RMLSTC0006a/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0006b/Friends.nt b/src/test/resources/rml-io/RMLSTC0006b/Friends.nt deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0006b/Friends.nt +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0006b/default.nq b/src/test/resources/rml-io/RMLSTC0006b/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0006b/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0006b/mapping.ttl b/src/test/resources/rml-io/RMLSTC0006b/mapping.ttl deleted file mode 100644 index 6436db1b..00000000 --- a/src/test/resources/rml-io/RMLSTC0006b/mapping.ttl +++ /dev/null @@ -1,44 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix void: . -@prefix formats: . -@base . - -<#VoIDSourceAccess> a rml:Source, void:Dataset; - void:dataDump ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#VoIDSourceAccess>; - rml:iterator """ - PREFIX foaf: - - SELECT ?id ?name ?age WHERE { - ?person foaf:name ?name . - ?person foaf:age ?age . - BIND(REPLACE(STR(?person),"http://example.org/", "") AS ?id) . - } - """; - rml:referenceFormulation formats:SPARQL_Results_CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0006c/Friends.nt b/src/test/resources/rml-io/RMLSTC0006c/Friends.nt deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0006c/Friends.nt +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0006c/default.nq b/src/test/resources/rml-io/RMLSTC0006c/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0006c/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0006c/mapping.ttl b/src/test/resources/rml-io/RMLSTC0006c/mapping.ttl deleted file mode 100644 index 30bbffa5..00000000 --- a/src/test/resources/rml-io/RMLSTC0006c/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix sd: . -@prefix formats: . -@base . - -<#SDSourceAccess> a rml:Source, sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Query; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#SDSourceAccess>; - rml:iterator """ - PREFIX foaf: - - SELECT ?id ?name ?age WHERE { - ?person foaf:name ?name . - ?person foaf:age ?age . - BIND(REPLACE(STR(?person),"http://example.org/", "") AS ?id) . - } - """; - rml:referenceFormulation formats:SPARQL_Results_CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0006d/Friends.csv b/src/test/resources/rml-io/RMLSTC0006d/Friends.csv deleted file mode 100644 index 04680d7c..00000000 --- a/src/test/resources/rml-io/RMLSTC0006d/Friends.csv +++ /dev/null @@ -1,6 +0,0 @@ -id;name;age -0;Monica Geller;33 -1;Rachel Green;34 -2;Joey Tribbiani;35 -3;Chandler Bing;36 -4;Ross Geller;37 diff --git a/src/test/resources/rml-io/RMLSTC0006d/default.nq b/src/test/resources/rml-io/RMLSTC0006d/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0006d/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0006d/mapping.ttl b/src/test/resources/rml-io/RMLSTC0006d/mapping.ttl deleted file mode 100644 index 78387d20..00000000 --- a/src/test/resources/rml-io/RMLSTC0006d/mapping.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix csvw: . -@prefix xsd: . -@base . - -<#CSVWSourceAccess> a rml:Source, csvw:Table; - csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0006d/Friends.csv"^^xsd:anyURI ; - csvw:dialect [ a csvw:Dialect; - csvw:delimiter ";"; - csvw:encoding "UTF-8"; - csvw:header "1"^^xsd:boolean; - ]; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#CSVWSourceAccess>; - rml:referenceFormulation rml:CSV; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0006e/Friends.json b/src/test/resources/rml-io/RMLSTC0006e/Friends.json deleted file mode 100644 index 8e554498..00000000 --- a/src/test/resources/rml-io/RMLSTC0006e/Friends.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "id": 0, - "name": "Monica Geller", - "age": 33 - }, - { - "id": 1, - "name": "Rachel Green", - "age": 34 - }, - { - "id": 2, - "name": "Joey Tribbiani", - "age": 35 - }, - { - "id": 3, - "name": "Chandler Bing", - "age": 36 - }, - { - "id": 4, - "name": "Ross Geller", - "age": 37 - } -] diff --git a/src/test/resources/rml-io/RMLSTC0006e/default.nq b/src/test/resources/rml-io/RMLSTC0006e/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0006e/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0006e/mapping.ttl b/src/test/resources/rml-io/RMLSTC0006e/mapping.ttl deleted file mode 100644 index 634dd584..00000000 --- a/src/test/resources/rml-io/RMLSTC0006e/mapping.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix td: . -@prefix htv: . -@prefix hctl: . -@base . - -<#WoTSourceAccess> a rml:Source, td:Thing; - td:hasPropertyAffordance [ - td:hasForm [ - # URL and content type - hctl:hasTarget "http://w3id.org/rml/resources/rml-io/RMLSTC0006e/Friends.json"; - hctl:forContentType "application/json"; - ]; - ]; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#WoTSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0006f/Friends.csv b/src/test/resources/rml-io/RMLSTC0006f/Friends.csv deleted file mode 100644 index 928f08c1..00000000 --- a/src/test/resources/rml-io/RMLSTC0006f/Friends.csv +++ /dev/null @@ -1,6 +0,0 @@ -id, name, age -0, Monica Geller, 33 -1, Rachel Green, 34 -2, Joey Tribbiani, 35 -3, Chandler Bing, 36 -4, Ross Geller, 37 diff --git a/src/test/resources/rml-io/RMLSTC0006f/default.nq b/src/test/resources/rml-io/RMLSTC0006f/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0006f/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0006f/mapping.ttl b/src/test/resources/rml-io/RMLSTC0006f/mapping.ttl deleted file mode 100644 index d06c50b4..00000000 --- a/src/test/resources/rml-io/RMLSTC0006f/mapping.ttl +++ /dev/null @@ -1,38 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix d2rq: . -@prefix xsd: . -@base . - -<#D2RQSourceAccess> a rml:Source, d2rq:Database; - d2rq:jdbcDSN "jdbc://host:port/database"; - d2rq:username "username"; - d2rq:password "password" -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#D2RQSourceAccess>; - rml:referenceFormulation rml:SQL2008Table; - rml:iterator "Friends"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0007a/Friends.json b/src/test/resources/rml-io/RMLSTC0007a/Friends.json deleted file mode 100644 index 8e554498..00000000 --- a/src/test/resources/rml-io/RMLSTC0007a/Friends.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "id": 0, - "name": "Monica Geller", - "age": 33 - }, - { - "id": 1, - "name": "Rachel Green", - "age": 34 - }, - { - "id": 2, - "name": "Joey Tribbiani", - "age": 35 - }, - { - "id": 3, - "name": "Chandler Bing", - "age": 36 - }, - { - "id": 4, - "name": "Ross Geller", - "age": 37 - } -] diff --git a/src/test/resources/rml-io/RMLSTC0007a/default.nq b/src/test/resources/rml-io/RMLSTC0007a/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0007a/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0007a/mapping.ttl b/src/test/resources/rml-io/RMLSTC0007a/mapping.ttl deleted file mode 100644 index 496ca6fc..00000000 --- a/src/test/resources/rml-io/RMLSTC0007a/mapping.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; - rml:encoding rml:UTF-8; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0007b/Friends.csv b/src/test/resources/rml-io/RMLSTC0007b/Friends.csv deleted file mode 100644 index 928f08c1..00000000 --- a/src/test/resources/rml-io/RMLSTC0007b/Friends.csv +++ /dev/null @@ -1,6 +0,0 @@ -id, name, age -0, Monica Geller, 33 -1, Rachel Green, 34 -2, Joey Tribbiani, 35 -3, Chandler Bing, 36 -4, Ross Geller, 37 diff --git a/src/test/resources/rml-io/RMLSTC0007b/default.nq b/src/test/resources/rml-io/RMLSTC0007b/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0007b/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0007b/mapping.ttl b/src/test/resources/rml-io/RMLSTC0007b/mapping.ttl deleted file mode 100644 index 1fe26eb4..00000000 --- a/src/test/resources/rml-io/RMLSTC0007b/mapping.ttl +++ /dev/null @@ -1,39 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix csvw: . -@prefix xsd: . -@base . - -<#CSVWSourceAccess> a rml:Source, csvw:Table; - csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0007b/Friends.csv"^^xsd:anyURI ; - csvw:dialect [ a csvw:Dialect; - csvw:delimiter ";"; - csvw:encoding "UTF-8"; - csvw:header "1"^^xsd:boolean; - ]; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#CSVWSourceAccess>; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0007c/Friends.xml b/src/test/resources/rml-io/RMLSTC0007c/Friends.xml deleted file mode 100644 index 73fb3964..00000000 --- a/src/test/resources/rml-io/RMLSTC0007c/Friends.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - Monica Geller - 33 - - - Rachel Green - 34 - - - Joey Tribbiani - 35 - - - Chandler Bing - 36 - - - Ross Geller - 37 - - diff --git a/src/test/resources/rml-io/RMLSTC0007c/default.nq b/src/test/resources/rml-io/RMLSTC0007c/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0007c/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0007c/mapping.ttl b/src/test/resources/rml-io/RMLSTC0007c/mapping.ttl deleted file mode 100644 index 96be1a3f..00000000 --- a/src/test/resources/rml-io/RMLSTC0007c/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:XPath; - rml:iterator "//Friends/Character"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{@id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name/text()"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age/text()"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLSTC0007d/Friends.xml b/src/test/resources/rml-io/RMLSTC0007d/Friends.xml deleted file mode 100644 index 6eb793ab..00000000 --- a/src/test/resources/rml-io/RMLSTC0007d/Friends.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - Monica Geller - 33 - - - Rachel Green - 34 - - - Joey Tribbiani - 35 - - - Chandler Bing - 36 - - - Ross Geller - 37 - - diff --git a/src/test/resources/rml-io/RMLSTC0007d/default.nq b/src/test/resources/rml-io/RMLSTC0007d/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLSTC0007d/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLSTC0007d/mapping.ttl b/src/test/resources/rml-io/RMLSTC0007d/mapping.ttl deleted file mode 100644 index 3fd52498..00000000 --- a/src/test/resources/rml-io/RMLSTC0007d/mapping.ttl +++ /dev/null @@ -1,40 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation [ a rml:XPathReferenceFormulation; - rml:namespace [ a rml:Namespace; - rml:namespacePrefix "ex"; - rml:namespaceURL "http://example.org"; - ]; - ]; - rml:iterator "//Friends/ex:Character"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{@id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "ex:name/text()"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "ex:age/text()"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLTTC0000/default.nq b/src/test/resources/rml-io/RMLTTC0000/default.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0000/default.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0000/mapping.ttl b/src/test/resources/rml-io/RMLTTC0000/mapping.ttl deleted file mode 100644 index 1e7179c0..00000000 --- a/src/test/resources/rml-io/RMLTTC0000/mapping.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. diff --git a/src/test/resources/rml-io/RMLTTC0001a/default.nq b/src/test/resources/rml-io/RMLTTC0001a/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0001a/dump1.nq b/src/test/resources/rml-io/RMLTTC0001a/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0001a/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0001a/mapping.ttl b/src/test/resources/rml-io/RMLTTC0001a/mapping.ttl deleted file mode 100644 index 9d005bd1..00000000 --- a/src/test/resources/rml-io/RMLTTC0001a/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0001b/default.nq b/src/test/resources/rml-io/RMLTTC0001b/default.nq deleted file mode 100644 index ad87bcca..00000000 --- a/src/test/resources/rml-io/RMLTTC0001b/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33". - "34". - "35". - "36". - "37". diff --git a/src/test/resources/rml-io/RMLTTC0001b/dump1.nq b/src/test/resources/rml-io/RMLTTC0001b/dump1.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0001b/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0001b/mapping.ttl b/src/test/resources/rml-io/RMLTTC0001b/mapping.ttl deleted file mode 100644 index ceb6ecbb..00000000 --- a/src/test/resources/rml-io/RMLTTC0001b/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - rml:logicalTarget <#TargetDump1>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0001c/default.nq b/src/test/resources/rml-io/RMLTTC0001c/default.nq deleted file mode 100644 index ad87bcca..00000000 --- a/src/test/resources/rml-io/RMLTTC0001c/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33". - "34". - "35". - "36". - "37". diff --git a/src/test/resources/rml-io/RMLTTC0001c/dump1.nq b/src/test/resources/rml-io/RMLTTC0001c/dump1.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0001c/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0001c/mapping.ttl b/src/test/resources/rml-io/RMLTTC0001c/mapping.ttl deleted file mode 100644 index a3561b4e..00000000 --- a/src/test/resources/rml-io/RMLTTC0001c/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0001d/default.nq b/src/test/resources/rml-io/RMLTTC0001d/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0001d/dump1.nq b/src/test/resources/rml-io/RMLTTC0001d/dump1.nq deleted file mode 100644 index adcefd04..00000000 --- a/src/test/resources/rml-io/RMLTTC0001d/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0001d/mapping.ttl b/src/test/resources/rml-io/RMLTTC0001d/mapping.ttl deleted file mode 100644 index 90069a89..00000000 --- a/src/test/resources/rml-io/RMLTTC0001d/mapping.ttl +++ /dev/null @@ -1,49 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:graphMap [ a rml:GraphMap; - rml:constant ex:PeopleGraph; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0001e/default.nq b/src/test/resources/rml-io/RMLTTC0001e/default.nq deleted file mode 100644 index ad87bcca..00000000 --- a/src/test/resources/rml-io/RMLTTC0001e/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33". - "34". - "35". - "36". - "37". diff --git a/src/test/resources/rml-io/RMLTTC0001e/dump1.nq b/src/test/resources/rml-io/RMLTTC0001e/dump1.nq deleted file mode 100644 index 8f081be1..00000000 --- a/src/test/resources/rml-io/RMLTTC0001e/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller"@en . - "Rachel Green"@en . - "Joey Tribbiani"@en . - "Chandler Bing"@en . - "Ross Geller"@en . diff --git a/src/test/resources/rml-io/RMLTTC0001e/mapping.ttl b/src/test/resources/rml-io/RMLTTC0001e/mapping.ttl deleted file mode 100644 index b9b0e008..00000000 --- a/src/test/resources/rml-io/RMLTTC0001e/mapping.ttl +++ /dev/null @@ -1,48 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - rml:languageMap [ a rml:LanguageMap; - rml:constant "en"; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0001f/default.nq b/src/test/resources/rml-io/RMLTTC0001f/default.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0001f/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0001f/dump1.nq b/src/test/resources/rml-io/RMLTTC0001f/dump1.nq deleted file mode 100644 index f2e60c86..00000000 --- a/src/test/resources/rml-io/RMLTTC0001f/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33"^^. - "34"^^. - "35"^^. - "36"^^. - "37"^^. diff --git a/src/test/resources/rml-io/RMLTTC0001f/mapping.ttl b/src/test/resources/rml-io/RMLTTC0001f/mapping.ttl deleted file mode 100644 index aaa44ddf..00000000 --- a/src/test/resources/rml-io/RMLTTC0001f/mapping.ttl +++ /dev/null @@ -1,49 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix xsd: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:datatypeMap [ a rml:DatatypeMap; - rml:constant xsd:integer; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002a/default.nq b/src/test/resources/rml-io/RMLTTC0002a/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002a/dump1.nq b/src/test/resources/rml-io/RMLTTC0002a/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0002a/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002a/dump2.nq b/src/test/resources/rml-io/RMLTTC0002a/dump2.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0002a/dump2.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002a/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002a/mapping.ttl deleted file mode 100644 index 5c499926..00000000 --- a/src/test/resources/rml-io/RMLTTC0002a/mapping.ttl +++ /dev/null @@ -1,53 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - rml:logicalTarget <#TargetDump2>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002b/default.nq b/src/test/resources/rml-io/RMLTTC0002b/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002b/dump1.nq b/src/test/resources/rml-io/RMLTTC0002b/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0002b/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002b/dump2.nq b/src/test/resources/rml-io/RMLTTC0002b/dump2.nq deleted file mode 100644 index 35a39502..00000000 --- a/src/test/resources/rml-io/RMLTTC0002b/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002b/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002b/mapping.ttl deleted file mode 100644 index 468b3f07..00000000 --- a/src/test/resources/rml-io/RMLTTC0002b/mapping.ttl +++ /dev/null @@ -1,53 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - rml:logicalTarget <#TargetDump2>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002c/default.nq b/src/test/resources/rml-io/RMLTTC0002c/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002c/dump1.nq b/src/test/resources/rml-io/RMLTTC0002c/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0002c/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002c/dump2.nq b/src/test/resources/rml-io/RMLTTC0002c/dump2.nq deleted file mode 100644 index 35a39502..00000000 --- a/src/test/resources/rml-io/RMLTTC0002c/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002c/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002c/mapping.ttl deleted file mode 100644 index 814dcdb9..00000000 --- a/src/test/resources/rml-io/RMLTTC0002c/mapping.ttl +++ /dev/null @@ -1,53 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:logicalTarget <#TargetDump2>; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002d/default.nq b/src/test/resources/rml-io/RMLTTC0002d/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002d/dump1.nq b/src/test/resources/rml-io/RMLTTC0002d/dump1.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0002d/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002d/dump2.nq b/src/test/resources/rml-io/RMLTTC0002d/dump2.nq deleted file mode 100644 index 35a39502..00000000 --- a/src/test/resources/rml-io/RMLTTC0002d/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002d/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002d/mapping.ttl deleted file mode 100644 index ff734be5..00000000 --- a/src/test/resources/rml-io/RMLTTC0002d/mapping.ttl +++ /dev/null @@ -1,53 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - rml:logicalTarget <#TargetDump1>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:logicalTarget <#TargetDump2>; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002e/default.nq b/src/test/resources/rml-io/RMLTTC0002e/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002e/dump1.nq b/src/test/resources/rml-io/RMLTTC0002e/dump1.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0002e/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002e/dump2.nq b/src/test/resources/rml-io/RMLTTC0002e/dump2.nq deleted file mode 100644 index 35a39502..00000000 --- a/src/test/resources/rml-io/RMLTTC0002e/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002e/dump3.nq b/src/test/resources/rml-io/RMLTTC0002e/dump3.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0002e/dump3.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002e/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002e/mapping.ttl deleted file mode 100644 index 5ce65631..00000000 --- a/src/test/resources/rml-io/RMLTTC0002e/mapping.ttl +++ /dev/null @@ -1,61 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump3>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - rml:logicalTarget <#TargetDump1>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:logicalTarget <#TargetDump2>; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump3> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002f/default.nq b/src/test/resources/rml-io/RMLTTC0002f/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002f/dump1.nq b/src/test/resources/rml-io/RMLTTC0002f/dump1.nq deleted file mode 100644 index adcefd04..00000000 --- a/src/test/resources/rml-io/RMLTTC0002f/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002f/dump2.nq b/src/test/resources/rml-io/RMLTTC0002f/dump2.nq deleted file mode 100644 index 488d76f7..00000000 --- a/src/test/resources/rml-io/RMLTTC0002f/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002f/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002f/mapping.ttl deleted file mode 100644 index 8d715f42..00000000 --- a/src/test/resources/rml-io/RMLTTC0002f/mapping.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:graphMap [ a rml:GraphMap; - rml:constant ex:PeopleGraph; - rml:logicalTarget <#TargetDump2>; - ]; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002g/default.nq b/src/test/resources/rml-io/RMLTTC0002g/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002g/dump1.nq b/src/test/resources/rml-io/RMLTTC0002g/dump1.nq deleted file mode 100644 index 95ee6e21..00000000 --- a/src/test/resources/rml-io/RMLTTC0002g/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002g/dump2.nq b/src/test/resources/rml-io/RMLTTC0002g/dump2.nq deleted file mode 100644 index 488d76f7..00000000 --- a/src/test/resources/rml-io/RMLTTC0002g/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002g/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002g/mapping.ttl deleted file mode 100644 index 5d428b09..00000000 --- a/src/test/resources/rml-io/RMLTTC0002g/mapping.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:graphMap [ a rml:GraphMap; - rml:constant ex:PeopleGraph; - rml:logicalTarget <#TargetDump2>; - ]; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - rml:logicalTarget <#TargetDump1>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002h/default.nq b/src/test/resources/rml-io/RMLTTC0002h/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002h/dump1.nq b/src/test/resources/rml-io/RMLTTC0002h/dump1.nq deleted file mode 100644 index 95ee6e21..00000000 --- a/src/test/resources/rml-io/RMLTTC0002h/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002h/dump2.nq b/src/test/resources/rml-io/RMLTTC0002h/dump2.nq deleted file mode 100644 index 488d76f7..00000000 --- a/src/test/resources/rml-io/RMLTTC0002h/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002h/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002h/mapping.ttl deleted file mode 100644 index 55b9294f..00000000 --- a/src/test/resources/rml-io/RMLTTC0002h/mapping.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:graphMap [ a rml:GraphMap; - rml:constant ex:PeopleGraph; - rml:logicalTarget <#TargetDump2>; - ]; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:logicalTarget <#TargetDump1>; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002i/default.nq b/src/test/resources/rml-io/RMLTTC0002i/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002i/dump1.nq b/src/test/resources/rml-io/RMLTTC0002i/dump1.nq deleted file mode 100644 index fb4f3a4b..00000000 --- a/src/test/resources/rml-io/RMLTTC0002i/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002i/dump2.nq b/src/test/resources/rml-io/RMLTTC0002i/dump2.nq deleted file mode 100644 index 8f081be1..00000000 --- a/src/test/resources/rml-io/RMLTTC0002i/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller"@en . - "Rachel Green"@en . - "Joey Tribbiani"@en . - "Chandler Bing"@en . - "Ross Geller"@en . diff --git a/src/test/resources/rml-io/RMLTTC0002i/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002i/mapping.ttl deleted file mode 100644 index 38690c18..00000000 --- a/src/test/resources/rml-io/RMLTTC0002i/mapping.ttl +++ /dev/null @@ -1,60 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - rml:languageMap [ a rml:LanguageMap; - rml:constant "en"; - rml:logicalTarget <#TargetDump2>; - ]; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:graphMap [ a rml:GraphMap; - rml:constant ex:PeopleGraph; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002j/default.nq b/src/test/resources/rml-io/RMLTTC0002j/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002j/dump1.nq b/src/test/resources/rml-io/RMLTTC0002j/dump1.nq deleted file mode 100644 index 35a39502..00000000 --- a/src/test/resources/rml-io/RMLTTC0002j/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002j/dump2.nq b/src/test/resources/rml-io/RMLTTC0002j/dump2.nq deleted file mode 100644 index 8f081be1..00000000 --- a/src/test/resources/rml-io/RMLTTC0002j/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller"@en . - "Rachel Green"@en . - "Joey Tribbiani"@en . - "Chandler Bing"@en . - "Ross Geller"@en . diff --git a/src/test/resources/rml-io/RMLTTC0002j/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002j/mapping.ttl deleted file mode 100644 index 30d03b5c..00000000 --- a/src/test/resources/rml-io/RMLTTC0002j/mapping.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - rml:languageMap [ a rml:LanguageMap; - rml:constant "en"; - rml:logicalTarget <#TargetDump2>; - ]; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:logicalTarget <#TargetDump1>; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002k/default.nq b/src/test/resources/rml-io/RMLTTC0002k/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002k/dump1.nq b/src/test/resources/rml-io/RMLTTC0002k/dump1.nq deleted file mode 100644 index b92731fc..00000000 --- a/src/test/resources/rml-io/RMLTTC0002k/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33"^^ . - "34"^^ . - "35"^^ . - "36"^^ . - "37"^^ . diff --git a/src/test/resources/rml-io/RMLTTC0002k/dump2.nq b/src/test/resources/rml-io/RMLTTC0002k/dump2.nq deleted file mode 100644 index b92731fc..00000000 --- a/src/test/resources/rml-io/RMLTTC0002k/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33"^^ . - "34"^^ . - "35"^^ . - "36"^^ . - "37"^^ . diff --git a/src/test/resources/rml-io/RMLTTC0002k/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002k/mapping.ttl deleted file mode 100644 index e2ef9c2a..00000000 --- a/src/test/resources/rml-io/RMLTTC0002k/mapping.ttl +++ /dev/null @@ -1,61 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix xsd: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:graphMap [ a rml:GraphMap; - rml:constant ex:PeopleGraph; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:languageMap [ a rml:DatatypeMap; - rml:constant xsd:integer; - rml:logicalTarget <#TargetDump2>; - ]; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002l/default.nq b/src/test/resources/rml-io/RMLTTC0002l/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002l/dump1.nq b/src/test/resources/rml-io/RMLTTC0002l/dump1.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0002l/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002l/dump2.nq b/src/test/resources/rml-io/RMLTTC0002l/dump2.nq deleted file mode 100644 index b92731fc..00000000 --- a/src/test/resources/rml-io/RMLTTC0002l/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33"^^ . - "34"^^ . - "35"^^ . - "36"^^ . - "37"^^ . diff --git a/src/test/resources/rml-io/RMLTTC0002l/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002l/mapping.ttl deleted file mode 100644 index 014d1242..00000000 --- a/src/test/resources/rml-io/RMLTTC0002l/mapping.ttl +++ /dev/null @@ -1,58 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix xsd: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:languageMap [ a rml:DatatypeMap; - rml:constant xsd:integer; - rml:logicalTarget <#TargetDump2>; - ]; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002m/default.nq b/src/test/resources/rml-io/RMLTTC0002m/default.nq deleted file mode 100644 index ad87bcca..00000000 --- a/src/test/resources/rml-io/RMLTTC0002m/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33". - "34". - "35". - "36". - "37". diff --git a/src/test/resources/rml-io/RMLTTC0002m/dump1.nq b/src/test/resources/rml-io/RMLTTC0002m/dump1.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0002m/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002m/dump2.nq b/src/test/resources/rml-io/RMLTTC0002m/dump2.nq deleted file mode 100644 index 35a39502..00000000 --- a/src/test/resources/rml-io/RMLTTC0002m/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002m/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002m/mapping.ttl deleted file mode 100644 index 1a5589e1..00000000 --- a/src/test/resources/rml-io/RMLTTC0002m/mapping.ttl +++ /dev/null @@ -1,53 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - rml:logicalTarget <#TargetDump1>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - rml:logicalTarget <#TargetDump2>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002n/default.nq b/src/test/resources/rml-io/RMLTTC0002n/default.nq deleted file mode 100644 index ad87bcca..00000000 --- a/src/test/resources/rml-io/RMLTTC0002n/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33". - "34". - "35". - "36". - "37". diff --git a/src/test/resources/rml-io/RMLTTC0002n/dump1.nq b/src/test/resources/rml-io/RMLTTC0002n/dump1.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0002n/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002n/dump2.nq b/src/test/resources/rml-io/RMLTTC0002n/dump2.nq deleted file mode 100644 index 35a39502..00000000 --- a/src/test/resources/rml-io/RMLTTC0002n/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002n/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002n/mapping.ttl deleted file mode 100644 index 589ca736..00000000 --- a/src/test/resources/rml-io/RMLTTC0002n/mapping.ttl +++ /dev/null @@ -1,53 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:logicalTarget <#TargetDump2>; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002o/default.nq b/src/test/resources/rml-io/RMLTTC0002o/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0002o/dump1.nq b/src/test/resources/rml-io/RMLTTC0002o/dump1.nq deleted file mode 100644 index b5a5e2b8..00000000 --- a/src/test/resources/rml-io/RMLTTC0002o/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002o/dump2.nq b/src/test/resources/rml-io/RMLTTC0002o/dump2.nq deleted file mode 100644 index 61c543c5..00000000 --- a/src/test/resources/rml-io/RMLTTC0002o/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002o/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002o/mapping.ttl deleted file mode 100644 index a5abf1bd..00000000 --- a/src/test/resources/rml-io/RMLTTC0002o/mapping.ttl +++ /dev/null @@ -1,53 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:graphMap [ a rml:GraphMap; - rml:constant ex:PeopleGraph1; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - rml:graphMap [ a rml:GraphMap; - rml:constant ex:PeopleGraph1; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002p/default.nq b/src/test/resources/rml-io/RMLTTC0002p/default.nq deleted file mode 100644 index ad87bcca..00000000 --- a/src/test/resources/rml-io/RMLTTC0002p/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33". - "34". - "35". - "36". - "37". diff --git a/src/test/resources/rml-io/RMLTTC0002p/dump1.nq b/src/test/resources/rml-io/RMLTTC0002p/dump1.nq deleted file mode 100644 index 8f081be1..00000000 --- a/src/test/resources/rml-io/RMLTTC0002p/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller"@en . - "Rachel Green"@en . - "Joey Tribbiani"@en . - "Chandler Bing"@en . - "Ross Geller"@en . diff --git a/src/test/resources/rml-io/RMLTTC0002p/dump2.nq b/src/test/resources/rml-io/RMLTTC0002p/dump2.nq deleted file mode 100644 index e6de67d3..00000000 --- a/src/test/resources/rml-io/RMLTTC0002p/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller"@nl . - "Rachel Green"@nl . - "Joey Tribbiani"@nl . - "Chandler Bing"@nl . - "Ross Geller"@nl . diff --git a/src/test/resources/rml-io/RMLTTC0002p/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002p/mapping.ttl deleted file mode 100644 index 243777ba..00000000 --- a/src/test/resources/rml-io/RMLTTC0002p/mapping.ttl +++ /dev/null @@ -1,67 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - rml:languageMap [ a rml:LanguageMap; - rml:constant "en"; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - rml:languageMap [ a rml:LanguageMap; - rml:constant "nl"; - rml:logicalTarget <#TargetDump2>; - ]; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002q/default.nq b/src/test/resources/rml-io/RMLTTC0002q/default.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0002q/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0002q/dump1.nq b/src/test/resources/rml-io/RMLTTC0002q/dump1.nq deleted file mode 100644 index f2e60c86..00000000 --- a/src/test/resources/rml-io/RMLTTC0002q/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33"^^. - "34"^^. - "35"^^. - "36"^^. - "37"^^. diff --git a/src/test/resources/rml-io/RMLTTC0002q/dump2.nq b/src/test/resources/rml-io/RMLTTC0002q/dump2.nq deleted file mode 100644 index 1cebdfcb..00000000 --- a/src/test/resources/rml-io/RMLTTC0002q/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33"^^. - "34"^^. - "35"^^. - "36"^^. - "37"^^. diff --git a/src/test/resources/rml-io/RMLTTC0002q/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002q/mapping.ttl deleted file mode 100644 index 6ab75cda..00000000 --- a/src/test/resources/rml-io/RMLTTC0002q/mapping.ttl +++ /dev/null @@ -1,68 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix xsd: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:datatypeMap [ a rml:DatatypeMap; - rml:constant xsd:integer; - rml:logicalTarget <#TargetDump1>; - ]; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - rml:datatypeMap [ a rml:DatatypeMap; - rml:constant xsd:double; - rml:logicalTarget <#TargetDump2>; - ]; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0002r/default.nq b/src/test/resources/rml-io/RMLTTC0002r/default.nq deleted file mode 100644 index ad87bcca..00000000 --- a/src/test/resources/rml-io/RMLTTC0002r/default.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33". - "34". - "35". - "36". - "37". diff --git a/src/test/resources/rml-io/RMLTTC0002r/dump1.nq b/src/test/resources/rml-io/RMLTTC0002r/dump1.nq deleted file mode 100644 index 36247500..00000000 --- a/src/test/resources/rml-io/RMLTTC0002r/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0002r/mapping.ttl b/src/test/resources/rml-io/RMLTTC0002r/mapping.ttl deleted file mode 100644 index 43abc170..00000000 --- a/src/test/resources/rml-io/RMLTTC0002r/mapping.ttl +++ /dev/null @@ -1,46 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - rml:logicalTarget <#TargetDump1>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - rml:logicalTarget <#TargetDump1>; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0003a/default.nq b/src/test/resources/rml-io/RMLTTC0003a/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0003a/dump1.nq b/src/test/resources/rml-io/RMLTTC0003a/dump1.nq deleted file mode 100644 index 3fc5c8f3..00000000 --- a/src/test/resources/rml-io/RMLTTC0003a/dump1.nq +++ /dev/null @@ -1,5 +0,0 @@ - "Monica Geller" . - "Rachel Green" . - "Joey Tribbiani" . - "Chandler Bing" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0003a/dump2.nq b/src/test/resources/rml-io/RMLTTC0003a/dump2.nq deleted file mode 100644 index 35a39502..00000000 --- a/src/test/resources/rml-io/RMLTTC0003a/dump2.nq +++ /dev/null @@ -1,5 +0,0 @@ - "33" . - "34" . - "35" . - "36" . - "37" . diff --git a/src/test/resources/rml-io/RMLTTC0003a/mapping.ttl b/src/test/resources/rml-io/RMLTTC0003a/mapping.ttl deleted file mode 100644 index 416901d8..00000000 --- a/src/test/resources/rml-io/RMLTTC0003a/mapping.ttl +++ /dev/null @@ -1,64 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. - -<#TargetDump2> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0004a/default.nq b/src/test/resources/rml-io/RMLTTC0004a/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0004a/dump1.jsonld b/src/test/resources/rml-io/RMLTTC0004a/dump1.jsonld deleted file mode 100644 index 5bddb0d5..00000000 --- a/src/test/resources/rml-io/RMLTTC0004a/dump1.jsonld +++ /dev/null @@ -1,33 +0,0 @@ -{ - "@context": { - "foaf": "http://xmlns.com/foaf/0.1/" - }, - "@graph": [ - { - - "@id": "http://example.org/0", - "foaf:name": "Monica Geller", - "foaf:age": "33" - }, - { - "@id": "http://example.org/1", - "foaf:name": "Rachel Green", - "foaf:age": "34" - }, - { - "@id": "http://example.org/2", - "foaf:name": "Joey Tribbiani", - "foaf:age": "35" - }, - { - "@id": "http://example.org/3", - "foaf:name": "Chandler Bing", - "foaf:age": "36" - }, - { - "@id": "http://example.org/4", - "foaf:name": "Ross Geller", - "foaf:age": "37" - } - ] -} diff --git a/src/test/resources/rml-io/RMLTTC0004a/mapping.ttl b/src/test/resources/rml-io/RMLTTC0004a/mapping.ttl deleted file mode 100644 index ad851088..00000000 --- a/src/test/resources/rml-io/RMLTTC0004a/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:JSON-LD; -. diff --git a/src/test/resources/rml-io/RMLTTC0004b/default.nq b/src/test/resources/rml-io/RMLTTC0004b/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0004b/dump1.n3 b/src/test/resources/rml-io/RMLTTC0004b/dump1.n3 deleted file mode 100644 index 04c89772..00000000 --- a/src/test/resources/rml-io/RMLTTC0004b/dump1.n3 +++ /dev/null @@ -1,12 +0,0 @@ -@prefix foaf: . -@prefix ex: . -ex:0 "33" ; - "Monica Geller" . -ex:1 "34" ; - "Rachel Green" . -ex:2 "35" ; - "Joey Tribbiani" . -ex:3 "36" ; - "Chandler Bing" . -ex:4 "37" ; - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0004b/mapping.ttl b/src/test/resources/rml-io/RMLTTC0004b/mapping.ttl deleted file mode 100644 index 1f1266cf..00000000 --- a/src/test/resources/rml-io/RMLTTC0004b/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N3; -. diff --git a/src/test/resources/rml-io/RMLTTC0004c/default.nq b/src/test/resources/rml-io/RMLTTC0004c/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0004c/dump1.nt b/src/test/resources/rml-io/RMLTTC0004c/dump1.nt deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0004c/dump1.nt +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0004c/mapping.ttl b/src/test/resources/rml-io/RMLTTC0004c/mapping.ttl deleted file mode 100644 index 51707db0..00000000 --- a/src/test/resources/rml-io/RMLTTC0004c/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Triples; -. diff --git a/src/test/resources/rml-io/RMLTTC0004d/default.nq b/src/test/resources/rml-io/RMLTTC0004d/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0004d/dump1.nq b/src/test/resources/rml-io/RMLTTC0004d/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0004d/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0004d/mapping.ttl b/src/test/resources/rml-io/RMLTTC0004d/mapping.ttl deleted file mode 100644 index 9d005bd1..00000000 --- a/src/test/resources/rml-io/RMLTTC0004d/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0004e/default.nq b/src/test/resources/rml-io/RMLTTC0004e/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0004e/dump1.rdfjson b/src/test/resources/rml-io/RMLTTC0004e/dump1.rdfjson deleted file mode 100644 index aff9b74f..00000000 --- a/src/test/resources/rml-io/RMLTTC0004e/dump1.rdfjson +++ /dev/null @@ -1,22 +0,0 @@ -{ - "http://example.org/0" : { - "http://xmlns.com/foaf/0.1/age" : [ { "value" : "33" } ], - "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Monica Geller" } ] - }, - "http://example.org/1" : { - "http://xmlns.com/foaf/0.1/age" : [ { "value" : "34" } ], - "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Rachel Green" } ] - }, - "http://example.org/2" : { - "http://xmlns.com/foaf/0.1/age" : [ { "value" : "35" } ], - "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Joey Tribbiani" } ] - }, - "http://example.org/3" : { - "http://xmlns.com/foaf/0.1/age" : [ { "value" : "36" } ], - "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Chandler Bing" } ] - }, - "http://example.org/4" : { - "http://xmlns.com/foaf/0.1/age" : [ { "value" : "37" } ], - "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Ross Geller" } ] - } -} diff --git a/src/test/resources/rml-io/RMLTTC0004e/mapping.ttl b/src/test/resources/rml-io/RMLTTC0004e/mapping.ttl deleted file mode 100644 index 9ff050a3..00000000 --- a/src/test/resources/rml-io/RMLTTC0004e/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:RDF_JSON; -. diff --git a/src/test/resources/rml-io/RMLTTC0004f/default.nq b/src/test/resources/rml-io/RMLTTC0004f/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0004f/dump1.rdfxml b/src/test/resources/rml-io/RMLTTC0004f/dump1.rdfxml deleted file mode 100644 index 9e028bbc..00000000 --- a/src/test/resources/rml-io/RMLTTC0004f/dump1.rdfxml +++ /dev/null @@ -1,23 +0,0 @@ - - - 33 - Monica Geller - - - 34 - Rachel Green - - - 35 - Joey Tribbiani - - - 36 - Chandler Bing - - - 37 - Ross Geller - - diff --git a/src/test/resources/rml-io/RMLTTC0004f/mapping.ttl b/src/test/resources/rml-io/RMLTTC0004f/mapping.ttl deleted file mode 100644 index db59ec0e..00000000 --- a/src/test/resources/rml-io/RMLTTC0004f/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:RDF_XML; -. diff --git a/src/test/resources/rml-io/RMLTTC0004g/default.nq b/src/test/resources/rml-io/RMLTTC0004g/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0004g/dump1.ttl b/src/test/resources/rml-io/RMLTTC0004g/dump1.ttl deleted file mode 100644 index 5f442e88..00000000 --- a/src/test/resources/rml-io/RMLTTC0004g/dump1.ttl +++ /dev/null @@ -1,13 +0,0 @@ -@prefix foaf: . -@prefix ex: . - - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0004g/mapping.ttl b/src/test/resources/rml-io/RMLTTC0004g/mapping.ttl deleted file mode 100644 index 2be79fe7..00000000 --- a/src/test/resources/rml-io/RMLTTC0004g/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:Turtle; -. diff --git a/src/test/resources/rml-io/RMLTTC0005a/default.nq b/src/test/resources/rml-io/RMLTTC0005a/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0005a/dump1.nq b/src/test/resources/rml-io/RMLTTC0005a/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0005a/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0005a/mapping.ttl b/src/test/resources/rml-io/RMLTTC0005a/mapping.ttl deleted file mode 100644 index 59d4453c..00000000 --- a/src/test/resources/rml-io/RMLTTC0005a/mapping.ttl +++ /dev/null @@ -1,46 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; - rml:encoding rml:UTF-8; -. diff --git a/src/test/resources/rml-io/RMLTTC0005b/default.nq b/src/test/resources/rml-io/RMLTTC0005b/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0005b/dump1.nq b/src/test/resources/rml-io/RMLTTC0005b/dump1.nq deleted file mode 100644 index 0cb7fa2236e4ed9efd04a8c9581c55f7752470c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1358 zcmchX%L>9U5Jm6WuaJH~wLU?_g)RiajrapqqZZmKtqc8m^`z(`>ZVZ3Kptf>cjk1G z$9=4$F4$QkwJ@WrLM7~D*1k^4bl`hi6E*eeeZ@0YsvOTPz6qXt=8(~z@f9$KL@>p9 zPhHF-lCQ>Bw0~%)MKy2rCAp=F$TcK~Ia$R;omuIeg35UGYSngmtl+Sv11ty2BV%PC zRQ3;bDx=Y_RokVppgW9ikXS<^(guqlWILuTk#1!~2DNItL}v7ct$+8rB~49Xk#e8Q V^5|8@V_2)U%VR}{C^= diff --git a/src/test/resources/rml-io/RMLTTC0005b/mapping.ttl b/src/test/resources/rml-io/RMLTTC0005b/mapping.ttl deleted file mode 100644 index 6c45d82b..00000000 --- a/src/test/resources/rml-io/RMLTTC0005b/mapping.ttl +++ /dev/null @@ -1,46 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; - rml:encoding rml:UTF-16; -. diff --git a/src/test/resources/rml-io/RMLTTC0006a/default.nq b/src/test/resources/rml-io/RMLTTC0006a/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0006a/dump1.nq b/src/test/resources/rml-io/RMLTTC0006a/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0006a/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0006a/mapping.ttl b/src/test/resources/rml-io/RMLTTC0006a/mapping.ttl deleted file mode 100644 index 9d005bd1..00000000 --- a/src/test/resources/rml-io/RMLTTC0006a/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0006b/default.nq b/src/test/resources/rml-io/RMLTTC0006b/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0006b/dump1.nq.gz b/src/test/resources/rml-io/RMLTTC0006b/dump1.nq.gz deleted file mode 100644 index f486fec185b11dcebe0413df5e67c8dbb11025e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 193 zcmV;y06za8iwFq4MnYr&17vk=a4{}!aR8l?K?=e!5JmT%BJ==BYpQ~jE_6{4+=v&L z)@d6^CME5n-d=?WZUQmef%kaury7@KItqa+m`NkIZV-9RDt}&$rkQuvh~7dka$X1+ zux6Q*8RMJkZ<@e-@T(=&0c%iebRkm_(^00;zT*bnh?+GHkwT(vOvWya_8Aw8Pj+{z vZ55CTsboyZK8^Mv=Mm`fo`jtg4Ixt*({V_nzq{CZ{`rm . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; - rml:compression rml:gzip; -. diff --git a/src/test/resources/rml-io/RMLTTC0006c/default.nq b/src/test/resources/rml-io/RMLTTC0006c/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0006c/mapping.ttl b/src/test/resources/rml-io/RMLTTC0006c/mapping.ttl deleted file mode 100644 index 01763ba1..00000000 --- a/src/test/resources/rml-io/RMLTTC0006c/mapping.ttl +++ /dev/null @@ -1,46 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; - rml:compression rml:zip; -. diff --git a/src/test/resources/rml-io/RMLTTC0006d/default.nq b/src/test/resources/rml-io/RMLTTC0006d/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0006d/dump1.nq.tar.xz b/src/test/resources/rml-io/RMLTTC0006d/dump1.nq.tar.xz deleted file mode 100644 index b671d160225e578a491b96ee06b1928f9f4b3ff7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 277 zcmb2|=3oE==C_wGW;Gi~uqLekF0zn6LFjLG;*_{G;;o1Bj>Rcl4PiDc%vxCcTT|o9 zv9p}1(sSOcO{l2jQ%Re?Y0|>q9C98dLW}CA&fdBszS?M!$^@5*3SF8nzb#$zZbqm3 zG^yBGVOM)tZ=Tiqezg4l-2cJ17v-)_Kle3s>eQ^$|gZ|$RsqlcEyUp`ms_m9=(YN2lytiAg6ii+iOc3p3N+j}8V8K?QSUdzi0Fj;=A zDza)t;g?^>?qwHSNj^PuWkrSG#FWS?jZOMfPVdrA)Iat#cyfkc|JhAnD)jedzKc7a W|6dj2Yb3J%vbsr{SU-aX0|NjGO@ZV9 diff --git a/src/test/resources/rml-io/RMLTTC0006d/mapping.ttl b/src/test/resources/rml-io/RMLTTC0006d/mapping.ttl deleted file mode 100644 index 3113053d..00000000 --- a/src/test/resources/rml-io/RMLTTC0006d/mapping.ttl +++ /dev/null @@ -1,47 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@prefix ex: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; - rml:compression rml:tarxz; -. diff --git a/src/test/resources/rml-io/RMLTTC0006e/default.nq b/src/test/resources/rml-io/RMLTTC0006e/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0006e/mapping.ttl b/src/test/resources/rml-io/RMLTTC0006e/mapping.ttl deleted file mode 100644 index 7de99a66..00000000 --- a/src/test/resources/rml-io/RMLTTC0006e/mapping.ttl +++ /dev/null @@ -1,46 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; - rml:compression rml:targz; -. diff --git a/src/test/resources/rml-io/RMLTTC0007a/default.nq b/src/test/resources/rml-io/RMLTTC0007a/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0007a/dump1.nq b/src/test/resources/rml-io/RMLTTC0007a/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0007a/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0007a/mapping.ttl b/src/test/resources/rml-io/RMLTTC0007a/mapping.ttl deleted file mode 100644 index e986d7d0..00000000 --- a/src/test/resources/rml-io/RMLTTC0007a/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, dcat:Distribution; - dcat:accessUrl ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0007b/default.nq b/src/test/resources/rml-io/RMLTTC0007b/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0007b/dump1.nq b/src/test/resources/rml-io/RMLTTC0007b/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0007b/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0007b/mapping.ttl b/src/test/resources/rml-io/RMLTTC0007b/mapping.ttl deleted file mode 100644 index 9d005bd1..00000000 --- a/src/test/resources/rml-io/RMLTTC0007b/mapping.ttl +++ /dev/null @@ -1,45 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix void: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, void:Dataset; - void:dataDump ; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0007c/default.nq b/src/test/resources/rml-io/RMLTTC0007c/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0007c/dump1.nq b/src/test/resources/rml-io/RMLTTC0007c/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0007c/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0007c/mapping.ttl b/src/test/resources/rml-io/RMLTTC0007c/mapping.ttl deleted file mode 100644 index a507dc1e..00000000 --- a/src/test/resources/rml-io/RMLTTC0007c/mapping.ttl +++ /dev/null @@ -1,46 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix sd: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, sd:Service; - sd:endpoint ; - sd:supportedLanguage sd:SPARQL11Update; - ]; - rml:serialization formats:N-Quads; -. diff --git a/src/test/resources/rml-io/RMLTTC0007d/default.nq b/src/test/resources/rml-io/RMLTTC0007d/default.nq deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/rml-io/RMLTTC0007d/dump1.nq b/src/test/resources/rml-io/RMLTTC0007d/dump1.nq deleted file mode 100644 index d9456768..00000000 --- a/src/test/resources/rml-io/RMLTTC0007d/dump1.nq +++ /dev/null @@ -1,10 +0,0 @@ - "33" . - "Monica Geller" . - "34" . - "Rachel Green" . - "35" . - "Joey Tribbiani" . - "36" . - "Chandler Bing" . - "37" . - "Ross Geller" . diff --git a/src/test/resources/rml-io/RMLTTC0007d/mapping.ttl b/src/test/resources/rml-io/RMLTTC0007d/mapping.ttl deleted file mode 100644 index 8059aec6..00000000 --- a/src/test/resources/rml-io/RMLTTC0007d/mapping.ttl +++ /dev/null @@ -1,52 +0,0 @@ -@prefix rml: . -@prefix foaf: . -@prefix dcat: . -@prefix td: . -@prefix htv: . -@prefix hctl: . -@prefix formats: . -@base . - -<#DCATSourceAccess> a rml:Source, dcat:Distribution; - dcat:downloadURL ; -. - -<#TriplesMap> a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:source <#DCATSourceAccess>; - rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; - ]; - rml:subjectMap [ a rml:SubjectMap; - rml:template "http://example.org/{id}"; - rml:logicalTarget <#TargetDump1>; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:name; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "name"; - ]; - ]; - rml:predicateObjectMap [ a rml:PredicateObjectMap; - rml:predicateMap [ a rml:PredicateMap; - rml:constant foaf:age; - ]; - rml:objectMap [ a rml:ObjectMap; - rml:reference "age"; - ]; - ]; -. - -<#TargetDump1> a rml:LogicalTarget; - rml:target [ a rml:Target, td:Thing; - td:hasPropertyAffordance [ - td:hasForm [ - hctl:hasTarget "http://localhost/data"; - hctl:forContentType "application/n-quads"; - ]; - ]; - ]; - rml:serialization formats:N-Quads; -. From fa32636cb6d1f26b9b3adef0f2c91fead46ce9d7 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Tue, 18 Mar 2025 18:33:11 +0100 Subject: [PATCH 02/28] Loaded latest versions of test cases --- .../rml-cc/RMLTC-CC-0001-Alt/README.md | 64 + .../rml-cc/RMLTC-CC-0001-Alt/data.json | 26 + .../rml-cc/RMLTC-CC-0001-Alt/default.nq | 17 + .../rml-cc/RMLTC-CC-0001-Alt/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0001-Bag/README.md | 61 + .../rml-cc/RMLTC-CC-0001-Bag/data.json | 26 + .../rml-cc/RMLTC-CC-0001-Bag/default.nq | 15 + .../rml-cc/RMLTC-CC-0001-Bag/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0001-List/README.md | 70 + .../rml-cc/RMLTC-CC-0001-List/data.json | 26 + .../rml-cc/RMLTC-CC-0001-List/default.nq | 23 + .../rml-cc/RMLTC-CC-0001-List/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0001-Seq/README.md | 61 + .../rml-cc/RMLTC-CC-0001-Seq/data.json | 26 + .../rml-cc/RMLTC-CC-0001-Seq/default.nq | 15 + .../rml-cc/RMLTC-CC-0001-Seq/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0002-Bag/README.md | 62 + .../rml-cc/RMLTC-CC-0002-Bag/data.json | 26 + .../rml-cc/RMLTC-CC-0002-Bag/default.nq | 15 + .../rml-cc/RMLTC-CC-0002-Bag/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0002-List/README.md | 68 + .../rml-cc/RMLTC-CC-0002-List/data.json | 26 + .../rml-cc/RMLTC-CC-0002-List/default.nq | 21 + .../rml-cc/RMLTC-CC-0002-List/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0003-EB/README.md | 54 + .../rml-cc/RMLTC-CC-0003-EB/data.json | 14 + .../rml-cc/RMLTC-CC-0003-EB/default.nq | 7 + .../rml-cc/RMLTC-CC-0003-EB/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0003-EL-BN/README.md | 56 + .../rml-cc/RMLTC-CC-0003-EL-BN/data.json | 14 + .../rml-cc/RMLTC-CC-0003-EL-BN/default.nq | 8 + .../rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl | 29 + .../rml-cc/RMLTC-CC-0003-EL-Named/README.md | 56 + .../rml-cc/RMLTC-CC-0003-EL-Named/data.json | 14 + .../rml-cc/RMLTC-CC-0003-EL-Named/default.nq | 8 + .../rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl | 29 + .../rml-cc/RMLTC-CC-0003-EL/README.md | 55 + .../rml-cc/RMLTC-CC-0003-EL/data.json | 14 + .../rml-cc/RMLTC-CC-0003-EL/default.nq | 8 + .../rml-cc/RMLTC-CC-0003-EL/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0003-NEB/README.md | 51 + .../rml-cc/RMLTC-CC-0003-NEB/data.json | 14 + .../rml-cc/RMLTC-CC-0003-NEB/default.nq | 5 + .../rml-cc/RMLTC-CC-0003-NEB/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0003-NEL/README.md | 53 + .../rml-cc/RMLTC-CC-0003-NEL/data.json | 14 + .../rml-cc/RMLTC-CC-0003-NEL/default.nq | 7 + .../rml-cc/RMLTC-CC-0003-NEL/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0003-NELb/README.md | 54 + .../rml-cc/RMLTC-CC-0003-NELb/data.json | 14 + .../rml-cc/RMLTC-CC-0003-NELb/default.nq | 7 + .../rml-cc/RMLTC-CC-0003-NELb/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0004-SM1/README.md | 59 + .../rml-cc/RMLTC-CC-0004-SM1/data.json | 18 + .../rml-cc/RMLTC-CC-0004-SM1/default.nq | 14 + .../rml-cc/RMLTC-CC-0004-SM1/mapping.ttl | 25 + .../rml-cc/RMLTC-CC-0004-SM2/README.md | 52 + .../rml-cc/RMLTC-CC-0004-SM2/data.json | 18 + .../rml-cc/RMLTC-CC-0004-SM2/default.nq | 12 + .../rml-cc/RMLTC-CC-0004-SM2/mapping.ttl | 20 + .../rml-cc/RMLTC-CC-0004-SM3/README.md | 45 + .../rml-cc/RMLTC-CC-0004-SM3/data.json | 14 + .../rml-cc/RMLTC-CC-0004-SM3/default.nq | 6 + .../rml-cc/RMLTC-CC-0004-SM3/mapping.ttl | 20 + .../rml-cc/RMLTC-CC-0004-SM4/README.md | 54 + .../rml-cc/RMLTC-CC-0004-SM4/data.json | 18 + .../rml-cc/RMLTC-CC-0004-SM4/default.nq | 10 + .../rml-cc/RMLTC-CC-0004-SM4/mapping.ttl | 25 + .../rml-cc/RMLTC-CC-0004-SM5/README.md | 43 + .../rml-cc/RMLTC-CC-0004-SM5/data.json | 14 + .../rml-cc/RMLTC-CC-0004-SM5/default.nq | 4 + .../rml-cc/RMLTC-CC-0004-SM5/mapping.ttl | 20 + .../rml-cc/RMLTC-CC-0005-App1/README.md | 63 + .../rml-cc/RMLTC-CC-0005-App1/data.json | 23 + .../rml-cc/RMLTC-CC-0005-App1/default.nq | 16 + .../rml-cc/RMLTC-CC-0005-App1/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0005-App2/README.md | 64 + .../rml-cc/RMLTC-CC-0005-App2/data.json | 23 + .../rml-cc/RMLTC-CC-0005-App2/default.nq | 18 + .../rml-cc/RMLTC-CC-0005-App2/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0005-Car1/README.md | 82 + .../rml-cc/RMLTC-CC-0005-Car1/data.json | 23 + .../rml-cc/RMLTC-CC-0005-Car1/default.nq | 35 + .../rml-cc/RMLTC-CC-0005-Car1/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0005-Car2/README.md | 70 + .../rml-cc/RMLTC-CC-0005-Car2/data.json | 21 + .../rml-cc/RMLTC-CC-0005-Car2/default.nq | 23 + .../rml-cc/RMLTC-CC-0005-Car2/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0006-IT0/README.md | 63 + .../rml-cc/RMLTC-CC-0006-IT0/data.json | 23 + .../rml-cc/RMLTC-CC-0006-IT0/default.nq | 17 + .../rml-cc/RMLTC-CC-0006-IT0/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0006-IT1/README.md | 63 + .../rml-cc/RMLTC-CC-0006-IT1/data.json | 23 + .../rml-cc/RMLTC-CC-0006-IT1/default.nq | 15 + .../rml-cc/RMLTC-CC-0006-IT1/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0006-IT2/README.md | 73 + .../rml-cc/RMLTC-CC-0006-IT2/data.json | 34 + .../rml-cc/RMLTC-CC-0006-IT2/default.nq | 25 + .../rml-cc/RMLTC-CC-0006-IT2/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0006-IT3/README.md | 60 + .../rml-cc/RMLTC-CC-0006-IT3/data.json | 23 + .../rml-cc/RMLTC-CC-0006-IT3/default.nq | 14 + .../rml-cc/RMLTC-CC-0006-IT3/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0006-IT4/README.md | 58 + .../rml-cc/RMLTC-CC-0006-IT4/data.json | 23 + .../rml-cc/RMLTC-CC-0006-IT4/default.nq | 11 + .../rml-cc/RMLTC-CC-0006-IT4/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0006-IT5/README.md | 63 + .../rml-cc/RMLTC-CC-0006-IT5/data.json | 34 + .../rml-cc/RMLTC-CC-0006-IT5/default.nq | 16 + .../rml-cc/RMLTC-CC-0006-IT5/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0007-NES/README.md | 85 + .../rml-cc/RMLTC-CC-0007-NES/data.json | 23 + .../rml-cc/RMLTC-CC-0007-NES/default.nq | 29 + .../rml-cc/RMLTC-CC-0007-NES/mapping.ttl | 36 + .../rml-cc/RMLTC-CC-0008-ROMa/README.md | 60 + .../rml-cc/RMLTC-CC-0008-ROMa/default.nq | 13 + .../rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0008-ROMa/student.csv | 4 + .../rml-cc/RMLTC-CC-0008-ROMb/README.md | 56 + .../rml-cc/RMLTC-CC-0008-ROMb/default.nq | 9 + .../rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0008-ROMb/student.csv | 4 + .../rml-cc/RMLTC-CC-0009-DUP-Bag/README.md | 61 + .../rml-cc/RMLTC-CC-0009-DUP-Bag/data.json | 26 + .../rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq | 15 + .../rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0009-DUP-List/README.md | 70 + .../rml-cc/RMLTC-CC-0009-DUP-List/data.json | 26 + .../rml-cc/RMLTC-CC-0009-DUP-List/default.nq | 23 + .../rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl | 27 + .../rml-cc/RMLTC-CC-0010-Lista/README.md | 57 + .../rml-cc/RMLTC-CC-0010-Lista/data.json | 23 + .../rml-cc/RMLTC-CC-0010-Lista/default.nq | 10 + .../rml-cc/RMLTC-CC-0010-Lista/mapping.ttl | 28 + .../rml-cc/RMLTC-CC-0010-Listb/README.md | 57 + .../rml-cc/RMLTC-CC-0010-Listb/data.json | 23 + .../rml-cc/RMLTC-CC-0010-Listb/default.nq | 9 + .../rml-cc/RMLTC-CC-0010-Listb/mapping.ttl | 29 + src/test/resources/rml-cc/config.js | 72 + src/test/resources/rml-cc/descriptions.csv | 36 + src/test/resources/rml-cc/dev.html | 219 + .../resources/rml-cc/docs/20250130/index.html | 2158 ++ .../resources/rml-cc/docs/20250206/index.html | 2158 ++ .../resources/rml-cc/docs/20250225/index.html | 2472 ++ src/test/resources/rml-cc/docs/index.html | 2472 ++ src/test/resources/rml-cc/list.sh | 5 + src/test/resources/rml-cc/make-metadata.py | 209 + src/test/resources/rml-cc/manifest.rml.ttl | 267 + src/test/resources/rml-cc/manifest.ttl | 420 + src/test/resources/rml-cc/metadata.csv | 36 + src/test/resources/rml-cc/section/abstract.md | 1 + .../resources/rml-cc/section/data-model.md | 12 + .../resources/rml-cc/section/introduction.md | 4 + .../resources/rml-cc/section/test-cases.md | 10 + src/test/resources/rml-core/README.md | 9 + .../rml-core/RMLTC0000-JSON/README.md | 48 + .../rml-core/RMLTC0000-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0000-JSON/output.nq | 1 + .../rml-core/RMLTC0000-JSON/student.json | 3 + .../rml-core/RMLTC0001a-JSON/README.md | 51 + .../rml-core/RMLTC0001a-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0001a-JSON/output.nq | 2 + .../rml-core/RMLTC0001a-JSON/student.json | 5 + .../rml-core/RMLTC0001b-JSON/README.md | 52 + .../rml-core/RMLTC0001b-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0001b-JSON/output.nq | 2 + .../rml-core/RMLTC0001b-JSON/student.json | 5 + .../rml-core/RMLTC0002a-JSON/README.md | 61 + .../rml-core/RMLTC0002a-JSON/mapping.ttl | 28 + .../rml-core/RMLTC0002a-JSON/output.nq | 4 + .../rml-core/RMLTC0002a-JSON/student.json | 6 + .../rml-core/RMLTC0002b-JSON/README.md | 53 + .../rml-core/RMLTC0002b-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0002b-JSON/output.nq | 2 + .../rml-core/RMLTC0002b-JSON/student.json | 6 + .../rml-core/RMLTC0002e-JSON/README.md | 45 + .../rml-core/RMLTC0002e-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0002e-JSON/student.json | 6 + .../rml-core/RMLTC0002g-JSON/README.md | 45 + .../rml-core/RMLTC0002g-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0002g-JSON/student.json | 6 + .../rml-core/RMLTC0003c-JSON/README.md | 53 + .../rml-core/RMLTC0003c-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0003c-JSON/output.nq | 1 + .../rml-core/RMLTC0003c-JSON/student.json | 7 + .../rml-core/RMLTC0004a-JSON/README.md | 77 + .../rml-core/RMLTC0004a-JSON/mapping.ttl | 43 + .../rml-core/RMLTC0004a-JSON/output.nq | 5 + .../RMLTC0004a-JSON/student_sport.json | 6 + .../rml-core/RMLTC0004b-JSON/README.md | 45 + .../rml-core/RMLTC0004b-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0004b-JSON/student.json | 5 + .../rml-core/RMLTC0005a-JSON/README.md | 70 + .../rml-core/RMLTC0005a-JSON/ious.json | 19 + .../rml-core/RMLTC0005a-JSON/mapping.ttl | 23 + .../rml-core/RMLTC0005a-JSON/output.nq | 5 + .../rml-core/RMLTC0006a-JSON/README.md | 56 + .../rml-core/RMLTC0006a-JSON/mapping.ttl | 26 + .../rml-core/RMLTC0006a-JSON/output.nq | 1 + .../rml-core/RMLTC0006a-JSON/student.json | 7 + .../rml-core/RMLTC0007a-JSON/README.md | 52 + .../rml-core/RMLTC0007a-JSON/mapping.ttl | 20 + .../rml-core/RMLTC0007a-JSON/output.nq | 2 + .../rml-core/RMLTC0007a-JSON/student.json | 7 + .../rml-core/RMLTC0007b-JSON/README.md | 60 + .../rml-core/RMLTC0007b-JSON/mapping.ttl | 27 + .../rml-core/RMLTC0007b-JSON/output.nq | 3 + .../rml-core/RMLTC0007b-JSON/student.json | 7 + .../rml-core/RMLTC0007c-JSON/README.md | 63 + .../rml-core/RMLTC0007c-JSON/mapping.ttl | 28 + .../rml-core/RMLTC0007c-JSON/output.nq | 5 + .../rml-core/RMLTC0007c-JSON/student.json | 7 + .../rml-core/RMLTC0007d-JSON/README.md | 69 + .../rml-core/RMLTC0007d-JSON/mapping.ttl | 34 + .../rml-core/RMLTC0007d-JSON/output.nq | 5 + .../rml-core/RMLTC0007d-JSON/student.json | 7 + .../rml-core/RMLTC0007e-JSON/README.md | 62 + .../rml-core/RMLTC0007e-JSON/mapping.ttl | 29 + .../rml-core/RMLTC0007e-JSON/output.nq | 4 + .../rml-core/RMLTC0007e-JSON/student.json | 6 + .../rml-core/RMLTC0007f-JSON/README.md | 66 + .../rml-core/RMLTC0007f-JSON/mapping.ttl | 32 + .../rml-core/RMLTC0007f-JSON/output.nq | 4 + .../rml-core/RMLTC0007f-JSON/student.json | 7 + .../rml-core/RMLTC0007g-JSON/README.md | 54 + .../rml-core/RMLTC0007g-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0007g-JSON/output.nq | 2 + .../rml-core/RMLTC0007g-JSON/student.json | 7 + .../rml-core/RMLTC0007h-JSON/README.md | 50 + .../rml-core/RMLTC0007h-JSON/mapping.ttl | 25 + .../rml-core/RMLTC0007h-JSON/student.json | 7 + .../rml-core/RMLTC0008a-JSON/README.md | 74 + .../rml-core/RMLTC0008a-JSON/mapping.ttl | 39 + .../rml-core/RMLTC0008a-JSON/output.nq | 5 + .../rml-core/RMLTC0008a-JSON/student.json | 7 + .../rml-core/RMLTC0008b-JSON/README.md | 92 + .../rml-core/RMLTC0008b-JSON/mapping.ttl | 55 + .../rml-core/RMLTC0008b-JSON/output.nq | 7 + .../rml-core/RMLTC0008b-JSON/student.json | 7 + .../rml-core/RMLTC0008c-JSON/README.md | 55 + .../rml-core/RMLTC0008c-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0008c-JSON/output.nq | 3 + .../rml-core/RMLTC0008c-JSON/student.json | 7 + .../rml-core/RMLTC0009a-JSON/README.md | 90 + .../rml-core/RMLTC0009a-JSON/mapping.ttl | 50 + .../rml-core/RMLTC0009a-JSON/output.nq | 4 + .../rml-core/RMLTC0009a-JSON/sport.json | 8 + .../rml-core/RMLTC0009a-JSON/student.json | 13 + .../rml-core/RMLTC0009b-JSON/README.md | 100 + .../rml-core/RMLTC0009b-JSON/mapping.ttl | 56 + .../rml-core/RMLTC0009b-JSON/output.nq | 8 + .../rml-core/RMLTC0009b-JSON/sport.json | 8 + .../rml-core/RMLTC0009b-JSON/student.json | 13 + .../rml-core/RMLTC0010a-JSON/README.md | 63 + .../RMLTC0010a-JSON/country_info.json | 15 + .../rml-core/RMLTC0010a-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0010a-JSON/output.nq | 4 + .../rml-core/RMLTC0010b-JSON/README.md | 63 + .../RMLTC0010b-JSON/country_info.json | 15 + .../rml-core/RMLTC0010b-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0010b-JSON/output.nq | 4 + .../rml-core/RMLTC0010c-JSON/README.md | 64 + .../RMLTC0010c-JSON/country_info.json | 15 + .../rml-core/RMLTC0010c-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0010c-JSON/output.nq | 4 + .../rml-core/RMLTC0011b-JSON/README.md | 116 + .../rml-core/RMLTC0011b-JSON/mapping.ttl | 69 + .../rml-core/RMLTC0011b-JSON/output.nq | 17 + .../rml-core/RMLTC0011b-JSON/sport.json | 7 + .../rml-core/RMLTC0011b-JSON/student.json | 7 + .../RMLTC0011b-JSON/student_sport.json | 8 + .../rml-core/RMLTC0012a-JSON/README.md | 64 + .../rml-core/RMLTC0012a-JSON/mapping.ttl | 29 + .../rml-core/RMLTC0012a-JSON/output.nq | 5 + .../rml-core/RMLTC0012a-JSON/persons.json | 7 + .../rml-core/RMLTC0012b-JSON/README.md | 67 + .../rml-core/RMLTC0012b-JSON/lives.json | 7 + .../rml-core/RMLTC0012b-JSON/mapping.ttl | 44 + .../rml-core/RMLTC0012b-JSON/output.nq | 5 + .../rml-core/RMLTC0012b-JSON/persons.json | 7 + .../rml-core/RMLTC0012c-JSON/README.md | 50 + .../rml-core/RMLTC0012c-JSON/mapping.ttl | 25 + .../rml-core/RMLTC0012c-JSON/persons.json | 7 + .../rml-core/RMLTC0012d-JSON/README.md | 57 + .../rml-core/RMLTC0012d-JSON/mapping.ttl | 32 + .../rml-core/RMLTC0012d-JSON/persons.json | 7 + .../rml-core/RMLTC0013a-JSON/README.md | 51 + .../rml-core/RMLTC0013a-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0013a-JSON/output.nq | 1 + .../rml-core/RMLTC0013a-JSON/persons.json | 6 + .../rml-core/RMLTC0015a-JSON/README.md | 77 + .../rml-core/RMLTC0015a-JSON/country_en.json | 6 + .../rml-core/RMLTC0015a-JSON/country_es.json | 6 + .../rml-core/RMLTC0015a-JSON/mapping.ttl | 42 + .../rml-core/RMLTC0015a-JSON/output.nq | 6 + .../rml-core/RMLTC0015b-JSON/README.md | 66 + .../rml-core/RMLTC0015b-JSON/country_en.json | 6 + .../rml-core/RMLTC0015b-JSON/country_es.json | 6 + .../rml-core/RMLTC0015b-JSON/mapping.ttl | 42 + .../rml-core/RMLTC0019a-JSON/README.md | 60 + .../rml-core/RMLTC0019a-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0019a-JSON/output.nq | 2 + .../rml-core/RMLTC0019a-JSON/persons.json | 14 + .../rml-core/RMLTC0019b-JSON/README.md | 63 + .../rml-core/RMLTC0019b-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0019b-JSON/output.nq | 0 .../rml-core/RMLTC0019b-JSON/persons.json | 19 + .../rml-core/RMLTC0020a-JSON/README.md | 58 + .../rml-core/RMLTC0020a-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0020a-JSON/output.nq | 5 + .../rml-core/RMLTC0020a-JSON/student.json | 9 + .../rml-core/RMLTC0021a-JSON/README.md | 73 + .../rml-core/RMLTC0021a-JSON/mapping.ttl | 28 + .../rml-core/RMLTC0021a-JSON/output.nq | 7 + .../rml-core/RMLTC0021a-JSON/student.json | 15 + .../rml-core/RMLTC0022a-JSON/README.md | 61 + .../rml-core/RMLTC0022a-JSON/mapping.ttl | 30 + .../rml-core/RMLTC0022a-JSON/output.nq | 2 + .../rml-core/RMLTC0022a-JSON/student.json | 6 + .../rml-core/RMLTC0022b-JSON/README.md | 56 + .../rml-core/RMLTC0022b-JSON/data.json | 4 + .../rml-core/RMLTC0022b-JSON/mapping.ttl | 25 + .../rml-core/RMLTC0022b-JSON/output.nq | 2 + .../rml-core/RMLTC0022b-JSON/student.json | 6 + .../rml-core/RMLTC0022c-JSON/README.md | 55 + .../rml-core/RMLTC0022c-JSON/data.json | 4 + .../rml-core/RMLTC0022c-JSON/mapping.ttl | 24 + .../rml-core/RMLTC0022c-JSON/output.nq | 2 + .../rml-core/RMLTC0022c-JSON/student.json | 6 + .../rml-core/RMLTC0023a-JSON/README.md | 40 + .../rml-core/RMLTC0023a-JSON/mapping.ttl | 16 + .../rml-core/RMLTC0023a-JSON/student.json | 6 + .../rml-core/RMLTC0023b-JSON/README.md | 40 + .../rml-core/RMLTC0023b-JSON/mapping.ttl | 16 + .../rml-core/RMLTC0023b-JSON/student.json | 6 + .../rml-core/RMLTC0023c-JSON/README.md | 41 + .../rml-core/RMLTC0023c-JSON/mapping.ttl | 17 + .../rml-core/RMLTC0023c-JSON/student.json | 6 + .../rml-core/RMLTC0023d-JSON/README.md | 41 + .../rml-core/RMLTC0023d-JSON/mapping.ttl | 17 + .../rml-core/RMLTC0023d-JSON/student.json | 6 + .../rml-core/RMLTC0023e-JSON/README.md | 47 + .../rml-core/RMLTC0023e-JSON/mapping.ttl | 17 + .../rml-core/RMLTC0023e-JSON/student.json | 6 + .../rml-core/RMLTC0023f-JSON/README.md | 46 + .../rml-core/RMLTC0023f-JSON/mapping.ttl | 16 + .../rml-core/RMLTC0023f-JSON/student.json | 6 + .../rml-core/RMLTC0025a-JSON/README.md | 53 + .../rml-core/RMLTC0025a-JSON/mapping.ttl | 20 + .../rml-core/RMLTC0025a-JSON/output.nq | 2 + .../rml-core/RMLTC0025a-JSON/student.json | 8 + .../rml-core/RMLTC0025b-JSON/README.md | 49 + .../rml-core/RMLTC0025b-JSON/mapping.ttl | 23 + .../rml-core/RMLTC0025b-JSON/student.json | 8 + .../rml-core/RMLTC0026a-JSON/README.md | 53 + .../rml-core/RMLTC0026a-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0026a-JSON/output.nq | 3 + .../rml-core/RMLTC0026a-JSON/persons.json | 5 + .../rml-core/RMLTC0027a-JSON/README.md | 75 + .../rml-core/RMLTC0027a-JSON/mapping.ttl | 42 + .../rml-core/RMLTC0027a-JSON/output.nq | 4 + .../rml-core/RMLTC0027a-JSON/persons.json | 6 + .../rml-core/RMLTC0027b-JSON/README.md | 76 + .../rml-core/RMLTC0027b-JSON/mapping.ttl | 43 + .../rml-core/RMLTC0027b-JSON/output.nq | 4 + .../rml-core/RMLTC0027b-JSON/persons.json | 6 + .../rml-core/RMLTC0027c-JSON/README.md | 76 + .../rml-core/RMLTC0027c-JSON/mapping.ttl | 43 + .../rml-core/RMLTC0027c-JSON/output.nq | 4 + .../rml-core/RMLTC0027c-JSON/persons.json | 6 + .../rml-core/RMLTC0027d-JSON/README.md | 77 + .../rml-core/RMLTC0027d-JSON/mapping.ttl | 44 + .../rml-core/RMLTC0027d-JSON/output.nq | 4 + .../rml-core/RMLTC0027d-JSON/persons.json | 6 + .../rml-core/RMLTC0028a-JSON/README.md | 58 + .../rml-core/RMLTC0028a-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0028a-JSON/output.nq | 5 + .../rml-core/RMLTC0028a-JSON/student.json | 9 + .../rml-core/RMLTC0028b-JSON/README.md | 58 + .../rml-core/RMLTC0028b-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0028b-JSON/output.nq | 5 + .../rml-core/RMLTC0028b-JSON/student.json | 9 + .../rml-core/RMLTC0028c-JSON/README.md | 58 + .../rml-core/RMLTC0028c-JSON/mapping.ttl | 21 + .../rml-core/RMLTC0028c-JSON/output.nq | 5 + .../rml-core/RMLTC0028c-JSON/student.json | 9 + src/test/resources/rml-core/config.js | 72 + src/test/resources/rml-core/descriptions.csv | 437 + src/test/resources/rml-core/dev.html | 152 + .../rml-core/docs/20250130/index.html | 19356 ++++++++++++++++ .../rml-core/docs/20250204/index.html | 19356 ++++++++++++++++ .../rml-core/docs/20250217/index.html | 2988 +++ .../rml-core/docs/20250224/index.html | 3113 +++ .../rml-core/docs/20250228/index.html | 3113 +++ src/test/resources/rml-core/docs/index.html | 3113 +++ src/test/resources/rml-core/list.sh | 5 + src/test/resources/rml-core/make-metadata.py | 273 + src/test/resources/rml-core/manifest.rml.ttl | 267 + src/test/resources/rml-core/manifest.ttl | 660 + src/test/resources/rml-core/metadata.csv | 60 + .../resources/rml-core/section/abstract.md | 1 + .../resources/rml-core/section/data-model.md | 12 + .../rml-core/section/introduction.md | 4 + .../resources/rml-core/section/test-cases.md | 10 + src/test/resources/rml-fnml/README.md | 59 + .../rml-fnml/RMLFNMLTC0001-CSV/README.md | 59 + .../rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl | 30 + .../rml-fnml/RMLFNMLTC0001-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0001-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0002-CSV/README.md | 65 + .../rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl | 37 + .../rml-fnml/RMLFNMLTC0002-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0002-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0003-CSV/README.md | 65 + .../rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl | 39 + .../rml-fnml/RMLFNMLTC0003-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0003-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0004-CSV/README.md | 64 + .../rml-fnml/RMLFNMLTC0004-CSV/mapping.ttl | 38 + .../rml-fnml/RMLFNMLTC0004-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0004-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0005-CSV/README.md | 63 + .../rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl | 37 + .../rml-fnml/RMLFNMLTC0005-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0005-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0007-CSV/README.md | 69 + .../rml-fnml/RMLFNMLTC0007-CSV/mapping.ttl | 43 + .../rml-fnml/RMLFNMLTC0007-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0007-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0008-CSV/README.md | 68 + .../rml-fnml/RMLFNMLTC0008-CSV/mapping.ttl | 43 + .../rml-fnml/RMLFNMLTC0008-CSV/output.nq | 0 .../rml-fnml/RMLFNMLTC0008-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0011-CSV/README.md | 64 + .../rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl | 38 + .../rml-fnml/RMLFNMLTC0011-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0011-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0021-CSV/README.md | 67 + .../rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl | 41 + .../rml-fnml/RMLFNMLTC0021-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0021-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0031-CSV/README.md | 64 + .../rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl | 36 + .../rml-fnml/RMLFNMLTC0031-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0031-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0041-CSV/README.md | 65 + .../rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl | 39 + .../rml-fnml/RMLFNMLTC0041-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0041-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0051-CSV/README.md | 88 + .../rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl | 62 + .../rml-fnml/RMLFNMLTC0051-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0051-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0061-CSV/README.md | 69 + .../rml-fnml/RMLFNMLTC0061-CSV/mapping.ttl | 43 + .../rml-fnml/RMLFNMLTC0061-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0061-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0101-CSV/README.md | 58 + .../rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl | 38 + .../rml-fnml/RMLFNMLTC0101-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0102-CSV/README.md | 62 + .../rml-fnml/RMLFNMLTC0102-CSV/mapping.ttl | 37 + .../rml-fnml/RMLFNMLTC0102-CSV/output.nq | 0 .../rml-fnml/RMLFNMLTC0102-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0103-CSV/README.md | 62 + .../rml-fnml/RMLFNMLTC0103-CSV/mapping.ttl | 37 + .../rml-fnml/RMLFNMLTC0103-CSV/output.nq | 0 .../rml-fnml/RMLFNMLTC0103-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0104-CSV/README.md | 62 + .../rml-fnml/RMLFNMLTC0104-CSV/mapping.ttl | 37 + .../rml-fnml/RMLFNMLTC0104-CSV/output.nq | 0 .../rml-fnml/RMLFNMLTC0104-CSV/student.csv | 2 + src/test/resources/rml-fnml/config.js | 72 + src/test/resources/rml-fnml/descriptions.csv | 25 + src/test/resources/rml-fnml/dev.html | 117 + .../rml-fnml/docs/20250130/index.html | 1325 ++ .../rml-fnml/docs/20250303/index.html | 1496 ++ src/test/resources/rml-fnml/docs/index.html | 1496 ++ src/test/resources/rml-fnml/functions.ttl | 102 + src/test/resources/rml-fnml/list.sh | 5 + src/test/resources/rml-fnml/make-metadata.py | 139 + src/test/resources/rml-fnml/manifest.rml.ttl | 267 + src/test/resources/rml-fnml/manifest.ttl | 200 + src/test/resources/rml-fnml/metadata.csv | 25 + .../resources/rml-fnml/section/abstract.md | 1 + .../resources/rml-fnml/section/data-model.md | 12 + .../rml-fnml/section/introduction.md | 4 + .../resources/rml-fnml/section/test-cases.md | 10 + .../resources/rml-lv/RMLLVTC0000a/README.md | 82 + .../resources/rml-lv/RMLLVTC0000a/mapping.ttl | 31 + .../resources/rml-lv/RMLLVTC0000a/output.nq | 2 + .../resources/rml-lv/RMLLVTC0000a/people.json | 26 + .../resources/rml-lv/RMLLVTC0000b/README.md | 59 + .../resources/rml-lv/RMLLVTC0000b/mapping.ttl | 30 + .../resources/rml-lv/RMLLVTC0000b/output.nq | 3 + .../resources/rml-lv/RMLLVTC0000b/people.csv | 4 + .../resources/rml-lv/RMLLVTC0000c/README.md | 90 + .../resources/rml-lv/RMLLVTC0000c/mapping.ttl | 39 + .../resources/rml-lv/RMLLVTC0000c/output.nq | 2 + .../resources/rml-lv/RMLLVTC0000c/people.json | 26 + .../resources/rml-lv/RMLLVTC0001a/README.md | 82 + .../resources/rml-lv/RMLLVTC0001a/mapping.ttl | 31 + .../resources/rml-lv/RMLLVTC0001a/output.nq | 2 + .../resources/rml-lv/RMLLVTC0001a/people.json | 26 + .../resources/rml-lv/RMLLVTC0001b/README.md | 87 + .../resources/rml-lv/RMLLVTC0001b/mapping.ttl | 36 + .../resources/rml-lv/RMLLVTC0001b/output.nq | 2 + .../resources/rml-lv/RMLLVTC0001b/people.json | 26 + .../resources/rml-lv/RMLLVTC0001c/README.md | 89 + .../resources/rml-lv/RMLLVTC0001c/mapping.ttl | 36 + .../resources/rml-lv/RMLLVTC0001c/output.nq | 2 + .../resources/rml-lv/RMLLVTC0001c/people.json | 28 + .../resources/rml-lv/RMLLVTC0001d/README.md | 90 + .../resources/rml-lv/RMLLVTC0001d/mapping.ttl | 37 + .../resources/rml-lv/RMLLVTC0001d/output.nq | 2 + .../resources/rml-lv/RMLLVTC0001d/people.json | 28 + .../resources/rml-lv/RMLLVTC0002a/README.md | 94 + .../resources/rml-lv/RMLLVTC0002a/mapping.ttl | 42 + .../resources/rml-lv/RMLLVTC0002a/output.nq | 3 + .../resources/rml-lv/RMLLVTC0002a/people.json | 26 + .../resources/rml-lv/RMLLVTC0002b/README.md | 109 + .../resources/rml-lv/RMLLVTC0002b/mapping.ttl | 54 + .../resources/rml-lv/RMLLVTC0002b/output.nq | 6 + .../resources/rml-lv/RMLLVTC0002b/people.json | 26 + .../resources/rml-lv/RMLLVTC0002c/README.md | 117 + .../resources/rml-lv/RMLLVTC0002c/mapping.ttl | 57 + .../resources/rml-lv/RMLLVTC0002c/output.nq | 3 + .../resources/rml-lv/RMLLVTC0002c/people.json | 34 + .../resources/rml-lv/RMLLVTC0003a/README.md | 84 + .../resources/rml-lv/RMLLVTC0003a/mapping.ttl | 33 + .../resources/rml-lv/RMLLVTC0003a/output.nq | 2 + .../resources/rml-lv/RMLLVTC0003a/people.json | 26 + .../resources/rml-lv/RMLLVTC0003b/README.md | 94 + .../resources/rml-lv/RMLLVTC0003b/mapping.ttl | 41 + .../resources/rml-lv/RMLLVTC0003b/output.nq | 4 + .../resources/rml-lv/RMLLVTC0003b/people.json | 26 + .../resources/rml-lv/RMLLVTC0003c/README.md | 80 + .../resources/rml-lv/RMLLVTC0003c/mapping.ttl | 37 + .../resources/rml-lv/RMLLVTC0003c/output.nq | 3 + .../resources/rml-lv/RMLLVTC0003c/people.json | 17 + .../resources/rml-lv/RMLLVTC0004a/README.md | 82 + .../resources/rml-lv/RMLLVTC0004a/mapping.ttl | 31 + .../resources/rml-lv/RMLLVTC0004a/output.nq | 2 + .../resources/rml-lv/RMLLVTC0004a/people.json | 26 + .../resources/rml-lv/RMLLVTC0004b/README.md | 93 + .../resources/rml-lv/RMLLVTC0004b/mapping.ttl | 41 + .../resources/rml-lv/RMLLVTC0004b/output.nq | 3 + .../resources/rml-lv/RMLLVTC0004b/people.json | 26 + .../resources/rml-lv/RMLLVTC0004c/README.md | 80 + .../resources/rml-lv/RMLLVTC0004c/mapping.ttl | 37 + .../resources/rml-lv/RMLLVTC0004c/output.nq | 3 + .../resources/rml-lv/RMLLVTC0004c/people.json | 17 + .../resources/rml-lv/RMLLVTC0004d/README.md | 74 + .../resources/rml-lv/RMLLVTC0004d/mapping.ttl | 37 + .../resources/rml-lv/RMLLVTC0004d/output.nq | 2 + .../resources/rml-lv/RMLLVTC0004d/people.json | 12 + .../resources/rml-lv/RMLLVTC0005a/README.md | 75 + .../resources/rml-lv/RMLLVTC0005a/mapping.ttl | 31 + .../resources/rml-lv/RMLLVTC0005a/people.json | 26 + .../resources/rml-lv/RMLLVTC0005b/README.md | 75 + .../resources/rml-lv/RMLLVTC0005b/mapping.ttl | 31 + .../resources/rml-lv/RMLLVTC0005b/people.json | 26 + .../resources/rml-lv/RMLLVTC0005c/README.md | 86 + .../resources/rml-lv/RMLLVTC0005c/mapping.ttl | 42 + .../resources/rml-lv/RMLLVTC0005c/people.json | 26 + .../resources/rml-lv/RMLLVTC0006a/README.md | 133 + .../resources/rml-lv/RMLLVTC0006a/mapping.ttl | 78 + .../resources/rml-lv/RMLLVTC0006a/output.nq | 6 + .../resources/rml-lv/RMLLVTC0006a/people.csv | 4 + .../resources/rml-lv/RMLLVTC0006a/people.json | 17 + .../resources/rml-lv/RMLLVTC0006b/README.md | 132 + .../resources/rml-lv/RMLLVTC0006b/mapping.ttl | 78 + .../resources/rml-lv/RMLLVTC0006b/output.nq | 5 + .../resources/rml-lv/RMLLVTC0006b/people.csv | 4 + .../resources/rml-lv/RMLLVTC0006b/people.json | 17 + .../resources/rml-lv/RMLLVTC0006c/README.md | 176 + .../resources/rml-lv/RMLLVTC0006c/mapping.ttl | 112 + .../resources/rml-lv/RMLLVTC0006c/output.nq | 6 + .../resources/rml-lv/RMLLVTC0006c/people.csv | 4 + .../resources/rml-lv/RMLLVTC0006c/people.json | 17 + .../resources/rml-lv/RMLLVTC0006c/people2.csv | 4 + .../resources/rml-lv/RMLLVTC0006d/README.md | 175 + .../resources/rml-lv/RMLLVTC0006d/mapping.ttl | 112 + .../resources/rml-lv/RMLLVTC0006d/output.nq | 5 + .../resources/rml-lv/RMLLVTC0006d/people.csv | 4 + .../resources/rml-lv/RMLLVTC0006d/people.json | 17 + .../resources/rml-lv/RMLLVTC0006d/people2.csv | 4 + .../resources/rml-lv/RMLLVTC0006e/README.md | 171 + .../resources/rml-lv/RMLLVTC0006e/mapping.ttl | 112 + .../resources/rml-lv/RMLLVTC0006e/output.nq | 3 + .../resources/rml-lv/RMLLVTC0006e/people.csv | 4 + .../resources/rml-lv/RMLLVTC0006e/people.json | 17 + .../resources/rml-lv/RMLLVTC0006e/people2.csv | 2 + .../resources/rml-lv/RMLLVTC0006f/README.md | 133 + .../resources/rml-lv/RMLLVTC0006f/mapping.ttl | 78 + .../resources/rml-lv/RMLLVTC0006f/output.nq | 6 + .../resources/rml-lv/RMLLVTC0006f/people.csv | 4 + .../resources/rml-lv/RMLLVTC0006f/people.json | 17 + .../resources/rml-lv/RMLLVTC0007a/README.md | 91 + .../resources/rml-lv/RMLLVTC0007a/mapping.ttl | 59 + .../resources/rml-lv/RMLLVTC0007a/output.nq | 6 + .../resources/rml-lv/RMLLVTC0007a/people.csv | 3 + .../resources/rml-lv/RMLLVTC0007b/README.md | 91 + .../resources/rml-lv/RMLLVTC0007b/mapping.ttl | 58 + .../resources/rml-lv/RMLLVTC0007b/output.nq | 6 + .../resources/rml-lv/RMLLVTC0007b/people.csv | 4 + .../resources/rml-lv/RMLLVTC0007c/README.md | 100 + .../resources/rml-lv/RMLLVTC0007c/mapping.ttl | 59 + .../resources/rml-lv/RMLLVTC0007c/output.nq | 6 + .../resources/rml-lv/RMLLVTC0007c/people.json | 12 + .../resources/rml-lv/RMLLVTC0008a/README.md | 43 + .../resources/rml-lv/RMLLVTC0008a/mapping.ttl | 30 + .../resources/rml-lv/RMLLVTC0008b/README.md | 145 + .../resources/rml-lv/RMLLVTC0008b/mapping.ttl | 90 + .../resources/rml-lv/RMLLVTC0008b/output.nq | 6 + .../resources/rml-lv/RMLLVTC0008b/people.csv | 4 + .../resources/rml-lv/RMLLVTC0008b/people.json | 17 + .../resources/rml-lv/RMLLVTC0008c/README.md | 87 + .../resources/rml-lv/RMLLVTC0008c/mapping.ttl | 43 + .../resources/rml-lv/RMLLVTC0008c/people.json | 26 + src/test/resources/rml-lv/config.js | 86 + src/test/resources/rml-lv/descriptions.csv | 41 + src/test/resources/rml-lv/dev.html | 132 + .../resources/rml-lv/docs/20250130/index.html | 1742 ++ .../resources/rml-lv/docs/20250204/index.html | 1742 ++ .../resources/rml-lv/docs/20250216/index.html | 2142 ++ .../resources/rml-lv/docs/20250228/index.html | 3383 +++ src/test/resources/rml-lv/docs/index.html | 3383 +++ src/test/resources/rml-lv/list.sh | 5 + src/test/resources/rml-lv/make-metadata.py | 148 + src/test/resources/rml-lv/manifest.rml.ttl | 267 + src/test/resources/rml-lv/manifest.ttl | 400 + src/test/resources/rml-lv/metadata.csv | 33 + src/test/resources/rml-lv/section/abstract.md | 1 + .../resources/rml-lv/section/data-model.md | 12 + .../resources/rml-lv/section/introduction.md | 4 + .../resources/rml-lv/section/test-cases.md | 10 + .../rml-star/RMLSTARTC001a/README.md | 66 + .../rml-star/RMLSTARTC001b/README.md | 78 + .../rml-star/RMLSTARTC002a/README.md | 68 + .../rml-star/RMLSTARTC002b/README.md | 80 + .../rml-star/RMLSTARTC003a/README.md | 85 + .../rml-star/RMLSTARTC003b/README.md | 97 + .../rml-star/RMLSTARTC004a/README.md | 84 + .../rml-star/RMLSTARTC004b/README.md | 96 + .../rml-star/RMLSTARTC005a/README.md | 65 + .../rml-star/RMLSTARTC005b/README.md | 77 + .../rml-star/RMLSTARTC006a/README.md | 65 + .../rml-star/RMLSTARTC006b/README.md | 77 + .../rml-star/RMLSTARTC007a/README.md | 82 + .../rml-star/RMLSTARTC007b/README.md | 94 + .../rml-star/RMLSTARTC008a/README.md | 149 + .../rml-star/RMLSTARTC008b/README.md | 162 + .../resources/rml-star/RMLSTARTC009/README.md | 58 + .../resources/rml-star/RMLSTARTC010/README.md | 56 + src/test/resources/rml-star/config.js | 72 + src/test/resources/rml-star/descriptions.csv | 19 + src/test/resources/rml-star/dev.html | 118 + .../rml-star/docs/20250130/index.html | 1895 ++ src/test/resources/rml-star/docs/index.html | 1895 ++ .../rml-star/invalid/RMLSTARTC009/data.csv | 2 + .../rml-star/invalid/RMLSTARTC009/mapping.ttl | 39 + .../rml-star/invalid/RMLSTARTC010/data.csv | 2 + .../rml-star/invalid/RMLSTARTC010/mapping.ttl | 37 + src/test/resources/rml-star/list.sh | 5 + src/test/resources/rml-star/make-metadata.py | 143 + src/test/resources/rml-star/manifest.rml.ttl | 267 + src/test/resources/rml-star/manifest.ttl | 240 + src/test/resources/rml-star/metadata.csv | 19 + .../resources/rml-star/section/abstract.md | 1 + .../resources/rml-star/section/data-model.md | 12 + .../rml-star/section/introduction.md | 4 + .../resources/rml-star/section/test-cases.md | 10 + .../rml-star/valid/RMLSTARTC001a/data.csv | 2 + .../rml-star/valid/RMLSTARTC001a/mapping.ttl | 40 + .../rml-star/valid/RMLSTARTC001a/output.nt | 2 + .../rml-star/valid/RMLSTARTC001b/data1.csv | 2 + .../rml-star/valid/RMLSTARTC001b/data2.csv | 2 + .../rml-star/valid/RMLSTARTC001b/mapping.ttl | 44 + .../rml-star/valid/RMLSTARTC001b/output.nt | 2 + .../rml-star/valid/RMLSTARTC002a/data.csv | 2 + .../rml-star/valid/RMLSTARTC002a/mapping.ttl | 42 + .../rml-star/valid/RMLSTARTC002a/output.nt | 2 + .../rml-star/valid/RMLSTARTC002b/data1.csv | 2 + .../rml-star/valid/RMLSTARTC002b/data2.csv | 2 + .../rml-star/valid/RMLSTARTC002b/mapping.ttl | 46 + .../rml-star/valid/RMLSTARTC002b/output.nt | 2 + .../rml-star/valid/RMLSTARTC003a/data.csv | 2 + .../rml-star/valid/RMLSTARTC003a/mapping.ttl | 58 + .../rml-star/valid/RMLSTARTC003a/output.nt | 3 + .../rml-star/valid/RMLSTARTC003b/data1.csv | 2 + .../rml-star/valid/RMLSTARTC003b/data2.csv | 2 + .../rml-star/valid/RMLSTARTC003b/mapping.ttl | 62 + .../rml-star/valid/RMLSTARTC003b/output.nt | 3 + .../rml-star/valid/RMLSTARTC004a/data.csv | 2 + .../rml-star/valid/RMLSTARTC004a/mapping.ttl | 57 + .../rml-star/valid/RMLSTARTC004a/output.nt | 3 + .../rml-star/valid/RMLSTARTC004b/data1.csv | 2 + .../rml-star/valid/RMLSTARTC004b/data2.csv | 2 + .../rml-star/valid/RMLSTARTC004b/mapping.ttl | 61 + .../rml-star/valid/RMLSTARTC004b/output.nt | 3 + .../rml-star/valid/RMLSTARTC005a/data.csv | 2 + .../rml-star/valid/RMLSTARTC005a/mapping.ttl | 40 + .../rml-star/valid/RMLSTARTC005a/output.nt | 1 + .../rml-star/valid/RMLSTARTC005b/data1.csv | 2 + .../rml-star/valid/RMLSTARTC005b/data2.csv | 2 + .../rml-star/valid/RMLSTARTC005b/mapping.ttl | 44 + .../rml-star/valid/RMLSTARTC005b/output.nt | 1 + .../rml-star/valid/RMLSTARTC006a/data.csv | 2 + .../rml-star/valid/RMLSTARTC006a/mapping.ttl | 40 + .../rml-star/valid/RMLSTARTC006a/output.nt | 1 + .../rml-star/valid/RMLSTARTC006b/data1.csv | 2 + .../rml-star/valid/RMLSTARTC006b/data2.csv | 2 + .../rml-star/valid/RMLSTARTC006b/mapping.ttl | 44 + .../rml-star/valid/RMLSTARTC006b/output.nt | 1 + .../rml-star/valid/RMLSTARTC007a/data.csv | 2 + .../rml-star/valid/RMLSTARTC007a/mapping.ttl | 57 + .../rml-star/valid/RMLSTARTC007a/output.nt | 1 + .../rml-star/valid/RMLSTARTC007b/data1.csv | 2 + .../rml-star/valid/RMLSTARTC007b/data2.csv | 2 + .../rml-star/valid/RMLSTARTC007b/mapping.ttl | 61 + .../rml-star/valid/RMLSTARTC007b/output.nt | 1 + .../rml-star/valid/RMLSTARTC008a/data.csv | 2 + .../rml-star/valid/RMLSTARTC008a/mapping.ttl | 125 + .../rml-star/valid/RMLSTARTC008a/output.nt | 1 + .../rml-star/valid/RMLSTARTC008b/data1.csv | 2 + .../rml-star/valid/RMLSTARTC008b/data2.csv | 2 + .../rml-star/valid/RMLSTARTC008b/mapping.ttl | 129 + .../rml-star/valid/RMLSTARTC008b/output.nt | 1 + 731 files changed, 107508 insertions(+) create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Alt/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Alt/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Bag/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Bag/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-List/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-List/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Seq/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Seq/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-Bag/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-Bag/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-List/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-List/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EB/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EB/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEB/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEB/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEL/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEL/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NELb/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NELb/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM1/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM1/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM2/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM2/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM3/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM3/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM4/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM4/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM5/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM5/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App1/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App1/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App2/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App2/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car1/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car1/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car2/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car2/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT0/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT0/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT1/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT1/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT2/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT2/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT3/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT3/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT4/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT4/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT5/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT5/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0007-NES/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0007-NES/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/student.csv create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/student.csv create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Lista/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Lista/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Listb/data.json create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Listb/default.nq create mode 100644 src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl create mode 100644 src/test/resources/rml-cc/config.js create mode 100644 src/test/resources/rml-cc/descriptions.csv create mode 100644 src/test/resources/rml-cc/dev.html create mode 100644 src/test/resources/rml-cc/docs/20250130/index.html create mode 100644 src/test/resources/rml-cc/docs/20250206/index.html create mode 100644 src/test/resources/rml-cc/docs/20250225/index.html create mode 100644 src/test/resources/rml-cc/docs/index.html create mode 100644 src/test/resources/rml-cc/list.sh create mode 100644 src/test/resources/rml-cc/make-metadata.py create mode 100644 src/test/resources/rml-cc/manifest.rml.ttl create mode 100644 src/test/resources/rml-cc/manifest.ttl create mode 100644 src/test/resources/rml-cc/metadata.csv create mode 100644 src/test/resources/rml-cc/section/abstract.md create mode 100644 src/test/resources/rml-cc/section/data-model.md create mode 100644 src/test/resources/rml-cc/section/introduction.md create mode 100644 src/test/resources/rml-cc/section/test-cases.md create mode 100644 src/test/resources/rml-core/README.md create mode 100644 src/test/resources/rml-core/RMLTC0000-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0000-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0000-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0000-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0001a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0001a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0001a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0001a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0001b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0001b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0001b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0001b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0002a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0002a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0002a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0002a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0002b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0002b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0002b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0002b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0002e-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0002e-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0002e-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0002g-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0002g-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0002g-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0003c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0003c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0003c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0003c-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0004a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0004a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0004a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0004a-JSON/student_sport.json create mode 100644 src/test/resources/rml-core/RMLTC0004b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0004b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0004b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0005a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0005a-JSON/ious.json create mode 100644 src/test/resources/rml-core/RMLTC0005a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0005a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0006a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0006a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0006a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0006a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0007a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0007a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0007a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0007a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0007b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0007b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0007b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0007b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0007c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0007c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0007c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0007c-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0007d-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0007d-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0007d-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0007d-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0007e-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0007e-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0007e-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0007e-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0007f-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0007f-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0007f-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0007f-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0007g-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0007g-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0007g-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0007g-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0007h-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0007h-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0007h-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0008a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0008a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0008a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0008a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0008b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0008b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0008b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0008b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0008c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0008c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0008c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0008c-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/sport.json create mode 100644 src/test/resources/rml-core/RMLTC0009a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/sport.json create mode 100644 src/test/resources/rml-core/RMLTC0009b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0010a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0010a-JSON/country_info.json create mode 100644 src/test/resources/rml-core/RMLTC0010a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0010a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0010b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0010b-JSON/country_info.json create mode 100644 src/test/resources/rml-core/RMLTC0010b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0010b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0010c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0010c-JSON/country_info.json create mode 100644 src/test/resources/rml-core/RMLTC0010c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0010c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/sport.json create mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0011b-JSON/student_sport.json create mode 100644 src/test/resources/rml-core/RMLTC0012a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0012a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0012a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0012a-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/lives.json create mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0012b-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0012c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0012c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0012c-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0012d-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0012d-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0012d-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0013a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0013a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0013a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0013a-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/country_en.json create mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/country_es.json create mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0015a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0015b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0015b-JSON/country_en.json create mode 100644 src/test/resources/rml-core/RMLTC0015b-JSON/country_es.json create mode 100644 src/test/resources/rml-core/RMLTC0015b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0019a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0019a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0019a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0019a-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0019b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0019b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0019b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0019b-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0020a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0020a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0020a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0020a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0021a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0021a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0021a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0021a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0022a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0022a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0022a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0022a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0022b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0022b-JSON/data.json create mode 100644 src/test/resources/rml-core/RMLTC0022b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0022b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0022b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0022c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0022c-JSON/data.json create mode 100644 src/test/resources/rml-core/RMLTC0022c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0022c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0022c-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0023a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0023a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0023a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0023b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0023b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0023b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0023c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0023c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0023c-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0023d-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0023d-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0023d-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0023e-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0023e-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0023e-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0023f-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0023f-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0023f-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0025a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0025a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0025a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0025a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0025b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0025b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0025b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0026a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0026a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0026a-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0027a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0027a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0027a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0027a-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0027b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0027b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0027b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0027b-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0027c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0027c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0027c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0027c-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0027d-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0027d-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0027d-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0027d-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0028a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0028a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0028a-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0028a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0028b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0028b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0028b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0028b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0028c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0028c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0028c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0028c-JSON/student.json create mode 100644 src/test/resources/rml-core/config.js create mode 100644 src/test/resources/rml-core/descriptions.csv create mode 100644 src/test/resources/rml-core/dev.html create mode 100644 src/test/resources/rml-core/docs/20250130/index.html create mode 100644 src/test/resources/rml-core/docs/20250204/index.html create mode 100644 src/test/resources/rml-core/docs/20250217/index.html create mode 100644 src/test/resources/rml-core/docs/20250224/index.html create mode 100644 src/test/resources/rml-core/docs/20250228/index.html create mode 100644 src/test/resources/rml-core/docs/index.html create mode 100644 src/test/resources/rml-core/list.sh create mode 100644 src/test/resources/rml-core/make-metadata.py create mode 100644 src/test/resources/rml-core/manifest.rml.ttl create mode 100644 src/test/resources/rml-core/manifest.ttl create mode 100644 src/test/resources/rml-core/metadata.csv create mode 100644 src/test/resources/rml-core/section/abstract.md create mode 100644 src/test/resources/rml-core/section/data-model.md create mode 100644 src/test/resources/rml-core/section/introduction.md create mode 100644 src/test/resources/rml-core/section/test-cases.md create mode 100644 src/test/resources/rml-fnml/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/config.js create mode 100644 src/test/resources/rml-fnml/descriptions.csv create mode 100644 src/test/resources/rml-fnml/dev.html create mode 100644 src/test/resources/rml-fnml/docs/20250130/index.html create mode 100644 src/test/resources/rml-fnml/docs/20250303/index.html create mode 100644 src/test/resources/rml-fnml/docs/index.html create mode 100644 src/test/resources/rml-fnml/functions.ttl create mode 100644 src/test/resources/rml-fnml/list.sh create mode 100644 src/test/resources/rml-fnml/make-metadata.py create mode 100644 src/test/resources/rml-fnml/manifest.rml.ttl create mode 100644 src/test/resources/rml-fnml/manifest.ttl create mode 100644 src/test/resources/rml-fnml/metadata.csv create mode 100644 src/test/resources/rml-fnml/section/abstract.md create mode 100644 src/test/resources/rml-fnml/section/data-model.md create mode 100644 src/test/resources/rml-fnml/section/introduction.md create mode 100644 src/test/resources/rml-fnml/section/test-cases.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0000a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0000a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0000a/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0000a/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0000b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0000b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0000b/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0000b/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0000c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0000c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0000c/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0000c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0001a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0001a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0001a/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0001a/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0001b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0001b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0001b/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0001b/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0001c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0001c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0001c/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0001c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0001d/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0001d/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0001d/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0001d/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0002a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0002a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0002a/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0002a/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0002b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0002b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0002b/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0002b/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0002c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0002c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0002c/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0002c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0003a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0003a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0003a/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0003a/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0003b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0003b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0003b/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0003b/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0003c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0003c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0003c/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0003c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0004a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0004a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0004a/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0004a/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0004b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0004b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0004b/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0004b/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0004c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0004c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0004c/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0004c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0004d/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0004d/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0004d/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0004d/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0005a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0005a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0005a/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0005b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0005b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0005b/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0005c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0005c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0005c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0006a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0006a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0006a/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0006a/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006a/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0006b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0006b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0006b/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0006b/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006b/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0006c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0006c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0006c/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0006c/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0006c/people2.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006d/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0006d/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0006d/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0006d/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006d/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0006d/people2.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006e/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0006e/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0006e/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0006e/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006e/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0006e/people2.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006f/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0006f/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0006f/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0006f/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0006f/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0007a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0007a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0007a/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0007a/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0007b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0007b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0007b/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0007b/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0007c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0007c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0007c/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0007c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0008a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0008a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0008b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0008b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0008b/output.nq create mode 100644 src/test/resources/rml-lv/RMLLVTC0008b/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0008b/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0008c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0008c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0008c/people.json create mode 100644 src/test/resources/rml-lv/config.js create mode 100644 src/test/resources/rml-lv/descriptions.csv create mode 100644 src/test/resources/rml-lv/dev.html create mode 100644 src/test/resources/rml-lv/docs/20250130/index.html create mode 100644 src/test/resources/rml-lv/docs/20250204/index.html create mode 100644 src/test/resources/rml-lv/docs/20250216/index.html create mode 100644 src/test/resources/rml-lv/docs/20250228/index.html create mode 100644 src/test/resources/rml-lv/docs/index.html create mode 100644 src/test/resources/rml-lv/list.sh create mode 100644 src/test/resources/rml-lv/make-metadata.py create mode 100644 src/test/resources/rml-lv/manifest.rml.ttl create mode 100644 src/test/resources/rml-lv/manifest.ttl create mode 100644 src/test/resources/rml-lv/metadata.csv create mode 100644 src/test/resources/rml-lv/section/abstract.md create mode 100644 src/test/resources/rml-lv/section/data-model.md create mode 100644 src/test/resources/rml-lv/section/introduction.md create mode 100644 src/test/resources/rml-lv/section/test-cases.md create mode 100644 src/test/resources/rml-star/RMLSTARTC001a/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC001b/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC002a/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC002b/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC003a/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC003b/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC004a/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC004b/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC005a/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC005b/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC006a/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC006b/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC007a/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC007b/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC008a/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC008b/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC009/README.md create mode 100644 src/test/resources/rml-star/RMLSTARTC010/README.md create mode 100644 src/test/resources/rml-star/config.js create mode 100644 src/test/resources/rml-star/descriptions.csv create mode 100644 src/test/resources/rml-star/dev.html create mode 100644 src/test/resources/rml-star/docs/20250130/index.html create mode 100644 src/test/resources/rml-star/docs/index.html create mode 100644 src/test/resources/rml-star/invalid/RMLSTARTC009/data.csv create mode 100644 src/test/resources/rml-star/invalid/RMLSTARTC009/mapping.ttl create mode 100644 src/test/resources/rml-star/invalid/RMLSTARTC010/data.csv create mode 100644 src/test/resources/rml-star/invalid/RMLSTARTC010/mapping.ttl create mode 100644 src/test/resources/rml-star/list.sh create mode 100644 src/test/resources/rml-star/make-metadata.py create mode 100644 src/test/resources/rml-star/manifest.rml.ttl create mode 100644 src/test/resources/rml-star/manifest.ttl create mode 100644 src/test/resources/rml-star/metadata.csv create mode 100644 src/test/resources/rml-star/section/abstract.md create mode 100644 src/test/resources/rml-star/section/data-model.md create mode 100644 src/test/resources/rml-star/section/introduction.md create mode 100644 src/test/resources/rml-star/section/test-cases.md create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC001a/data.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC001a/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC001a/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC001b/data1.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC001b/data2.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC001b/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC001b/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC002a/data.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC002a/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC002a/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC002b/data1.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC002b/data2.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC002b/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC002b/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC003a/data.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC003a/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC003a/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC003b/data1.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC003b/data2.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC003b/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC003b/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC004a/data.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC004a/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC004a/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC004b/data1.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC004b/data2.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC004b/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC004b/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC005a/data.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC005a/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC005a/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC005b/data1.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC005b/data2.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC005b/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC005b/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC006a/data.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC006a/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC006a/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC006b/data1.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC006b/data2.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC006b/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC006b/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC007a/data.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC007a/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC007a/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC007b/data1.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC007b/data2.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC007b/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC007b/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC008a/data.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC008a/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC008a/output.nt create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC008b/data1.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC008b/data2.csv create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC008b/mapping.ttl create mode 100644 src/test/resources/rml-star/valid/RMLSTARTC008b/output.nt diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md new file mode 100644 index 00000000..52ddf5a4 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md @@ -0,0 +1,64 @@ +## RMLTC-CC-0001-Alt + +**Title**: Generate a rdf:Alt as an object + +**Description**: Tests if a rdf:Alt is generated as an object + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Alt ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . + + _:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . + + _:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/data.json b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/data.json new file mode 100644 index 00000000..147b8e51 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/data.json @@ -0,0 +1,26 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + }, + { + "id": "c", + "values": [ + "7", + "8", + "9" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/default.nq new file mode 100644 index 00000000..74e2d141 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/default.nq @@ -0,0 +1,17 @@ + _:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . + + _:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . + + _:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl new file mode 100644 index 00000000..a72409e0 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Alt ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md new file mode 100644 index 00000000..22d00ea8 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md @@ -0,0 +1,61 @@ +## RMLTC-CC-0001-Bag + +**Title**: Generate a rdf:Bag as an object + +**Description**: Tests if a rdf:Bag is generated as an object + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . + _:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . + _:nc808fbd2e11a4baa939c61c8210b5909b3 . + _:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/data.json b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/data.json new file mode 100644 index 00000000..147b8e51 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/data.json @@ -0,0 +1,26 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + }, + { + "id": "c", + "values": [ + "7", + "8", + "9" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/default.nq new file mode 100644 index 00000000..7b134a9b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/default.nq @@ -0,0 +1,15 @@ +_:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . + _:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . + _:nc808fbd2e11a4baa939c61c8210b5909b3 . + _:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl new file mode 100644 index 00000000..20d9348f --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md new file mode 100644 index 00000000..bf4ab396 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md @@ -0,0 +1,70 @@ +## RMLTC-CC-0001-List + +**Title**: Generate a rdf:List as an object + +**Description**: Tests if a rdf:List is generated as an object + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:n988e0f11d19c486fa3b3255f94c9b3bab1 . +_:n988e0f11d19c486fa3b3255f94c9b3bab1 "1" . +_:n988e0f11d19c486fa3b3255f94c9b3bab1 _:n988e0f11d19c486fa3b3255f94c9b3bab2 . +_:n988e0f11d19c486fa3b3255f94c9b3bab2 "2" . +_:n988e0f11d19c486fa3b3255f94c9b3bab2 _:n988e0f11d19c486fa3b3255f94c9b3bab3 . +_:n988e0f11d19c486fa3b3255f94c9b3bab3 "3" . +_:n988e0f11d19c486fa3b3255f94c9b3bab3 . + + _:n988e0f11d19c486fa3b3255f94c9b3bab4 . +_:n988e0f11d19c486fa3b3255f94c9b3bab4 "4" . +_:n988e0f11d19c486fa3b3255f94c9b3bab4 _:n988e0f11d19c486fa3b3255f94c9b3bab5 . +_:n988e0f11d19c486fa3b3255f94c9b3bab5 "5" . +_:n988e0f11d19c486fa3b3255f94c9b3bab5 _:n988e0f11d19c486fa3b3255f94c9b3bab6 . +_:n988e0f11d19c486fa3b3255f94c9b3bab6 "6" . +_:n988e0f11d19c486fa3b3255f94c9b3bab6 . + + _:n988e0f11d19c486fa3b3255f94c9b3bab7 . +_:n988e0f11d19c486fa3b3255f94c9b3bab7 "7" . +_:n988e0f11d19c486fa3b3255f94c9b3bab7 _:n988e0f11d19c486fa3b3255f94c9b3bab8 . +_:n988e0f11d19c486fa3b3255f94c9b3bab8 "8" . +_:n988e0f11d19c486fa3b3255f94c9b3bab8 _:n988e0f11d19c486fa3b3255f94c9b3bab9 . +_:n988e0f11d19c486fa3b3255f94c9b3bab9 "9" . +_:n988e0f11d19c486fa3b3255f94c9b3bab9 . + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/data.json b/src/test/resources/rml-cc/RMLTC-CC-0001-List/data.json new file mode 100644 index 00000000..147b8e51 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/data.json @@ -0,0 +1,26 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + }, + { + "id": "c", + "values": [ + "7", + "8", + "9" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0001-List/default.nq new file mode 100644 index 00000000..0b4e8c1d --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/default.nq @@ -0,0 +1,23 @@ + _:n988e0f11d19c486fa3b3255f94c9b3bab1 . +_:n988e0f11d19c486fa3b3255f94c9b3bab1 "1" . +_:n988e0f11d19c486fa3b3255f94c9b3bab1 _:n988e0f11d19c486fa3b3255f94c9b3bab2 . +_:n988e0f11d19c486fa3b3255f94c9b3bab2 "2" . +_:n988e0f11d19c486fa3b3255f94c9b3bab2 _:n988e0f11d19c486fa3b3255f94c9b3bab3 . +_:n988e0f11d19c486fa3b3255f94c9b3bab3 "3" . +_:n988e0f11d19c486fa3b3255f94c9b3bab3 . + + _:n988e0f11d19c486fa3b3255f94c9b3bab4 . +_:n988e0f11d19c486fa3b3255f94c9b3bab4 "4" . +_:n988e0f11d19c486fa3b3255f94c9b3bab4 _:n988e0f11d19c486fa3b3255f94c9b3bab5 . +_:n988e0f11d19c486fa3b3255f94c9b3bab5 "5" . +_:n988e0f11d19c486fa3b3255f94c9b3bab5 _:n988e0f11d19c486fa3b3255f94c9b3bab6 . +_:n988e0f11d19c486fa3b3255f94c9b3bab6 "6" . +_:n988e0f11d19c486fa3b3255f94c9b3bab6 . + + _:n988e0f11d19c486fa3b3255f94c9b3bab7 . +_:n988e0f11d19c486fa3b3255f94c9b3bab7 "7" . +_:n988e0f11d19c486fa3b3255f94c9b3bab7 _:n988e0f11d19c486fa3b3255f94c9b3bab8 . +_:n988e0f11d19c486fa3b3255f94c9b3bab8 "8" . +_:n988e0f11d19c486fa3b3255f94c9b3bab8 _:n988e0f11d19c486fa3b3255f94c9b3bab9 . +_:n988e0f11d19c486fa3b3255f94c9b3bab9 "9" . +_:n988e0f11d19c486fa3b3255f94c9b3bab9 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl new file mode 100644 index 00000000..ca963e35 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md new file mode 100644 index 00000000..e9b1bf21 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md @@ -0,0 +1,61 @@ +## RMLTC-CC-0001-Seq + +**Title**: Generate a rdf:Seq as an object + +**Description**: Tests if a rdf:Seq is generated as an object + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Seq ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . + _:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . + _:nc808fbd2e11a4baa939c61c8210b5909b3 . + _:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/data.json b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/data.json new file mode 100644 index 00000000..147b8e51 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/data.json @@ -0,0 +1,26 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + }, + { + "id": "c", + "values": [ + "7", + "8", + "9" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/default.nq new file mode 100644 index 00000000..e0bf7de1 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/default.nq @@ -0,0 +1,15 @@ +_:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "5" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "2" . + _:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . + _:nc808fbd2e11a4baa939c61c8210b5909b3 . + _:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "4" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "3" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl new file mode 100644 index 00000000..2117ebdb --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Seq ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md new file mode 100644 index 00000000..287d8936 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md @@ -0,0 +1,62 @@ +## RMLTC-CC-0002-Bag + +**Title**: Generate a named rdf:Bag as an object + +**Description**: Tests if a named rdf:Bag is generated as an object + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + . + "7" . + "8" . + "2" . + . + . + "6" . + . + "9" . + "1" . + "3" . + "4" . + . + . + "5" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/data.json b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/data.json new file mode 100644 index 00000000..147b8e51 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/data.json @@ -0,0 +1,26 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + }, + { + "id": "c", + "values": [ + "7", + "8", + "9" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/default.nq new file mode 100644 index 00000000..8b5f9571 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/default.nq @@ -0,0 +1,15 @@ + . + "7" . + "8" . + "2" . + . + . + "6" . + . + "9" . + "1" . + "3" . + "4" . + . + . + "5" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl new file mode 100644 index 00000000..9924fa09 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md new file mode 100644 index 00000000..332832f9 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md @@ -0,0 +1,68 @@ +## RMLTC-CC-0002-List + +**Title**: Generate a named rdf:List as an object + +**Description**: Tests if a named rdf:List is generated as an object + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:nb73dd869d6bb47a5b865ee632fe27453b1 _:nb73dd869d6bb47a5b865ee632fe27453b2 . + . + "7" . +_:nb73dd869d6bb47a5b865ee632fe27453b5 "8" . +_:nb73dd869d6bb47a5b865ee632fe27453b3 _:nb73dd869d6bb47a5b865ee632fe27453b4 . +_:nb73dd869d6bb47a5b865ee632fe27453b6 . + . +_:nb73dd869d6bb47a5b865ee632fe27453b3 "5" . + _:nb73dd869d6bb47a5b865ee632fe27453b3 . +_:nb73dd869d6bb47a5b865ee632fe27453b4 "6" . +_:nb73dd869d6bb47a5b865ee632fe27453b4 . +_:nb73dd869d6bb47a5b865ee632fe27453b5 _:nb73dd869d6bb47a5b865ee632fe27453b6 . +_:nb73dd869d6bb47a5b865ee632fe27453b2 . +_:nb73dd869d6bb47a5b865ee632fe27453b1 "2" . +_:nb73dd869d6bb47a5b865ee632fe27453b2 "3" . + "4" . + _:nb73dd869d6bb47a5b865ee632fe27453b1 . + _:nb73dd869d6bb47a5b865ee632fe27453b5 . +_:nb73dd869d6bb47a5b865ee632fe27453b6 "9" . + . + "1" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/data.json b/src/test/resources/rml-cc/RMLTC-CC-0002-List/data.json new file mode 100644 index 00000000..147b8e51 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/data.json @@ -0,0 +1,26 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + }, + { + "id": "c", + "values": [ + "7", + "8", + "9" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0002-List/default.nq new file mode 100644 index 00000000..9f03fd79 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/default.nq @@ -0,0 +1,21 @@ +_:nb73dd869d6bb47a5b865ee632fe27453b1 _:nb73dd869d6bb47a5b865ee632fe27453b2 . + . + "7" . +_:nb73dd869d6bb47a5b865ee632fe27453b5 "8" . +_:nb73dd869d6bb47a5b865ee632fe27453b3 _:nb73dd869d6bb47a5b865ee632fe27453b4 . +_:nb73dd869d6bb47a5b865ee632fe27453b6 . + . +_:nb73dd869d6bb47a5b865ee632fe27453b3 "5" . + _:nb73dd869d6bb47a5b865ee632fe27453b3 . +_:nb73dd869d6bb47a5b865ee632fe27453b4 "6" . +_:nb73dd869d6bb47a5b865ee632fe27453b4 . +_:nb73dd869d6bb47a5b865ee632fe27453b5 _:nb73dd869d6bb47a5b865ee632fe27453b6 . +_:nb73dd869d6bb47a5b865ee632fe27453b2 . +_:nb73dd869d6bb47a5b865ee632fe27453b1 "2" . +_:nb73dd869d6bb47a5b865ee632fe27453b2 "3" . + "4" . + _:nb73dd869d6bb47a5b865ee632fe27453b1 . + _:nb73dd869d6bb47a5b865ee632fe27453b5 . +_:nb73dd869d6bb47a5b865ee632fe27453b6 "9" . + . + "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl new file mode 100644 index 00000000..77149652 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md new file mode 100644 index 00000000..f9fdbb84 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md @@ -0,0 +1,54 @@ +## RMLTC-CC-0003-EB + +**Title**: Allow the generation of empty bags + +**Description**: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:allowEmptyListAndContainer true ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:nfecac3cfe48c4afa99539cc809138e96b2 . + _:nfecac3cfe48c4afa99539cc809138e96b1 . +_:nfecac3cfe48c4afa99539cc809138e96b1 . +_:nfecac3cfe48c4afa99539cc809138e96b1 "1" . + _:nfecac3cfe48c4afa99539cc809138e96b2 . +_:nfecac3cfe48c4afa99539cc809138e96b1 "2" . +_:nfecac3cfe48c4afa99539cc809138e96b1 "3" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/default.nq new file mode 100644 index 00000000..5575c4f9 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/default.nq @@ -0,0 +1,7 @@ +_:nfecac3cfe48c4afa99539cc809138e96b2 . + _:nfecac3cfe48c4afa99539cc809138e96b1 . +_:nfecac3cfe48c4afa99539cc809138e96b1 . +_:nfecac3cfe48c4afa99539cc809138e96b1 "1" . + _:nfecac3cfe48c4afa99539cc809138e96b2 . +_:nfecac3cfe48c4afa99539cc809138e96b1 "2" . +_:nfecac3cfe48c4afa99539cc809138e96b1 "3" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl new file mode 100644 index 00000000..7ed744a7 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:allowEmptyListAndContainer true ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md new file mode 100644 index 00000000..e809d696 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md @@ -0,0 +1,56 @@ +## RMLTC-CC-0003-EL-BN + +**Title**: Allow the generation of empty lists identified by blank node identifiers. + +**Description**: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; rml:termType rml:BlankNode ; + rml:allowEmptyListAndContainer true ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n302eecc856b44ed5b76965d9be2f5213b3 . + . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . +_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . + _:n302eecc856b44ed5b76965d9be2f5213b1 . +_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/default.nq new file mode 100644 index 00000000..08797495 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/default.nq @@ -0,0 +1,8 @@ +_:n302eecc856b44ed5b76965d9be2f5213b3 . + . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . +_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . + _:n302eecc856b44ed5b76965d9be2f5213b1 . +_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl new file mode 100644 index 00000000..a3545827 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl @@ -0,0 +1,29 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; rml:termType rml:BlankNode ; + rml:allowEmptyListAndContainer true ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md new file mode 100644 index 00000000..49893b9b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md @@ -0,0 +1,56 @@ +## RMLTC-CC-0003-EL-Named + +**Title**: Allow the generation of empty lists identified by IRIs. + +**Description**: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:allowEmptyListAndContainer true ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n302eecc856b44ed5b76965d9be2f5213b3 . + . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . + _:n302eecc856b44ed5b76965d9be2f5213b2 . + . + "1" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/default.nq new file mode 100644 index 00000000..d357d49b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/default.nq @@ -0,0 +1,8 @@ +_:n302eecc856b44ed5b76965d9be2f5213b3 . + . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . + _:n302eecc856b44ed5b76965d9be2f5213b2 . + . + "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl new file mode 100644 index 00000000..8bed79e7 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl @@ -0,0 +1,29 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:allowEmptyListAndContainer true ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md new file mode 100644 index 00000000..27928980 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md @@ -0,0 +1,55 @@ +## RMLTC-CC-0003-EL + +**Title**: Allow the generation of empty lists + +**Description**: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:allowEmptyListAndContainer true ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n302eecc856b44ed5b76965d9be2f5213b3 . + . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . +_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . + _:n302eecc856b44ed5b76965d9be2f5213b1 . +_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/default.nq new file mode 100644 index 00000000..08797495 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/default.nq @@ -0,0 +1,8 @@ +_:n302eecc856b44ed5b76965d9be2f5213b3 . + . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . +_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . + _:n302eecc856b44ed5b76965d9be2f5213b1 . +_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl new file mode 100644 index 00000000..87f8919e --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:allowEmptyListAndContainer true ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md new file mode 100644 index 00000000..bbdfd65d --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md @@ -0,0 +1,51 @@ +## RMLTC-CC-0003-NEB + +**Title**: Empty bags are not generated + +**Description**: Tests if empty containers are not generated (expected default behavior). + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:n2bd72de9c571444081890e41009d92d4b1 . +_:n2bd72de9c571444081890e41009d92d4b1 "3" . +_:n2bd72de9c571444081890e41009d92d4b1 . +_:n2bd72de9c571444081890e41009d92d4b1 "2" . +_:n2bd72de9c571444081890e41009d92d4b1 "1" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/default.nq new file mode 100644 index 00000000..3d4d463e --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/default.nq @@ -0,0 +1,5 @@ + _:n2bd72de9c571444081890e41009d92d4b1 . +_:n2bd72de9c571444081890e41009d92d4b1 "3" . +_:n2bd72de9c571444081890e41009d92d4b1 . +_:n2bd72de9c571444081890e41009d92d4b1 "2" . +_:n2bd72de9c571444081890e41009d92d4b1 "1" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl new file mode 100644 index 00000000..20d9348f --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md new file mode 100644 index 00000000..b6d1a3d1 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md @@ -0,0 +1,53 @@ +## RMLTC-CC-0003-NEL + +**Title**: Empty lists are not generated + +**Description**: Tests if empty lists are not generated (expected default behavior). + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n434c2c54e09e4a259604ba1188ce038fb1 _:n434c2c54e09e4a259604ba1188ce038fb2 . +_:n434c2c54e09e4a259604ba1188ce038fb3 . +_:n434c2c54e09e4a259604ba1188ce038fb2 "2" . + _:n434c2c54e09e4a259604ba1188ce038fb1 . +_:n434c2c54e09e4a259604ba1188ce038fb2 _:n434c2c54e09e4a259604ba1188ce038fb3 . +_:n434c2c54e09e4a259604ba1188ce038fb1 "1" . +_:n434c2c54e09e4a259604ba1188ce038fb3 "3" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/default.nq new file mode 100644 index 00000000..5acbac25 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/default.nq @@ -0,0 +1,7 @@ +_:n434c2c54e09e4a259604ba1188ce038fb1 _:n434c2c54e09e4a259604ba1188ce038fb2 . +_:n434c2c54e09e4a259604ba1188ce038fb3 . +_:n434c2c54e09e4a259604ba1188ce038fb2 "2" . + _:n434c2c54e09e4a259604ba1188ce038fb1 . +_:n434c2c54e09e4a259604ba1188ce038fb2 _:n434c2c54e09e4a259604ba1188ce038fb3 . +_:n434c2c54e09e4a259604ba1188ce038fb1 "1" . +_:n434c2c54e09e4a259604ba1188ce038fb3 "3" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl new file mode 100644 index 00000000..ca963e35 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md new file mode 100644 index 00000000..51262015 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md @@ -0,0 +1,54 @@ +## RMLTC-CC-0003-NELb + +**Title**: Empty lists are not generated II + +**Description**: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:allowEmptyListAndContainer false ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n434c2c54e09e4a259604ba1188ce038fb1 _:n434c2c54e09e4a259604ba1188ce038fb2 . +_:n434c2c54e09e4a259604ba1188ce038fb3 . +_:n434c2c54e09e4a259604ba1188ce038fb2 "2" . + _:n434c2c54e09e4a259604ba1188ce038fb1 . +_:n434c2c54e09e4a259604ba1188ce038fb2 _:n434c2c54e09e4a259604ba1188ce038fb3 . +_:n434c2c54e09e4a259604ba1188ce038fb1 "1" . +_:n434c2c54e09e4a259604ba1188ce038fb3 "3" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/data.json b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/default.nq new file mode 100644 index 00000000..5acbac25 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/default.nq @@ -0,0 +1,7 @@ +_:n434c2c54e09e4a259604ba1188ce038fb1 _:n434c2c54e09e4a259604ba1188ce038fb2 . +_:n434c2c54e09e4a259604ba1188ce038fb3 . +_:n434c2c54e09e4a259604ba1188ce038fb2 "2" . + _:n434c2c54e09e4a259604ba1188ce038fb1 . +_:n434c2c54e09e4a259604ba1188ce038fb2 _:n434c2c54e09e4a259604ba1188ce038fb3 . +_:n434c2c54e09e4a259604ba1188ce038fb1 "1" . +_:n434c2c54e09e4a259604ba1188ce038fb3 "3" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl new file mode 100644 index 00000000..6da934ad --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:allowEmptyListAndContainer false ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md new file mode 100644 index 00000000..33d9a508 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md @@ -0,0 +1,59 @@ +## RMLTC-CC-0004-SM1 + +**Title**: GatherMap in subject map (list) + +**Description**: Tests if the use of a gather map in the subject map is supported. This test generates a list. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:createdBy ; + rml:object ex:JohnDoe ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n302eecc856b44ed5b76965d9be2f5213b1 . +_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . +_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . +_:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n1d393f12e993411498da676131f81ca4b1 . +_:n1d393f12e993411498da676131f81ca4b1 "4" . +_:n1d393f12e993411498da676131f81ca4b1 _:n1d393f12e993411498da676131f81ca4b2 . +_:n1d393f12e993411498da676131f81ca4b2 "5" . +_:n1d393f12e993411498da676131f81ca4b2 _:n1d393f12e993411498da676131f81ca4b3 . +_:n1d393f12e993411498da676131f81ca4b3 "6" . +_:n1d393f12e993411498da676131f81ca4b3 . + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/data.json new file mode 100644 index 00000000..7e67671c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/data.json @@ -0,0 +1,18 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/default.nq new file mode 100644 index 00000000..f2aca1cc --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/default.nq @@ -0,0 +1,14 @@ +_:n302eecc856b44ed5b76965d9be2f5213b1 . +_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . +_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . +_:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n1d393f12e993411498da676131f81ca4b1 . +_:n1d393f12e993411498da676131f81ca4b1 "4" . +_:n1d393f12e993411498da676131f81ca4b1 _:n1d393f12e993411498da676131f81ca4b2 . +_:n1d393f12e993411498da676131f81ca4b2 "5" . +_:n1d393f12e993411498da676131f81ca4b2 _:n1d393f12e993411498da676131f81ca4b3 . +_:n1d393f12e993411498da676131f81ca4b3 "6" . +_:n1d393f12e993411498da676131f81ca4b3 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl new file mode 100644 index 00000000..19eee717 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl @@ -0,0 +1,25 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:createdBy ; + rml:object ex:JohnDoe ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md new file mode 100644 index 00000000..a2a54a71 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md @@ -0,0 +1,52 @@ +## RMLTC-CC-0004-SM2 + +**Title**: GatherMap in subject map (list) + +**Description**: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . +_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . +_:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n1d393f12e993411498da676131f81ca4b1 "4" . +_:n1d393f12e993411498da676131f81ca4b1 _:n1d393f12e993411498da676131f81ca4b2 . +_:n1d393f12e993411498da676131f81ca4b2 "5" . +_:n1d393f12e993411498da676131f81ca4b2 _:n1d393f12e993411498da676131f81ca4b3 . +_:n1d393f12e993411498da676131f81ca4b3 "6" . +_:n1d393f12e993411498da676131f81ca4b3 . + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/data.json new file mode 100644 index 00000000..7e67671c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/data.json @@ -0,0 +1,18 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/default.nq new file mode 100644 index 00000000..bbde605c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/default.nq @@ -0,0 +1,12 @@ +_:n302eecc856b44ed5b76965d9be2f5213b1 "1" . +_:n302eecc856b44ed5b76965d9be2f5213b1 _:n302eecc856b44ed5b76965d9be2f5213b2 . +_:n302eecc856b44ed5b76965d9be2f5213b2 "2" . +_:n302eecc856b44ed5b76965d9be2f5213b2 _:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n302eecc856b44ed5b76965d9be2f5213b3 "3" . +_:n302eecc856b44ed5b76965d9be2f5213b3 . +_:n1d393f12e993411498da676131f81ca4b1 "4" . +_:n1d393f12e993411498da676131f81ca4b1 _:n1d393f12e993411498da676131f81ca4b2 . +_:n1d393f12e993411498da676131f81ca4b2 "5" . +_:n1d393f12e993411498da676131f81ca4b2 _:n1d393f12e993411498da676131f81ca4b3 . +_:n1d393f12e993411498da676131f81ca4b3 "6" . +_:n1d393f12e993411498da676131f81ca4b3 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl new file mode 100644 index 00000000..b0db209a --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl @@ -0,0 +1,20 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md new file mode 100644 index 00000000..ef82ce64 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md @@ -0,0 +1,45 @@ +## RMLTC-CC-0004-SM3 + +**Title**: GatherMap in subject map (list) + +**Description**: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 "1" . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 "3" . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 "2" . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/default.nq new file mode 100644 index 00000000..738b922b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/default.nq @@ -0,0 +1,6 @@ +_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 "1" . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 "3" . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 "2" . +_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl new file mode 100644 index 00000000..b0db209a --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl @@ -0,0 +1,20 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md new file mode 100644 index 00000000..d3c43302 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md @@ -0,0 +1,54 @@ +## RMLTC-CC-0004-SM4 + +**Title**: GatherMap in subject map (bag) + +**Description**: Tests if the use of a gather map in the subject map is supported. This test generates a bag. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:createdBy ; + rml:object ex:JohnDoe ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n1d393f12e993411498da676131f81ca4b1 "2" . +_:n1d393f12e993411498da676131f81ca4b2 "5" . +_:n1d393f12e993411498da676131f81ca4b1 "1" . +_:n1d393f12e993411498da676131f81ca4b2 . +_:n1d393f12e993411498da676131f81ca4b2 . +_:n1d393f12e993411498da676131f81ca4b1 "3" . +_:n1d393f12e993411498da676131f81ca4b2 "4" . +_:n1d393f12e993411498da676131f81ca4b1 . +_:n1d393f12e993411498da676131f81ca4b1 . +_:n1d393f12e993411498da676131f81ca4b2 "6" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/data.json new file mode 100644 index 00000000..7e67671c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/data.json @@ -0,0 +1,18 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [ + "4", + "5", + "6" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/default.nq new file mode 100644 index 00000000..31ab141d --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/default.nq @@ -0,0 +1,10 @@ +_:n1d393f12e993411498da676131f81ca4b1 "2" . +_:n1d393f12e993411498da676131f81ca4b2 "5" . +_:n1d393f12e993411498da676131f81ca4b1 "1" . +_:n1d393f12e993411498da676131f81ca4b2 . +_:n1d393f12e993411498da676131f81ca4b2 . +_:n1d393f12e993411498da676131f81ca4b1 "3" . +_:n1d393f12e993411498da676131f81ca4b2 "4" . +_:n1d393f12e993411498da676131f81ca4b1 . +_:n1d393f12e993411498da676131f81ca4b1 . +_:n1d393f12e993411498da676131f81ca4b2 "6" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl new file mode 100644 index 00000000..a6f85e5e --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl @@ -0,0 +1,25 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:createdBy ; + rml:object ex:JohnDoe ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md new file mode 100644 index 00000000..df0571be --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md @@ -0,0 +1,43 @@ +## RMLTC-CC-0004-SM5 + +**Title**: GatherMap in subject map (bag) + +**Description**: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt). + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:ne32066984b71404a953025d001cd3cdfb1 . +_:ne32066984b71404a953025d001cd3cdfb1 "2" . +_:ne32066984b71404a953025d001cd3cdfb1 "1" . +_:ne32066984b71404a953025d001cd3cdfb1 "3" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/data.json b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/data.json new file mode 100644 index 00000000..f7975acd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/data.json @@ -0,0 +1,14 @@ +[ + { + "id": "a", + "values": [ + "1", + "2", + "3" + ] + }, + { + "id": "b", + "values": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/default.nq new file mode 100644 index 00000000..65c2c2c3 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/default.nq @@ -0,0 +1,4 @@ +_:ne32066984b71404a953025d001cd3cdfb1 . +_:ne32066984b71404a953025d001cd3cdfb1 "2" . +_:ne32066984b71404a953025d001cd3cdfb1 "1" . +_:ne32066984b71404a953025d001cd3cdfb1 "3" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl new file mode 100644 index 00000000..b8cbc6a9 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl @@ -0,0 +1,20 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md new file mode 100644 index 00000000..d33ee77c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md @@ -0,0 +1,63 @@ +## RMLTC-CC-0005-App1 + +**Title**: Append values of multiple term maps + +**Description**: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:n1ee4a5a2b1344422919d171ab2cd6c39b1 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b1 "1" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b1 _:n1ee4a5a2b1344422919d171ab2cd6c39b2 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b2 "2" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b2 _:n1ee4a5a2b1344422919d171ab2cd6c39b4 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b4 "a" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b4 _:n1ee4a5a2b1344422919d171ab2cd6c39b5 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b5 "b" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b5 . + _:n1ee4a5a2b1344422919d171ab2cd6c39b6 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b6 "3" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b6 _:n1ee4a5a2b1344422919d171ab2cd6c39b7 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b7 "4" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b7 _:n1ee4a5a2b1344422919d171ab2cd6c39b8 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b8 "c" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b8 . + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/data.json b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/data.json new file mode 100644 index 00000000..f0feba6b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ], + "v2": [ + "a", + "b" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ], + "v2": [ + "c" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/default.nq new file mode 100644 index 00000000..7fe03c50 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/default.nq @@ -0,0 +1,16 @@ + _:n1ee4a5a2b1344422919d171ab2cd6c39b1 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b1 "1" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b1 _:n1ee4a5a2b1344422919d171ab2cd6c39b2 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b2 "2" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b2 _:n1ee4a5a2b1344422919d171ab2cd6c39b4 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b4 "a" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b4 _:n1ee4a5a2b1344422919d171ab2cd6c39b5 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b5 "b" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b5 . + _:n1ee4a5a2b1344422919d171ab2cd6c39b6 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b6 "3" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b6 _:n1ee4a5a2b1344422919d171ab2cd6c39b7 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b7 "4" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b7 _:n1ee4a5a2b1344422919d171ab2cd6c39b8 . +_:n1ee4a5a2b1344422919d171ab2cd6c39b8 "c" . +_:n1ee4a5a2b1344422919d171ab2cd6c39b8 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl new file mode 100644 index 00000000..b8b8b2f4 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md new file mode 100644 index 00000000..b2d8ef6b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md @@ -0,0 +1,64 @@ +## RMLTC-CC-0005-App2 + +**Title**: Append values of multiple term maps + +**Description**: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:n1d9b8ef217cb44f299a062d746116deab1 _:n1d9b8ef217cb44f299a062d746116deab2 . +_:n1d9b8ef217cb44f299a062d746116deab5 "b" . +_:n1d9b8ef217cb44f299a062d746116deab4 _:n1d9b8ef217cb44f299a062d746116deab5 . +_:n1d9b8ef217cb44f299a062d746116deab3 _:n1d9b8ef217cb44f299a062d746116deab4 . +_:n1d9b8ef217cb44f299a062d746116deab7 "5" . +_:n1d9b8ef217cb44f299a062d746116deab2 "2" . +_:n1d9b8ef217cb44f299a062d746116deab8 "6" . +_:n1d9b8ef217cb44f299a062d746116deab8 . +_:n1d9b8ef217cb44f299a062d746116deab3 "3" . +_:n1d9b8ef217cb44f299a062d746116deab4 "a" . +_:n1d9b8ef217cb44f299a062d746116deab5 . +_:n1d9b8ef217cb44f299a062d746116deab2 _:n1d9b8ef217cb44f299a062d746116deab3 . +_:n1d9b8ef217cb44f299a062d746116deab1 "1" . + _:n1d9b8ef217cb44f299a062d746116deab1 . + _:n1d9b8ef217cb44f299a062d746116deab6 . +_:n1d9b8ef217cb44f299a062d746116deab7 _:n1d9b8ef217cb44f299a062d746116deab8 . +_:n1d9b8ef217cb44f299a062d746116deab6 _:n1d9b8ef217cb44f299a062d746116deab7 . +_:n1d9b8ef217cb44f299a062d746116deab6 "4" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/data.json b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/data.json new file mode 100644 index 00000000..520fa6fd --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2", + "3" + ], + "v2": [ + "a", + "b" + ] + }, + { + "id": "b", + "v1": [ + "4", + "5", + "6" + ], + "v2": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/default.nq new file mode 100644 index 00000000..90196c4e --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/default.nq @@ -0,0 +1,18 @@ +_:n1d9b8ef217cb44f299a062d746116deab1 _:n1d9b8ef217cb44f299a062d746116deab2 . +_:n1d9b8ef217cb44f299a062d746116deab5 "b" . +_:n1d9b8ef217cb44f299a062d746116deab4 _:n1d9b8ef217cb44f299a062d746116deab5 . +_:n1d9b8ef217cb44f299a062d746116deab3 _:n1d9b8ef217cb44f299a062d746116deab4 . +_:n1d9b8ef217cb44f299a062d746116deab7 "5" . +_:n1d9b8ef217cb44f299a062d746116deab2 "2" . +_:n1d9b8ef217cb44f299a062d746116deab8 "6" . +_:n1d9b8ef217cb44f299a062d746116deab8 . +_:n1d9b8ef217cb44f299a062d746116deab3 "3" . +_:n1d9b8ef217cb44f299a062d746116deab4 "a" . +_:n1d9b8ef217cb44f299a062d746116deab5 . +_:n1d9b8ef217cb44f299a062d746116deab2 _:n1d9b8ef217cb44f299a062d746116deab3 . +_:n1d9b8ef217cb44f299a062d746116deab1 "1" . + _:n1d9b8ef217cb44f299a062d746116deab1 . + _:n1d9b8ef217cb44f299a062d746116deab6 . +_:n1d9b8ef217cb44f299a062d746116deab7 _:n1d9b8ef217cb44f299a062d746116deab8 . +_:n1d9b8ef217cb44f299a062d746116deab6 _:n1d9b8ef217cb44f299a062d746116deab7 . +_:n1d9b8ef217cb44f299a062d746116deab6 "4" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl new file mode 100644 index 00000000..b8b8b2f4 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md new file mode 100644 index 00000000..a135240f --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md @@ -0,0 +1,82 @@ +## RMLTC-CC-0005-Car1 + +**Title**: Cartesian product of values from multiple term maps of a gather map. + +**Description**: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + rml:strategy rml:cartesianProduct ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:nfc398e5692654ca98dfb3fb5432d277cb1 . +_:nfc398e5692654ca98dfb3fb5432d277cb1 "1" . +_:nfc398e5692654ca98dfb3fb5432d277cb1 _:nfc398e5692654ca98dfb3fb5432d277cb2 . +_:nfc398e5692654ca98dfb3fb5432d277cb2 . +_:nfc398e5692654ca98dfb3fb5432d277cb2 "a" . + + _:nfc398e5692654ca98dfb3fb5432d277cb3 . +_:nfc398e5692654ca98dfb3fb5432d277cb3 "1" . +_:nfc398e5692654ca98dfb3fb5432d277cb3 _:nfc398e5692654ca98dfb3fb5432d277cb4 . +_:nfc398e5692654ca98dfb3fb5432d277cb4 "b" . +_:nfc398e5692654ca98dfb3fb5432d277cb4 . + + _:nfc398e5692654ca98dfb3fb5432d277cb5 . +_:nfc398e5692654ca98dfb3fb5432d277cb5 "2" . +_:nfc398e5692654ca98dfb3fb5432d277cb5 _:nfc398e5692654ca98dfb3fb5432d277cb6 . +_:nfc398e5692654ca98dfb3fb5432d277cb6 "a" . +_:nfc398e5692654ca98dfb3fb5432d277cb6 . + + _:nfc398e5692654ca98dfb3fb5432d277cb7 . +_:nfc398e5692654ca98dfb3fb5432d277cb7 "2" . +_:nfc398e5692654ca98dfb3fb5432d277cb7 _:nfc398e5692654ca98dfb3fb5432d277cb8 . +_:nfc398e5692654ca98dfb3fb5432d277cb8 "b" . +_:nfc398e5692654ca98dfb3fb5432d277cb8 . + + _:nfc398e5692654ca98dfb3fb5432d277cb9 . +_:nfc398e5692654ca98dfb3fb5432d277cb9 "3" . +_:nfc398e5692654ca98dfb3fb5432d277cb9 _:nfc398e5692654ca98dfb3fb5432d277cb10 . +_:nfc398e5692654ca98dfb3fb5432d277cb10 "c" . +_:nfc398e5692654ca98dfb3fb5432d277cb10 . + + _:nfc398e5692654ca98dfb3fb5432d277cb11 . +_:nfc398e5692654ca98dfb3fb5432d277cb11 "4" . +_:nfc398e5692654ca98dfb3fb5432d277cb11 _:nfc398e5692654ca98dfb3fb5432d277cb12 . +_:nfc398e5692654ca98dfb3fb5432d277cb12 "c" . +_:nfc398e5692654ca98dfb3fb5432d277cb12 . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/data.json b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/data.json new file mode 100644 index 00000000..f0feba6b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ], + "v2": [ + "a", + "b" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ], + "v2": [ + "c" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/default.nq new file mode 100644 index 00000000..08d0c5e1 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/default.nq @@ -0,0 +1,35 @@ + _:nfc398e5692654ca98dfb3fb5432d277cb1 . +_:nfc398e5692654ca98dfb3fb5432d277cb1 "1" . +_:nfc398e5692654ca98dfb3fb5432d277cb1 _:nfc398e5692654ca98dfb3fb5432d277cb2 . +_:nfc398e5692654ca98dfb3fb5432d277cb2 . +_:nfc398e5692654ca98dfb3fb5432d277cb2 "a" . + + _:nfc398e5692654ca98dfb3fb5432d277cb3 . +_:nfc398e5692654ca98dfb3fb5432d277cb3 "1" . +_:nfc398e5692654ca98dfb3fb5432d277cb3 _:nfc398e5692654ca98dfb3fb5432d277cb4 . +_:nfc398e5692654ca98dfb3fb5432d277cb4 "b" . +_:nfc398e5692654ca98dfb3fb5432d277cb4 . + + _:nfc398e5692654ca98dfb3fb5432d277cb5 . +_:nfc398e5692654ca98dfb3fb5432d277cb5 "2" . +_:nfc398e5692654ca98dfb3fb5432d277cb5 _:nfc398e5692654ca98dfb3fb5432d277cb6 . +_:nfc398e5692654ca98dfb3fb5432d277cb6 "a" . +_:nfc398e5692654ca98dfb3fb5432d277cb6 . + + _:nfc398e5692654ca98dfb3fb5432d277cb7 . +_:nfc398e5692654ca98dfb3fb5432d277cb7 "2" . +_:nfc398e5692654ca98dfb3fb5432d277cb7 _:nfc398e5692654ca98dfb3fb5432d277cb8 . +_:nfc398e5692654ca98dfb3fb5432d277cb8 "b" . +_:nfc398e5692654ca98dfb3fb5432d277cb8 . + + _:nfc398e5692654ca98dfb3fb5432d277cb9 . +_:nfc398e5692654ca98dfb3fb5432d277cb9 "3" . +_:nfc398e5692654ca98dfb3fb5432d277cb9 _:nfc398e5692654ca98dfb3fb5432d277cb10 . +_:nfc398e5692654ca98dfb3fb5432d277cb10 "c" . +_:nfc398e5692654ca98dfb3fb5432d277cb10 . + + _:nfc398e5692654ca98dfb3fb5432d277cb11 . +_:nfc398e5692654ca98dfb3fb5432d277cb11 "4" . +_:nfc398e5692654ca98dfb3fb5432d277cb11 _:nfc398e5692654ca98dfb3fb5432d277cb12 . +_:nfc398e5692654ca98dfb3fb5432d277cb12 "c" . +_:nfc398e5692654ca98dfb3fb5432d277cb12 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl new file mode 100644 index 00000000..6a91a0db --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + rml:strategy rml:cartesianProduct ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md new file mode 100644 index 00000000..0b98d32c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md @@ -0,0 +1,70 @@ +## RMLTC-CC-0005-Car2 + +**Title**: Cartesian product of values from multiple term maps of a gather map. + +**Description**: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + rml:strategy rml:cartesianProduct ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:nfc398e5692654ca98dfb3fb5432d277cb1 . +_:nfc398e5692654ca98dfb3fb5432d277cb1 "1" . +_:nfc398e5692654ca98dfb3fb5432d277cb1 _:nfc398e5692654ca98dfb3fb5432d277cb2 . +_:nfc398e5692654ca98dfb3fb5432d277cb2 . +_:nfc398e5692654ca98dfb3fb5432d277cb2 "a" . + + _:nfc398e5692654ca98dfb3fb5432d277cb3 . +_:nfc398e5692654ca98dfb3fb5432d277cb3 "1" . +_:nfc398e5692654ca98dfb3fb5432d277cb3 _:nfc398e5692654ca98dfb3fb5432d277cb4 . +_:nfc398e5692654ca98dfb3fb5432d277cb4 "b" . +_:nfc398e5692654ca98dfb3fb5432d277cb4 . + + _:nfc398e5692654ca98dfb3fb5432d277cb5 . +_:nfc398e5692654ca98dfb3fb5432d277cb5 "2" . +_:nfc398e5692654ca98dfb3fb5432d277cb5 _:nfc398e5692654ca98dfb3fb5432d277cb6 . +_:nfc398e5692654ca98dfb3fb5432d277cb6 "a" . +_:nfc398e5692654ca98dfb3fb5432d277cb6 . + + _:nfc398e5692654ca98dfb3fb5432d277cb7 . +_:nfc398e5692654ca98dfb3fb5432d277cb7 "2" . +_:nfc398e5692654ca98dfb3fb5432d277cb7 _:nfc398e5692654ca98dfb3fb5432d277cb8 . +_:nfc398e5692654ca98dfb3fb5432d277cb8 "b" . +_:nfc398e5692654ca98dfb3fb5432d277cb8 . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/data.json b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/data.json new file mode 100644 index 00000000..0f90f8b0 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/data.json @@ -0,0 +1,21 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ], + "v2": [ + "a", + "b" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ], + "v2": [] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/default.nq new file mode 100644 index 00000000..b13c08de --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/default.nq @@ -0,0 +1,23 @@ + _:nfc398e5692654ca98dfb3fb5432d277cb1 . +_:nfc398e5692654ca98dfb3fb5432d277cb1 "1" . +_:nfc398e5692654ca98dfb3fb5432d277cb1 _:nfc398e5692654ca98dfb3fb5432d277cb2 . +_:nfc398e5692654ca98dfb3fb5432d277cb2 . +_:nfc398e5692654ca98dfb3fb5432d277cb2 "a" . + + _:nfc398e5692654ca98dfb3fb5432d277cb3 . +_:nfc398e5692654ca98dfb3fb5432d277cb3 "1" . +_:nfc398e5692654ca98dfb3fb5432d277cb3 _:nfc398e5692654ca98dfb3fb5432d277cb4 . +_:nfc398e5692654ca98dfb3fb5432d277cb4 "b" . +_:nfc398e5692654ca98dfb3fb5432d277cb4 . + + _:nfc398e5692654ca98dfb3fb5432d277cb5 . +_:nfc398e5692654ca98dfb3fb5432d277cb5 "2" . +_:nfc398e5692654ca98dfb3fb5432d277cb5 _:nfc398e5692654ca98dfb3fb5432d277cb6 . +_:nfc398e5692654ca98dfb3fb5432d277cb6 "a" . +_:nfc398e5692654ca98dfb3fb5432d277cb6 . + + _:nfc398e5692654ca98dfb3fb5432d277cb7 . +_:nfc398e5692654ca98dfb3fb5432d277cb7 "2" . +_:nfc398e5692654ca98dfb3fb5432d277cb7 _:nfc398e5692654ca98dfb3fb5432d277cb8 . +_:nfc398e5692654ca98dfb3fb5432d277cb8 "b" . +_:nfc398e5692654ca98dfb3fb5432d277cb8 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl new file mode 100644 index 00000000..6a91a0db --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + rml:strategy rml:cartesianProduct ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md new file mode 100644 index 00000000..8d6caf6e --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md @@ -0,0 +1,63 @@ +## RMLTC-CC-0006-IT0 + +**Title**: Gather values across iterations to create a collection. + +**Description**: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:n9d785cd672d3484cb5d9fd831e6dfc07b1 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b1 "1" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b1 _:n9d785cd672d3484cb5d9fd831e6dfc07b2 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b2 "2" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b2 . + + _:n9d785cd672d3484cb5d9fd831e6dfc07b5 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b5 "3" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b5 _:n9d785cd672d3484cb5d9fd831e6dfc07b6 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b6 "4" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b6 . + + _:n9d785cd672d3484cb5d9fd831e6dfc07b3 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b3 "5" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b3 _:n9d785cd672d3484cb5d9fd831e6dfc07b4 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b4 "6" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b4 . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/data.json new file mode 100644 index 00000000..a17afe2c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ] + }, + { + "id": "a", + "v1": [ + "5", + "6" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/default.nq new file mode 100644 index 00000000..0a2aebe1 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/default.nq @@ -0,0 +1,17 @@ + _:n9d785cd672d3484cb5d9fd831e6dfc07b1 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b1 "1" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b1 _:n9d785cd672d3484cb5d9fd831e6dfc07b2 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b2 "2" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b2 . + + _:n9d785cd672d3484cb5d9fd831e6dfc07b5 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b5 "3" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b5 _:n9d785cd672d3484cb5d9fd831e6dfc07b6 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b6 "4" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b6 . + + _:n9d785cd672d3484cb5d9fd831e6dfc07b3 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b3 "5" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b3 _:n9d785cd672d3484cb5d9fd831e6dfc07b4 . +_:n9d785cd672d3484cb5d9fd831e6dfc07b4 "6" . +_:n9d785cd672d3484cb5d9fd831e6dfc07b4 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl new file mode 100644 index 00000000..0a156f5c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md new file mode 100644 index 00000000..81bf7f13 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md @@ -0,0 +1,63 @@ +## RMLTC-CC-0006-IT1 + +**Title**: Gather values across iterations to create a collection. + +**Description**: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + . + "1" . + _:nab8f496caee443c5ac19ce3a109f4b22b1 . +_:nab8f496caee443c5ac19ce3a109f4b22b1 "2" . +_:nab8f496caee443c5ac19ce3a109f4b22b1 _:nab8f496caee443c5ac19ce3a109f4b22b2 . +_:nab8f496caee443c5ac19ce3a109f4b22b2 "5" . +_:nab8f496caee443c5ac19ce3a109f4b22b2 _:nab8f496caee443c5ac19ce3a109f4b22b3 . +_:nab8f496caee443c5ac19ce3a109f4b22b3 "6" . +_:nab8f496caee443c5ac19ce3a109f4b22b3 . + + . + "3" . + _:nab8f496caee443c5ac19ce3a109f4b22b4 . +_:nab8f496caee443c5ac19ce3a109f4b22b4 "4" . +_:nab8f496caee443c5ac19ce3a109f4b22b4 . + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/data.json new file mode 100644 index 00000000..a17afe2c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ] + }, + { + "id": "a", + "v1": [ + "5", + "6" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/default.nq new file mode 100644 index 00000000..40500379 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/default.nq @@ -0,0 +1,15 @@ + . + "1" . + _:nab8f496caee443c5ac19ce3a109f4b22b1 . +_:nab8f496caee443c5ac19ce3a109f4b22b1 "2" . +_:nab8f496caee443c5ac19ce3a109f4b22b1 _:nab8f496caee443c5ac19ce3a109f4b22b2 . +_:nab8f496caee443c5ac19ce3a109f4b22b2 "5" . +_:nab8f496caee443c5ac19ce3a109f4b22b2 _:nab8f496caee443c5ac19ce3a109f4b22b3 . +_:nab8f496caee443c5ac19ce3a109f4b22b3 "6" . +_:nab8f496caee443c5ac19ce3a109f4b22b3 . + + . + "3" . + _:nab8f496caee443c5ac19ce3a109f4b22b4 . +_:nab8f496caee443c5ac19ce3a109f4b22b4 "4" . +_:nab8f496caee443c5ac19ce3a109f4b22b4 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl new file mode 100644 index 00000000..847277ca --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md new file mode 100644 index 00000000..aed94f81 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md @@ -0,0 +1,73 @@ +## RMLTC-CC-0006-IT2 + +**Title**: Gather values across iterations to create a collection. + +**Description**: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + . + "1" . + _:n0cbb21ce98464358963007f95dc35c0ab1 . +_:n0cbb21ce98464358963007f95dc35c0ab1 "2" . +_:n0cbb21ce98464358963007f95dc35c0ab1 _:n0cbb21ce98464358963007f95dc35c0ab2 . +_:n0cbb21ce98464358963007f95dc35c0ab2 "a" . +_:n0cbb21ce98464358963007f95dc35c0ab2 _:n0cbb21ce98464358963007f95dc35c0ab3 . +_:n0cbb21ce98464358963007f95dc35c0ab3 "b" . +_:n0cbb21ce98464358963007f95dc35c0ab3 _:n0cbb21ce98464358963007f95dc35c0ab4 . +_:n0cbb21ce98464358963007f95dc35c0ab4 "5" . +_:n0cbb21ce98464358963007f95dc35c0ab4 _:n0cbb21ce98464358963007f95dc35c0ab5 . +_:n0cbb21ce98464358963007f95dc35c0ab5 "6" . +_:n0cbb21ce98464358963007f95dc35c0ab5 _:n0cbb21ce98464358963007f95dc35c0ab6 . +_:n0cbb21ce98464358963007f95dc35c0ab6 "d" . +_:n0cbb21ce98464358963007f95dc35c0ab6 _:n0cbb21ce98464358963007f95dc35c0ab7 . +_:n0cbb21ce98464358963007f95dc35c0ab7 "e" . +_:n0cbb21ce98464358963007f95dc35c0ab7 . + + . + "3" . + _:n0cbb21ce98464358963007f95dc35c0ab8 . +_:n0cbb21ce98464358963007f95dc35c0ab8 "4" . +_:n0cbb21ce98464358963007f95dc35c0ab8 _:n0cbb21ce98464358963007f95dc35c0ab9 . +_:n0cbb21ce98464358963007f95dc35c0ab9 "c" . +_:n0cbb21ce98464358963007f95dc35c0ab9 . + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/data.json new file mode 100644 index 00000000..ab3d8c52 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/data.json @@ -0,0 +1,34 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ], + "v2": [ + "a", + "b" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ], + "v2": [ + "c" + ] + }, + { + "id": "a", + "v1": [ + "5", + "6" + ], + "v2": [ + "d", + "e" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/default.nq new file mode 100644 index 00000000..d66af6fb --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/default.nq @@ -0,0 +1,25 @@ + . + "1" . + _:n0cbb21ce98464358963007f95dc35c0ab1 . +_:n0cbb21ce98464358963007f95dc35c0ab1 "2" . +_:n0cbb21ce98464358963007f95dc35c0ab1 _:n0cbb21ce98464358963007f95dc35c0ab2 . +_:n0cbb21ce98464358963007f95dc35c0ab2 "a" . +_:n0cbb21ce98464358963007f95dc35c0ab2 _:n0cbb21ce98464358963007f95dc35c0ab3 . +_:n0cbb21ce98464358963007f95dc35c0ab3 "b" . +_:n0cbb21ce98464358963007f95dc35c0ab3 _:n0cbb21ce98464358963007f95dc35c0ab4 . +_:n0cbb21ce98464358963007f95dc35c0ab4 "5" . +_:n0cbb21ce98464358963007f95dc35c0ab4 _:n0cbb21ce98464358963007f95dc35c0ab5 . +_:n0cbb21ce98464358963007f95dc35c0ab5 "6" . +_:n0cbb21ce98464358963007f95dc35c0ab5 _:n0cbb21ce98464358963007f95dc35c0ab6 . +_:n0cbb21ce98464358963007f95dc35c0ab6 "d" . +_:n0cbb21ce98464358963007f95dc35c0ab6 _:n0cbb21ce98464358963007f95dc35c0ab7 . +_:n0cbb21ce98464358963007f95dc35c0ab7 "e" . +_:n0cbb21ce98464358963007f95dc35c0ab7 . + + . + "3" . + _:n0cbb21ce98464358963007f95dc35c0ab8 . +_:n0cbb21ce98464358963007f95dc35c0ab8 "4" . +_:n0cbb21ce98464358963007f95dc35c0ab8 _:n0cbb21ce98464358963007f95dc35c0ab9 . +_:n0cbb21ce98464358963007f95dc35c0ab9 "c" . +_:n0cbb21ce98464358963007f95dc35c0ab9 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl new file mode 100644 index 00000000..14e90fed --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md new file mode 100644 index 00000000..4dac7a04 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md @@ -0,0 +1,60 @@ +## RMLTC-CC-0006-IT3 + +**Title**: Gather values across iterations to create a container. + +**Description**: When no template, constant, or reference is given to a gather map, then each iteration yields a different container. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:a . +_:a . +_:a "1" . +_:a "2" . + + _:b . +_:b . +_:b "3" . +_:b "4" . + + _:c . +_:c . +_:c "5" . +_:c "6" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/data.json new file mode 100644 index 00000000..a17afe2c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ] + }, + { + "id": "a", + "v1": [ + "5", + "6" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/default.nq new file mode 100644 index 00000000..4141428b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/default.nq @@ -0,0 +1,14 @@ + _:a . +_:a . +_:a "1" . +_:a "2" . + + _:b . +_:b . +_:b "3" . +_:b "4" . + + _:c . +_:c . +_:c "5" . +_:c "6" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl new file mode 100644 index 00000000..09f6a13d --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md new file mode 100644 index 00000000..8478c6ae --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md @@ -0,0 +1,58 @@ +## RMLTC-CC-0006-IT4 + +**Title**: Gather values across iterations to create a container. + +**Description**: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + . + . + "1" . + "2" . + "5" . + "6" . + + . + . + "3" . + "4" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/data.json new file mode 100644 index 00000000..a17afe2c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ] + }, + { + "id": "a", + "v1": [ + "5", + "6" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/default.nq new file mode 100644 index 00000000..008e8e52 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/default.nq @@ -0,0 +1,11 @@ + . + . + "1" . + "2" . + "5" . + "6" . + + . + . + "3" . + "4" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl new file mode 100644 index 00000000..e47599b5 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md new file mode 100644 index 00000000..7cd91a0e --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md @@ -0,0 +1,63 @@ +## RMLTC-CC-0006-IT5 + +**Title**: Gather values across iterations to create a container. + +**Description**: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + . + . + "1" . + "2" . + "a" . + "b" . + "5" . + "6" . + "d" . + "e" . + + . + . + "3" . + "4" . + "c" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/data.json b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/data.json new file mode 100644 index 00000000..ab3d8c52 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/data.json @@ -0,0 +1,34 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ], + "v2": [ + "a", + "b" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ], + "v2": [ + "c" + ] + }, + { + "id": "a", + "v1": [ + "5", + "6" + ], + "v2": [ + "d", + "e" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/default.nq new file mode 100644 index 00000000..19c6f4cc --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/default.nq @@ -0,0 +1,16 @@ + . + . + "1" . + "2" . + "a" . + "b" . + "5" . + "6" . + "d" . + "e" . + + . + . + "3" . + "4" . + "c" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl new file mode 100644 index 00000000..fbd5b088 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:template "c/{$.id}" ; + rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md new file mode 100644 index 00000000..4d660585 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md @@ -0,0 +1,85 @@ +## RMLTC-CC-0007-NES + +**Title**: Nested gather maps + +**Description**: Testing whether nested gather maps are created. The mapping should generate a list of bags. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( + [ + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] + [ + rml:gather ( [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] + ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:nab9af1206e584ab2afd457e8a605872cb1 . +_:nab9af1206e584ab2afd457e8a605872cb1 "1" . +_:nab9af1206e584ab2afd457e8a605872cb1 "2" . + +_:nab9af1206e584ab2afd457e8a605872cb2 . +_:nab9af1206e584ab2afd457e8a605872cb2 "a" . +_:nab9af1206e584ab2afd457e8a605872cb2 "b" . + +_:nab9af1206e584ab2afd457e8a605872cb5 . +_:nab9af1206e584ab2afd457e8a605872cb5 "3" . +_:nab9af1206e584ab2afd457e8a605872cb5 "4" . + +_:nab9af1206e584ab2afd457e8a605872cb6 . +_:nab9af1206e584ab2afd457e8a605872cb6 "c" . + + _:nab9af1206e584ab2afd457e8a605872cb3 . +_:nab9af1206e584ab2afd457e8a605872cb3 _:nab9af1206e584ab2afd457e8a605872cb1 . +_:nab9af1206e584ab2afd457e8a605872cb3 _:nab9af1206e584ab2afd457e8a605872cb4 . + +_:nab9af1206e584ab2afd457e8a605872cb4 _:nab9af1206e584ab2afd457e8a605872cb2 . +_:nab9af1206e584ab2afd457e8a605872cb4 . + + _:nab9af1206e584ab2afd457e8a605872cb7 . +_:nab9af1206e584ab2afd457e8a605872cb7 _:nab9af1206e584ab2afd457e8a605872cb5 . +_:nab9af1206e584ab2afd457e8a605872cb7 _:nab9af1206e584ab2afd457e8a605872cb8 . + +_:nab9af1206e584ab2afd457e8a605872cb8 _:nab9af1206e584ab2afd457e8a605872cb6 . +_:nab9af1206e584ab2afd457e8a605872cb8 . + + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/data.json b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/data.json new file mode 100644 index 00000000..f0feba6b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "v1": [ + "1", + "2" + ], + "v2": [ + "a", + "b" + ] + }, + { + "id": "b", + "v1": [ + "3", + "4" + ], + "v2": [ + "c" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/default.nq new file mode 100644 index 00000000..cdfac164 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/default.nq @@ -0,0 +1,29 @@ +_:nab9af1206e584ab2afd457e8a605872cb1 . +_:nab9af1206e584ab2afd457e8a605872cb1 "1" . +_:nab9af1206e584ab2afd457e8a605872cb1 "2" . + +_:nab9af1206e584ab2afd457e8a605872cb2 . +_:nab9af1206e584ab2afd457e8a605872cb2 "a" . +_:nab9af1206e584ab2afd457e8a605872cb2 "b" . + +_:nab9af1206e584ab2afd457e8a605872cb5 . +_:nab9af1206e584ab2afd457e8a605872cb5 "3" . +_:nab9af1206e584ab2afd457e8a605872cb5 "4" . + +_:nab9af1206e584ab2afd457e8a605872cb6 . +_:nab9af1206e584ab2afd457e8a605872cb6 "c" . + + _:nab9af1206e584ab2afd457e8a605872cb3 . +_:nab9af1206e584ab2afd457e8a605872cb3 _:nab9af1206e584ab2afd457e8a605872cb1 . +_:nab9af1206e584ab2afd457e8a605872cb3 _:nab9af1206e584ab2afd457e8a605872cb4 . + +_:nab9af1206e584ab2afd457e8a605872cb4 _:nab9af1206e584ab2afd457e8a605872cb2 . +_:nab9af1206e584ab2afd457e8a605872cb4 . + + _:nab9af1206e584ab2afd457e8a605872cb7 . +_:nab9af1206e584ab2afd457e8a605872cb7 _:nab9af1206e584ab2afd457e8a605872cb5 . +_:nab9af1206e584ab2afd457e8a605872cb7 _:nab9af1206e584ab2afd457e8a605872cb8 . + +_:nab9af1206e584ab2afd457e8a605872cb8 _:nab9af1206e584ab2afd457e8a605872cb6 . +_:nab9af1206e584ab2afd457e8a605872cb8 . + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl new file mode 100644 index 00000000..98d2787a --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl @@ -0,0 +1,36 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( + [ + rml:gather ( [ rml:reference "$.v1.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] + [ + rml:gather ( [ rml:reference "$.v2.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] + ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/README.md b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/README.md new file mode 100644 index 00000000..85bb6794 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/README.md @@ -0,0 +1,60 @@ +## RMLTC-CC-0008-ROMa + +**Title**: Elements via reference object-map. + +**Description**: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json) + +**Mapping** +``` +@prefix ex: . +@prefix rml: . +@prefix rdf: . + +_:b273446 a rml:RelativePathSource ; + rml:path "student.csv" . + + a rml:TriplesMap ; + rml:logicalSource [ a rml:LogicalSource ; + rml:referenceFormulation rml:CSV ; + rml:source _:b273446 ] ; + + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" ; rml:termType rml:BlankNode ; + rml:gather ( + [ + rml:parentTriplesMap ; + rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ; + ] + ) ; + rml:gatherAs rdf:List; + ] ; + rml:predicate ex:sameSportAs + ] ; + + rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] . + +``` + +**Output** +``` +_:genid1 . +_:genid1 _:genid2 . +_:genid2 . +_:genid2 . + _:genid1 . +_:genid3 . +_:genid3 _:genid4 . +_:genid4 . +_:genid4 . + _:genid3 . +_:genid5 . +_:genid5 . + _:genid5 . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/default.nq new file mode 100644 index 00000000..347e6c80 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/default.nq @@ -0,0 +1,13 @@ +_:genid1 . +_:genid1 _:genid2 . +_:genid2 . +_:genid2 . + _:genid1 . +_:genid3 . +_:genid3 _:genid4 . +_:genid4 . +_:genid4 . + _:genid3 . +_:genid5 . +_:genid5 . + _:genid5 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl new file mode 100644 index 00000000..26953922 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl @@ -0,0 +1,27 @@ +@prefix ex: . +@prefix rml: . +@prefix rdf: . + +_:b273446 a rml:RelativePathSource ; + rml:path "student.csv" . + + a rml:TriplesMap ; + rml:logicalSource [ a rml:LogicalSource ; + rml:referenceFormulation rml:CSV ; + rml:source _:b273446 ] ; + + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" ; rml:termType rml:BlankNode ; + rml:gather ( + [ + rml:parentTriplesMap ; + rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ; + ] + ) ; + rml:gatherAs rdf:List; + ] ; + rml:predicate ex:sameSportAs + ] ; + + rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/student.csv b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/student.csv new file mode 100644 index 00000000..8a96794b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/student.csv @@ -0,0 +1,4 @@ +ID,Name,Sport +10,Venus Williams,Tennis +20,Serena Williams,Tennis +30,Loena Hendrickx,Figure skating diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/README.md new file mode 100644 index 00000000..2dfdba69 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/README.md @@ -0,0 +1,56 @@ +## RMLTC-CC-0008-ROMb + +**Title**: Elements via reference object-map with default join condition + +**Description**: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json) + +**Mapping** +``` +@prefix ex: . +@prefix rml: . +@prefix rdf: . + +_:b273446 a rml:RelativePathSource ; + rml:path "student.csv" . + + a rml:TriplesMap ; + rml:logicalSource [ a rml:LogicalSource ; + rml:referenceFormulation rml:CSV ; + rml:source _:b273446 ] ; + + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" ; rml:termType rml:BlankNode ; + rml:gather ( + [ + rml:parentTriplesMap ; + ] + ) ; + rml:gatherAs rdf:List; + ] ; + rml:predicate ex:sameSportAs + ] ; + + rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] . + + +``` + +**Output** +``` +_:genid1 . +_:genid1 . + _:genid1 . +_:genid2 . +_:genid2 . + _:genid2 . +_:genid3 . +_:genid3 . + _:genid3 . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/default.nq new file mode 100644 index 00000000..8c6f63e9 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/default.nq @@ -0,0 +1,9 @@ +_:genid1 . +_:genid1 . + _:genid1 . +_:genid2 . +_:genid2 . + _:genid2 . +_:genid3 . +_:genid3 . + _:genid3 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl new file mode 100644 index 00000000..b1ce8c6c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl @@ -0,0 +1,27 @@ +@prefix ex: . +@prefix rml: . +@prefix rdf: . + +_:b273446 a rml:RelativePathSource ; + rml:path "student.csv" . + + a rml:TriplesMap ; + rml:logicalSource [ a rml:LogicalSource ; + rml:referenceFormulation rml:CSV ; + rml:source _:b273446 ] ; + + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "ID" ; rml:termType rml:BlankNode ; + rml:gather ( + [ + rml:parentTriplesMap ; + ] + ) ; + rml:gatherAs rdf:List; + ] ; + rml:predicate ex:sameSportAs + ] ; + + rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] . + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/student.csv b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/student.csv new file mode 100644 index 00000000..8a96794b --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/student.csv @@ -0,0 +1,4 @@ +ID,Name,Sport +10,Venus Williams,Tennis +20,Serena Williams,Tennis +30,Loena Hendrickx,Figure skating diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md new file mode 100644 index 00000000..68ed8977 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md @@ -0,0 +1,61 @@ +## RMLTC-CC-0009-DUP-Bag + +**Title**: Gather duplicate values in an RDF Bag + +**Description**: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "2" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . + _:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . + _:nc808fbd2e11a4baa939c61c8210b5909b3 . + _:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "2" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/data.json b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/data.json new file mode 100644 index 00000000..cad65771 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/data.json @@ -0,0 +1,26 @@ +[ + { + "id": "a", + "values": [ + "1", + "1", + "1" + ] + }, + { + "id": "b", + "values": [ + "2", + "2", + "6" + ] + }, + { + "id": "c", + "values": [ + "7", + "8", + "9" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq new file mode 100644 index 00000000..572b5c84 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/default.nq @@ -0,0 +1,15 @@ +_:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "2" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "9" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . + _:nc808fbd2e11a4baa939c61c8210b5909b2 . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . + _:nc808fbd2e11a4baa939c61c8210b5909b3 . + _:nc808fbd2e11a4baa939c61c8210b5909b1 . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "2" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "7" . +_:nc808fbd2e11a4baa939c61c8210b5909b2 "6" . +_:nc808fbd2e11a4baa939c61c8210b5909b1 "1" . +_:nc808fbd2e11a4baa939c61c8210b5909b3 "8" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl new file mode 100644 index 00000000..20d9348f --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:Bag ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md new file mode 100644 index 00000000..388c4ac2 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md @@ -0,0 +1,70 @@ +## RMLTC-CC-0009-DUP-List + +**Title**: Gather duplicate values in an RDF List + +**Description**: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` + _:n988e0f11d19c486fa3b3255f94c9b3bab1 . +_:n988e0f11d19c486fa3b3255f94c9b3bab1 "1" . +_:n988e0f11d19c486fa3b3255f94c9b3bab1 _:n988e0f11d19c486fa3b3255f94c9b3bab2 . +_:n988e0f11d19c486fa3b3255f94c9b3bab2 "1" . +_:n988e0f11d19c486fa3b3255f94c9b3bab2 _:n988e0f11d19c486fa3b3255f94c9b3bab3 . +_:n988e0f11d19c486fa3b3255f94c9b3bab3 "1" . +_:n988e0f11d19c486fa3b3255f94c9b3bab3 . + + _:n988e0f11d19c486fa3b3255f94c9b3bab4 . +_:n988e0f11d19c486fa3b3255f94c9b3bab4 "2" . +_:n988e0f11d19c486fa3b3255f94c9b3bab4 _:n988e0f11d19c486fa3b3255f94c9b3bab5 . +_:n988e0f11d19c486fa3b3255f94c9b3bab5 "2" . +_:n988e0f11d19c486fa3b3255f94c9b3bab5 _:n988e0f11d19c486fa3b3255f94c9b3bab6 . +_:n988e0f11d19c486fa3b3255f94c9b3bab6 "6" . +_:n988e0f11d19c486fa3b3255f94c9b3bab6 . + + _:n988e0f11d19c486fa3b3255f94c9b3bab7 . +_:n988e0f11d19c486fa3b3255f94c9b3bab7 "7" . +_:n988e0f11d19c486fa3b3255f94c9b3bab7 _:n988e0f11d19c486fa3b3255f94c9b3bab8 . +_:n988e0f11d19c486fa3b3255f94c9b3bab8 "8" . +_:n988e0f11d19c486fa3b3255f94c9b3bab8 _:n988e0f11d19c486fa3b3255f94c9b3bab9 . +_:n988e0f11d19c486fa3b3255f94c9b3bab9 "9" . +_:n988e0f11d19c486fa3b3255f94c9b3bab9 . + +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/data.json b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/data.json new file mode 100644 index 00000000..cad65771 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/data.json @@ -0,0 +1,26 @@ +[ + { + "id": "a", + "values": [ + "1", + "1", + "1" + ] + }, + { + "id": "b", + "values": [ + "2", + "2", + "6" + ] + }, + { + "id": "c", + "values": [ + "7", + "8", + "9" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/default.nq new file mode 100644 index 00000000..9a73f638 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/default.nq @@ -0,0 +1,23 @@ + _:n988e0f11d19c486fa3b3255f94c9b3bab1 . +_:n988e0f11d19c486fa3b3255f94c9b3bab1 "1" . +_:n988e0f11d19c486fa3b3255f94c9b3bab1 _:n988e0f11d19c486fa3b3255f94c9b3bab2 . +_:n988e0f11d19c486fa3b3255f94c9b3bab2 "1" . +_:n988e0f11d19c486fa3b3255f94c9b3bab2 _:n988e0f11d19c486fa3b3255f94c9b3bab3 . +_:n988e0f11d19c486fa3b3255f94c9b3bab3 "1" . +_:n988e0f11d19c486fa3b3255f94c9b3bab3 . + + _:n988e0f11d19c486fa3b3255f94c9b3bab4 . +_:n988e0f11d19c486fa3b3255f94c9b3bab4 "2" . +_:n988e0f11d19c486fa3b3255f94c9b3bab4 _:n988e0f11d19c486fa3b3255f94c9b3bab5 . +_:n988e0f11d19c486fa3b3255f94c9b3bab5 "2" . +_:n988e0f11d19c486fa3b3255f94c9b3bab5 _:n988e0f11d19c486fa3b3255f94c9b3bab6 . +_:n988e0f11d19c486fa3b3255f94c9b3bab6 "6" . +_:n988e0f11d19c486fa3b3255f94c9b3bab6 . + + _:n988e0f11d19c486fa3b3255f94c9b3bab7 . +_:n988e0f11d19c486fa3b3255f94c9b3bab7 "7" . +_:n988e0f11d19c486fa3b3255f94c9b3bab7 _:n988e0f11d19c486fa3b3255f94c9b3bab8 . +_:n988e0f11d19c486fa3b3255f94c9b3bab8 "8" . +_:n988e0f11d19c486fa3b3255f94c9b3bab8 _:n988e0f11d19c486fa3b3255f94c9b3bab9 . +_:n988e0f11d19c486fa3b3255f94c9b3bab9 "9" . +_:n988e0f11d19c486fa3b3255f94c9b3bab9 . diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl new file mode 100644 index 00000000..ca963e35 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl @@ -0,0 +1,27 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md new file mode 100644 index 00000000..c4c65e88 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md @@ -0,0 +1,57 @@ +## RMLTC-CC-0010-Lista + +**Title**: Combining graph maps and gather maps (graph map has a template and gather map does not) + +**Description**: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:graphMap [ rml:template "g/{$.graph}" ; ] ; + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:genid1 "1" . +_:genid1 . +_:genid2 "3" . +_:genid2 . + _:genid1 . + _:genid2 . + +_:genidx1 "2" . +_:genidx1 . + _:genidx1 . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/data.json b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/data.json new file mode 100644 index 00000000..f85e5b77 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "graph": "1", + "values": [ + "1" + ] + }, + { + "id": "a", + "graph": "2", + "values": [ + "2" + ] + }, + { + "id": "a", + "graph": "1", + "values": [ + "3" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/default.nq new file mode 100644 index 00000000..ac2b7e3c --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/default.nq @@ -0,0 +1,10 @@ +_:genid1 "1" . +_:genid1 . +_:genid2 "3" . +_:genid2 . + _:genid1 . + _:genid2 . + +_:genidx1 "2" . +_:genidx1 . + _:genidx1 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl new file mode 100644 index 00000000..1dd36510 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl @@ -0,0 +1,28 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:graphMap [ rml:template "g/{$.graph}" ; ] ; + rml:predicate ex:with ; + rml:objectMap [ + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md new file mode 100644 index 00000000..ad67043f --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md @@ -0,0 +1,57 @@ +## RMLTC-CC-0010-Listb + +**Title**: Combining graph maps and gather maps (both graph map and gather map have a template) + +**Description**: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates. + +**Error expected?** No + +**Input** + [http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json](http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json) + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:graphMap [ rml:template "g/{$.graph}" ; ] ; + rml:predicate ex:with ; + rml:objectMap [ + rml:template "l/{$.id}" ; rml:termType rml:BlankNode ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . +``` + +**Output** +``` +_:genid1 "1" . +_:genid1 _:genid2 . +_:genid2 "3" . +_:genid2 . + _:genid1 . + +_:genidx1 "2" . +_:genidx1 . + _:genidx1 . +``` + diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/data.json b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/data.json new file mode 100644 index 00000000..f85e5b77 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/data.json @@ -0,0 +1,23 @@ +[ + { + "id": "a", + "graph": "1", + "values": [ + "1" + ] + }, + { + "id": "a", + "graph": "2", + "values": [ + "2" + ] + }, + { + "id": "a", + "graph": "1", + "values": [ + "3" + ] + } +] \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/default.nq b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/default.nq new file mode 100644 index 00000000..027db1b2 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/default.nq @@ -0,0 +1,9 @@ +_:genid1 "1" . +_:genid1 _:genid2 . +_:genid2 "3" . +_:genid2 . + _:genid1 . + +_:genidx1 "2" . +_:genidx1 . + _:genidx1 . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl new file mode 100644 index 00000000..230573f4 --- /dev/null +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl @@ -0,0 +1,29 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@base . + +<#TM> a rml:TriplesMap; + rml:logicalSource [ + rml:source _:b738439 ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.*" ; + ] ; + + rml:subjectMap [ + rml:template "e/{$.id}" ; + ] ; + + rml:predicateObjectMap [ + rml:graphMap [ rml:template "g/{$.graph}" ; ] ; + rml:predicate ex:with ; + rml:objectMap [ + rml:template "l/{$.id}" ; rml:termType rml:BlankNode ; + rml:gather ( [ rml:reference "$.values.*" ; ] ) ; + rml:gatherAs rdf:List ; + ] ; + ] ; +. + +_:b738439 a rml:RelativePathSource ; + rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/config.js b/src/test/resources/rml-cc/config.js new file mode 100644 index 00000000..dd32f38d --- /dev/null +++ b/src/test/resources/rml-cc/config.js @@ -0,0 +1,72 @@ +async function loadTurtle() { + //this is the function you call in 'preProcess', to load the highlighter + const worker = await new Promise(resolve => { + require(["core/worker"], ({ worker }) => resolve(worker)); + }); + const action = "highlight-load-lang"; + const langURL = + "https://cdn.jsdelivr.net/gh/redmer/highlightjs-turtle/src/languages/turtle.js"; + const propName = "hljsDefineTurtle"; // This funtion is defined in the highlighter being loaded + const lang = "turtle"; // this is the class you use to identify the language + worker.postMessage({ action, langURL, propName, lang }); + return new Promise(resolve => { + worker.addEventListener("message", function listener({ data }) { + const { action: responseAction, lang: responseLang } = data; + if (responseAction === action && responseLang === lang) { + worker.removeEventListener("message", listener); + resolve(); + } + }); + }); +} + +var respecConfig = { + // check https://respec.org/docs/ for the meaning of these keys + preProcess: [loadTurtle], + authors: [ + { + name: "Dylan Van Assche", + url: "https://dylanvanassche.be", + company: "IDLab – Ghent University – imec", + orcid: "0000-0002-7195-9935", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + edDraftURI: "https://w3id.org/rml/cc/test-cases/", + editors: [ + { + name: "Dylan Van Assche", + url: "https://dylanvanassche.be", + company: "IDLab – Ghent University – imec", + orcid: "0000-0002-7195-9935", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + formerEditors: [ + ], + github: "https://github.com/kg-construct/rml-cc", + license: "w3c-software-doc", + localBiblio: { + "RML-Core": { + title: "RML-Core", + href: "https://w3id.org/rml/core/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "07 August 2024", + }, + "RML-IO": { + title: "RML-IO", + href: "https://w3id.org/rml/io/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "12 March 2024", + }, + }, + otherLinks: [], + shortName: "RML-CC-Testcases", + specStatus: "CG-DRAFT", + // W3C config + copyrightStart: "2024", + doJsonLd: true, + group: "kg-construct", +}; diff --git a/src/test/resources/rml-cc/descriptions.csv b/src/test/resources/rml-cc/descriptions.csv new file mode 100644 index 00000000..df4bf68b --- /dev/null +++ b/src/test/resources/rml-cc/descriptions.csv @@ -0,0 +1,36 @@ +ID,title,purpose,part of spec,data format,ref. formulation,error expected?,input file 1,input file 2,input file 3,comment +RMLTC-CC-0001-List,Generate a rdf:List as an object,Tests if a rdf:List is generated as an object,,JSON,JSON,no,data.json,,, +RMLTC-CC-0001-Bag,Generate a rdf:Bag as an object,Tests if a rdf:Bag is generated as an object,,JSON,JSON,no,data.json,,, +RMLTC-CC-0001-Seq,Generate a rdf:Seq as an object,Tests if a rdf:Seq is generated as an object,,JSON,JSON,no,data.json,,, +RMLTC-CC-0001-Alt,Generate a rdf:Alt as an object,Tests if a rdf:Alt is generated as an object,,JSON,JSON,no,data.json,,, +RMLTC-CC-0002-List,Generate a named rdf:List as an object,Tests if a named rdf:List is generated as an object,,JSON,JSON,no,data.json,,, +RMLTC-CC-0002-Bag,Generate a named rdf:Bag as an object,Tests if a named rdf:Bag is generated as an object,,JSON,JSON,no,data.json,,,"If it works for bags, then it should work for sequences and alternatives." +RMLTC-CC-0003-EL,Allow the generation of empty lists,Tests if the use of rml:allowEmptyListAndContainer yields an empty list.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0003-EL-BN,Allow the generation of empty lists identified by blank node identifiers.,Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0003-EL-Named,Allow the generation of empty lists identified by IRIs.,Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0003-NEL,Empty lists are not generated,Tests if empty lists are not generated (expected default behavior).,,JSON,JSON,no,data.json,,, +RMLTC-CC-0003-NELb,Empty lists are not generated II,Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0003-EB,Allow the generation of empty bags,Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.,,JSON,JSON,no,data.json,,,"If it works for bags, then it should work for sequences and alternatives." +RMLTC-CC-0003-NEB,Empty bags are not generated,Tests if empty containers are not generated (expected default behavior).,,JSON,JSON,no,data.json,,, +RMLTC-CC-0004-SM1,GatherMap in subject map (list),Tests if the use of a gather map in the subject map is supported. This test generates a list.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0004-SM2,GatherMap in subject map (list),Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0004-SM3,GatherMap in subject map (list),Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists. ,,JSON,JSON,no,data.json,,, +RMLTC-CC-0004-SM4,GatherMap in subject map (bag),Tests if the use of a gather map in the subject map is supported. This test generates a bag.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0004-SM5,GatherMap in subject map (bag),"Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).",,JSON,JSON,no,data.json,,, +RMLTC-CC-0005-App1,Append values of multiple term maps,Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0005-App2,Append values of multiple term maps,"Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.",,JSON,JSON,no,data.json,,, +RMLTC-CC-0005-Car1,Cartesian product of values from multiple term maps of a gather map.,Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0005-Car2,Cartesian product of values from multiple term maps of a gather map.,Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0006-IT0,Gather values across iterations to create a collection.,"When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.",,JSON,JSON,no,data.json,,, +RMLTC-CC-0006-IT1,Gather values across iterations to create a collection.,"When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.",,JSON,JSON,no,data.json,,, +RMLTC-CC-0006-IT2,Gather values across iterations to create a collection.,"When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.",,JSON,JSON,no,data.json,,, +RMLTC-CC-0006-IT3,Gather values across iterations to create a container.,"When no template, constant, or reference is given to a gather map, then each iteration yields a different container.",,JSON,JSON,no,data.json,,, +RMLTC-CC-0006-IT4,Gather values across iterations to create a container.,"When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.",,JSON,JSON,no,data.json,,, +RMLTC-CC-0006-IT5,Gather values across iterations to create a container.,"When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.",,JSON,JSON,no,data.json,,, +RMLTC-CC-0007-NES,Nested gather maps,Testing whether nested gather maps are created. The mapping should generate a list of bags.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0008-ROMa,Elements via reference object-map.,Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.,,CSV,CSV,no,student.csv,,, +RMLTC-CC-0008-ROMb,Elements via reference object-map with default join condition,Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.,,CSV,CSV,no,student.csv,,, +RMLTC-CC-0009-DUP-Bag,Gather duplicate values in an RDF Bag,Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0009-DUP-List,Gather duplicate values in an RDF List,Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.,,JSON,JSON,no,data.json,,, +RMLTC-CC-0010-Lista,Combining graph maps and gather maps (graph map has a template and gather map does not),"Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.",,JSON,JSON,no,data.json,,, +RMLTC-CC-0010-Listb,Combining graph maps and gather maps (both graph map and gather map have a template),"Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.",,JSON,JSON,no,data.json,,, \ No newline at end of file diff --git a/src/test/resources/rml-cc/dev.html b/src/test/resources/rml-cc/dev.html new file mode 100644 index 00000000..375747e7 --- /dev/null +++ b/src/test/resources/rml-cc/dev.html @@ -0,0 +1,219 @@ + + + + + RML-CC: Test Cases + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/src/test/resources/rml-cc/docs/20250130/index.html b/src/test/resources/rml-cc/docs/20250130/index.html new file mode 100644 index 00000000..27f834b9 --- /dev/null +++ b/src/test/resources/rml-cc/docs/20250130/index.html @@ -0,0 +1,2158 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + +
+ +

RML-CC: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-CC-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/cc/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-cc + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

13. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

14. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

15. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

16. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

17. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

19. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

20. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

21. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

22. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

24. RMLTC-CC-0006-IT0

+

Title: Gather values accross iterations.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection or container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0006-IT1

+

Title: Gather values accross iterations.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT2

+

Title: Gather values accross iterations.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

28. RMLTC-CC-0008-ROMa

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

29. RMLTC-CC-0008-ROMb

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

30. RMLTC-CC-0009-DUP-Bag

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

31. RMLTC-CC-0009-DUP-List

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

32. RMLTC-CC-0010-Lista

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

33. RMLTC-CC-0010-Listb

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + + diff --git a/src/test/resources/rml-cc/docs/20250206/index.html b/src/test/resources/rml-cc/docs/20250206/index.html new file mode 100644 index 00000000..abe1c494 --- /dev/null +++ b/src/test/resources/rml-cc/docs/20250206/index.html @@ -0,0 +1,2158 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + +
+ +

RML-CC: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-CC-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/cc/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-cc + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

13. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

14. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

15. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

16. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

17. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

19. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

20. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

21. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

22. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

24. RMLTC-CC-0006-IT0

+

Title: Gather values accross iterations.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection or container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0006-IT1

+

Title: Gather values accross iterations.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT2

+

Title: Gather values accross iterations.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

28. RMLTC-CC-0008-ROMa

+

Title: Elements via reference object-map.

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

29. RMLTC-CC-0008-ROMb

+

Title: Elements via reference object-map with default join condition

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

30. RMLTC-CC-0009-DUP-Bag

+

Title: Gather duplicate values in an RDF Bag

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

31. RMLTC-CC-0009-DUP-List

+

Title: Gather duplicate values in an RDF List

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

32. RMLTC-CC-0010-Lista

+

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

33. RMLTC-CC-0010-Listb

+

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-cc/docs/20250225/index.html b/src/test/resources/rml-cc/docs/20250225/index.html new file mode 100644 index 00000000..cfe40fdb --- /dev/null +++ b/src/test/resources/rml-cc/docs/20250225/index.html @@ -0,0 +1,2472 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + + + + + +

Abstract

This document describes the [RML] vocabulary and approach to generating RDF containers and collections [RDF11-Concepts].

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-EL-BN

+

Title: Allow the generation of empty lists identified by blank node identifiers.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

13. RMLTC-CC-0003-EL-Named

+

Title: Allow the generation of empty lists identified by IRIs.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

14. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

15. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

16. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

17. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

19. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

20. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

21. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

22. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

24. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT0

+

Title: Gather values across iterations to create a collection.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0006-IT1

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

28. RMLTC-CC-0006-IT2

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

29. RMLTC-CC-0006-IT3

+

Title: Gather values across iterations to create a container.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:a .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:b .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:c .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "5" .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "6" .
+
+
+

30. RMLTC-CC-0006-IT4

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "6" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+
+

31. RMLTC-CC-0006-IT5

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "a" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "b" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_6> "6" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_7> "d" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> "e" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "c" .
+
+
+

32. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

33. RMLTC-CC-0008-ROMa

+

Title: Elements via reference object-map.

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

34. RMLTC-CC-0008-ROMb

+

Title: Elements via reference object-map with default join condition

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

35. RMLTC-CC-0009-DUP-Bag

+

Title: Gather duplicate values in an RDF Bag

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

36. RMLTC-CC-0009-DUP-List

+

Title: Gather duplicate values in an RDF List

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

37. RMLTC-CC-0010-Lista

+

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

38. RMLTC-CC-0010-Listb

+

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + +

A. References

A.1 Informative references

+ +
[RDF11-Concepts]
+ RDF 1.1 Concepts and Abstract Syntax. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf11-concepts/ +
[RML]
+ RDF Mapping Language. https://rml.io. 06 October 2020. Unofficial draft. URL: https://rml.io/specs/rml/ +
+
\ No newline at end of file diff --git a/src/test/resources/rml-cc/docs/index.html b/src/test/resources/rml-cc/docs/index.html new file mode 100644 index 00000000..cfe40fdb --- /dev/null +++ b/src/test/resources/rml-cc/docs/index.html @@ -0,0 +1,2472 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + + + + + +

Abstract

This document describes the [RML] vocabulary and approach to generating RDF containers and collections [RDF11-Concepts].

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-EL-BN

+

Title: Allow the generation of empty lists identified by blank node identifiers.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

13. RMLTC-CC-0003-EL-Named

+

Title: Allow the generation of empty lists identified by IRIs.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

14. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

15. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

16. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

17. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

19. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

20. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

21. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

22. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

24. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT0

+

Title: Gather values across iterations to create a collection.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0006-IT1

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

28. RMLTC-CC-0006-IT2

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

29. RMLTC-CC-0006-IT3

+

Title: Gather values across iterations to create a container.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:a .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:b .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:c .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "5" .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "6" .
+
+
+

30. RMLTC-CC-0006-IT4

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "6" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+
+

31. RMLTC-CC-0006-IT5

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "a" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "b" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_6> "6" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_7> "d" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> "e" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "c" .
+
+
+

32. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

33. RMLTC-CC-0008-ROMa

+

Title: Elements via reference object-map.

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

34. RMLTC-CC-0008-ROMb

+

Title: Elements via reference object-map with default join condition

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

35. RMLTC-CC-0009-DUP-Bag

+

Title: Gather duplicate values in an RDF Bag

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

36. RMLTC-CC-0009-DUP-List

+

Title: Gather duplicate values in an RDF List

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

37. RMLTC-CC-0010-Lista

+

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

38. RMLTC-CC-0010-Listb

+

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + +

A. References

A.1 Informative references

+ +
[RDF11-Concepts]
+ RDF 1.1 Concepts and Abstract Syntax. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf11-concepts/ +
[RML]
+ RDF Mapping Language. https://rml.io. 06 October 2020. Unofficial draft. URL: https://rml.io/specs/rml/ +
+
\ No newline at end of file diff --git a/src/test/resources/rml-cc/list.sh b/src/test/resources/rml-cc/list.sh new file mode 100644 index 00000000..12c32031 --- /dev/null +++ b/src/test/resources/rml-cc/list.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for i in RML*; do + echo "
" +done diff --git a/src/test/resources/rml-cc/make-metadata.py b/src/test/resources/rml-cc/make-metadata.py new file mode 100644 index 00000000..a2c46363 --- /dev/null +++ b/src/test/resources/rml-cc/make-metadata.py @@ -0,0 +1,209 @@ +#!/usr/bin/env python3 + +import os +import sys +import glob +import csv + +def get_title_description(testcase: str): + with open ('descriptions.csv') as csvfile: + reader = csv.reader(csvfile) + for row in reader: + if row[0] == testcase: + return row[1], row[2] + +def main(spec: str): + with open ('metadata.csv', 'w', newline='') as csvfile: + writer = csv.writer(csvfile) + writer.writerow(['ID', 'title', 'description', 'specification', + 'mapping', 'input_format1', 'input_format2', + 'input_format3', 'output_format1', 'output_format2', + 'output_format3', 'input1', 'input2', 'input3', + 'output1', 'output2', 'output3', 'error']) + for testcase in glob.glob('RML*'): + title, description = get_title_description(testcase) + error = 'false' + input1 = '' + input2 = '' + input3 = '' + input_format1 = '' + input_format2 = '' + input_format3 = '' + output1 = '' + output2 = '' + output3 = '' + output_format1 = '' + output_format2 = '' + output_format3 = '' + + # Input file + if os.path.exists(os.path.join(testcase, 'Friends.json')): + input1 = 'Friends.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'Friends-UTF16.json')): + input1 = 'Friends-UTF16.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'Friends.json.gz')): + input1 = 'Friends.json.gz' + input_format1 = 'application/gzip+json' + elif os.path.exists(os.path.join(testcase, 'Friends.json.zip')): + input1 = 'Friends.json.zip' + input_format1 = 'application/gzip+json' + elif os.path.exists(os.path.join(testcase, 'Friends.json.tar.xz')): + input1 = 'Friends.json.tar.xz' + input_format1 = 'application/tarxz+json' + elif os.path.exists(os.path.join(testcase, 'Friends.json.tar.gz')): + input1 = 'Friends.json.tar.gz' + input_format1 = 'application/targz+json' + elif os.path.exists(os.path.join(testcase, 'Friends-NULL.csv')): + input1 = 'Friends-NULL.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'Friends-NULL2.csv')): + input1 = 'Friends-NULL2.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'Friends.nt')): + input1 = 'Friends.nt' + input_format1 = 'application/n-triples' + elif os.path.exists(os.path.join(testcase, 'Friends.csv')): + input1 = 'Friends.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'Friends.json')): + input1 = 'Friends.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'Friends.xml')): + input1 = 'Friends.xml' + input_format1 = 'text/xml' + else: + input1 = f'http://w3id.org/rml/resources/rml-io/{testcase}/Friends.json' + input_format1 = 'application/json' + + # Mapping file + if os.path.exists(os.path.join(testcase, 'mapping.ttl')): + mapping_file = 'mapping.ttl' + else: + raise ValueError('Mapping file missing!') + + # Output files + if os.path.exists(os.path.join(testcase, 'default.nq')): + output1 = 'default.nq' + output_format1 = 'application/n-quads' + else: + raise NotImplementedError('output1 is not known, but required') + + if os.path.exists(os.path.join(testcase, 'dump1.nq')): + output2 = 'dump1.nq' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nt')): + output2 = 'dump1.nt' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.n3')): + output2 = 'dump1.n3' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.jsonld')): + output2 = 'dump1.jsonld' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.rdfjson')): + output2 = 'dump1.rdfjson' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.rdfxml')): + output2 = 'dump1.rdfxml' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.ttl')): + output2 = 'dump1.ttl' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nq.gz')): + output2 = 'dump1.nq.gz' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nq.zip')): + output2 = 'dump1.nq.zip' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nq.tar.xz')): + output2 = 'dump1.nq.tar.xz' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nq.tar.gz')): + output2 = 'dump1.nq.tar.gz' + output_format2 = 'application/n-quads' + + if os.path.exists(os.path.join(testcase, 'dump2.nq')): + output3 = 'dump2.nq' + output_format3 = 'application/n-quads' + + writer.writerow([testcase, title, description, spec, mapping_file, + input_format1, input_format2, input_format3, + output_format1, output_format2, output_format3, + input1, input2, input3, output1, output2, + output3, error]) + lines = [] + # Title and description + lines.append(f'## {testcase}\n\n') + lines.append(f'**Title**: {title}\n\n') + lines.append(f'**Description**: {description}\n\n') + if error == 'true': + error_html = 'Yes' + else: + error_html = 'No' + lines.append(f'**Error expected?** {error_html}\n\n') + + # Input + inputCount = '' + + for index, i in enumerate([input1, input2, input3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + input_html = f'**Input{inputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + input_html = f'**Input{inputCount}**\n `{i}`\n\n' + + lines.append(input_html) + inputCount = f' {index + 1}' + + # Mapping + with open(os.path.join(testcase, mapping_file)) as f: + mapping_html = f'**Mapping**\n```\n{f.read()}\n```\n\n' + lines.append(mapping_html) + + # Output + outputCount = '' + if output2 or output3: + outputCount = ' 1' + + for index, i in enumerate([output1, output2, output3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + output_html = f'**Output{outputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + output_html = f'**Output{outputCount}**\n `{i}`\n\n' + + lines.append(output_html) + outputCount = f' {index + 2}' + + + with open(os.path.join(testcase, 'README.md'), 'w') as f: + f.writelines(lines) + + +if __name__ == '__main__': + if len(sys.argv) != 2: + print('Usage: ./make-metadata.py ') + sys.exit(1) + main(sys.argv[1]) diff --git a/src/test/resources/rml-cc/manifest.rml.ttl b/src/test/resources/rml-cc/manifest.rml.ttl new file mode 100644 index 00000000..0dd78573 --- /dev/null +++ b/src/test/resources/rml-cc/manifest.rml.ttl @@ -0,0 +1,267 @@ +@prefix xsd: . +@prefix dcterms: . +@prefix rml: . +@prefix rmltest: . +@prefix test: . +@base . + +# java -jar .\burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/cc/test/ + +_:source + rml:source [ + a rml:RelativePathSource ; + rml:path "metadata.csv" ; + rml:null ""; + ]; + rml:referenceFormulation rml:CSV; +. + +<#TriplesMapTestcase> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:reference "ID"; + rml:class test:TestCase; + ]; + + rml:predicateObjectMap [ + rml:predicate dcterms:identifier; + rml:objectMap [ + rml:reference "ID"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:hasError; + rml:objectMap [ + rml:reference "error"; + rml:datatype xsd:boolean; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:mappingDocument; + rml:objectMap [ + rml:reference "mapping"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; +. + +<#TriplesMapInput1> + a rml:TriplesMap; + + rml:logicalSource _:source ; + + rml:subjectMap [ + rml:template "{ID}/input/{input1}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format1"; + ]; + ]; +. + +<#TriplesMapInput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input2}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format2"; + ]; + ]; +. + +<#TriplesMapInput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input3}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format3"; + ]; + ]; +. + +<#TriplesMapOutput1> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output1}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format1"; + ]; + ]; +. + +<#TriplesMapOutput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output2}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format2"; + ]; + ]; +. + +<#TriplesMapOutput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output3}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format3"; + ]; + ]; +. + diff --git a/src/test/resources/rml-cc/manifest.ttl b/src/test/resources/rml-cc/manifest.ttl new file mode 100644 index 00000000..bd827a7f --- /dev/null +++ b/src/test/resources/rml-cc/manifest.ttl @@ -0,0 +1,420 @@ + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0006-IT0" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0008-ROMb" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0010-Lista" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0006-IT1" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0002-List" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0001-Bag" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0003-EL-Named" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0005-App1" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0004-SM1" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0003-NEL" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0003-NELb" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0010-Listb" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0006-IT2" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0009-DUP-Bag" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0001-Seq" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0002-Bag" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0001-List" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0005-App2" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0001-Alt" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0004-SM2" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0007-NES" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0009-DUP-List" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0003-EL" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0006-IT3" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0003-NEB" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0005-Car1" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0004-SM3" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0006-IT4" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0005-Car2" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0003-EB" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0004-SM4" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0006-IT5" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json" . + "application/json" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0008-ROMa" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json" . + "application/json" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0003-EL-BN" . + . + "default.nq" . + "application/n-quads" . + . + . + "mapping.ttl" . + "false"^^ . + . + "RMLTC-CC-0004-SM5" . + . + "http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json" . + "application/json" . + . diff --git a/src/test/resources/rml-cc/metadata.csv b/src/test/resources/rml-cc/metadata.csv new file mode 100644 index 00000000..919ffd53 --- /dev/null +++ b/src/test/resources/rml-cc/metadata.csv @@ -0,0 +1,36 @@ +ID,title,description,specification,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error +RMLTC-CC-0001-Alt,Generate a rdf:Alt as an object,Tests if a rdf:Alt is generated as an object,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json,,,default.nq,,,false +RMLTC-CC-0001-Bag,Generate a rdf:Bag as an object,Tests if a rdf:Bag is generated as an object,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json,,,default.nq,,,false +RMLTC-CC-0001-List,Generate a rdf:List as an object,Tests if a rdf:List is generated as an object,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json,,,default.nq,,,false +RMLTC-CC-0001-Seq,Generate a rdf:Seq as an object,Tests if a rdf:Seq is generated as an object,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json,,,default.nq,,,false +RMLTC-CC-0002-Bag,Generate a named rdf:Bag as an object,Tests if a named rdf:Bag is generated as an object,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json,,,default.nq,,,false +RMLTC-CC-0002-List,Generate a named rdf:List as an object,Tests if a named rdf:List is generated as an object,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json,,,default.nq,,,false +RMLTC-CC-0003-EB,Allow the generation of empty bags,Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json,,,default.nq,,,false +RMLTC-CC-0003-EL,Allow the generation of empty lists,Tests if the use of rml:allowEmptyListAndContainer yields an empty list.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json,,,default.nq,,,false +RMLTC-CC-0003-EL-BN,Allow the generation of empty lists identified by blank node identifiers.,Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json,,,default.nq,,,false +RMLTC-CC-0003-EL-Named,Allow the generation of empty lists identified by IRIs.,Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json,,,default.nq,,,false +RMLTC-CC-0003-NEB,Empty bags are not generated,Tests if empty containers are not generated (expected default behavior).,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json,,,default.nq,,,false +RMLTC-CC-0003-NEL,Empty lists are not generated,Tests if empty lists are not generated (expected default behavior).,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json,,,default.nq,,,false +RMLTC-CC-0003-NELb,Empty lists are not generated II,Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json,,,default.nq,,,false +RMLTC-CC-0004-SM1,GatherMap in subject map (list),Tests if the use of a gather map in the subject map is supported. This test generates a list.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json,,,default.nq,,,false +RMLTC-CC-0004-SM2,GatherMap in subject map (list),Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json,,,default.nq,,,false +RMLTC-CC-0004-SM3,GatherMap in subject map (list),Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists. ,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json,,,default.nq,,,false +RMLTC-CC-0004-SM4,GatherMap in subject map (bag),Tests if the use of a gather map in the subject map is supported. This test generates a bag.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json,,,default.nq,,,false +RMLTC-CC-0004-SM5,GatherMap in subject map (bag),"Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json,,,default.nq,,,false +RMLTC-CC-0005-App1,Append values of multiple term maps,Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json,,,default.nq,,,false +RMLTC-CC-0005-App2,Append values of multiple term maps,"Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json,,,default.nq,,,false +RMLTC-CC-0005-Car1,Cartesian product of values from multiple term maps of a gather map.,Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json,,,default.nq,,,false +RMLTC-CC-0005-Car2,Cartesian product of values from multiple term maps of a gather map.,Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json,,,default.nq,,,false +RMLTC-CC-0006-IT0,Gather values across iterations to create a collection.,"When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json,,,default.nq,,,false +RMLTC-CC-0006-IT1,Gather values across iterations to create a collection.,"When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json,,,default.nq,,,false +RMLTC-CC-0006-IT2,Gather values across iterations to create a collection.,"When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json,,,default.nq,,,false +RMLTC-CC-0006-IT3,Gather values across iterations to create a container.,"When no template, constant, or reference is given to a gather map, then each iteration yields a different container.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json,,,default.nq,,,false +RMLTC-CC-0006-IT4,Gather values across iterations to create a container.,"When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json,,,default.nq,,,false +RMLTC-CC-0006-IT5,Gather values across iterations to create a container.,"When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json,,,default.nq,,,false +RMLTC-CC-0007-NES,Nested gather maps,Testing whether nested gather maps are created. The mapping should generate a list of bags.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json,,,default.nq,,,false +RMLTC-CC-0008-ROMa,Elements via reference object-map.,Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json,,,default.nq,,,false +RMLTC-CC-0008-ROMb,Elements via reference object-map with default join condition,Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json,,,default.nq,,,false +RMLTC-CC-0009-DUP-Bag,Gather duplicate values in an RDF Bag,Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json,,,default.nq,,,false +RMLTC-CC-0009-DUP-List,Gather duplicate values in an RDF List,Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.,http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json,,,default.nq,,,false +RMLTC-CC-0010-Lista,Combining graph maps and gather maps (graph map has a template and gather map does not),"Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json,,,default.nq,,,false +RMLTC-CC-0010-Listb,Combining graph maps and gather maps (both graph map and gather map have a template),"Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.",http://w3id.org/rml/cc/spec,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json,,,default.nq,,,false diff --git a/src/test/resources/rml-cc/section/abstract.md b/src/test/resources/rml-cc/section/abstract.md new file mode 100644 index 00000000..7b13b046 --- /dev/null +++ b/src/test/resources/rml-cc/section/abstract.md @@ -0,0 +1 @@ +This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools. diff --git a/src/test/resources/rml-cc/section/data-model.md b/src/test/resources/rml-cc/section/data-model.md new file mode 100644 index 00000000..f4c3ad6a --- /dev/null +++ b/src/test/resources/rml-cc/section/data-model.md @@ -0,0 +1,12 @@ +# Data model + +The test cases are semantically described for re-usability and shareability following the [W3C Test case description](https://www.w3.org/2006/03/test-description). +Each `test:Testcase` as the following properties: + +- `dcterms:identifier`: unique ID of the test case. +- `rmltest:hasError`: if an error of the RML Processor is expected or not. +- `rmltest:input`: One or more input data of the test case. +- `rmltest:output`: One or more output data of the test case. +- `rmltest:inputFormat`: the input data format. +- `rmltest:outputFormat`: the output data format. +- `rmltest:mappingDocument`: the RML mapping rules in Turtle. diff --git a/src/test/resources/rml-cc/section/introduction.md b/src/test/resources/rml-cc/section/introduction.md new file mode 100644 index 00000000..55ab17e6 --- /dev/null +++ b/src/test/resources/rml-cc/section/introduction.md @@ -0,0 +1,4 @@ +# Introduction + +This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification. diff --git a/src/test/resources/rml-cc/section/test-cases.md b/src/test/resources/rml-cc/section/test-cases.md new file mode 100644 index 00000000..7d81b94d --- /dev/null +++ b/src/test/resources/rml-cc/section/test-cases.md @@ -0,0 +1,10 @@ +# Test cases + +This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on [GitHub](https://github.com/kg-construct/rml-cc/tree/main/test-cases) in the folder `test-cases`. +Each test case is contained in a single folder, containing three types of files: + + - Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server. + - One file with the RML rules, called `mapping.ttl`, in the Turtle format. + - Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error. + diff --git a/src/test/resources/rml-core/README.md b/src/test/resources/rml-core/README.md new file mode 100644 index 00000000..831a6c76 --- /dev/null +++ b/src/test/resources/rml-core/README.md @@ -0,0 +1,9 @@ +# RML Core test cases + +Manifest of test cases can be generated as followed: + +1. Add the testcase description in `descriptions.csv` or fetch it from the Google spreadsheet. +2. Execute the `make-metadata.py` script: `python3 make-metadata.py http://w3id.org/rml/core/` +3. Generate the manifest with RMLMapper: `java -jar rmlmapper.jar -m manifest.rml.ttl -o manifest.ttl -s turtle` + + diff --git a/src/test/resources/rml-core/RMLTC0000-JSON/README.md b/src/test/resources/rml-core/RMLTC0000-JSON/README.md new file mode 100644 index 00000000..17168dca --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0000-JSON/README.md @@ -0,0 +1,48 @@ +## RMLTC0000-JSON + +**Title**: "one table, one column, zero rows" + +**Description**: "Tests if an empty table produces an empty RDF graph" + +**Error expected?** No + +**Input** +``` +{ + "students": [] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Name}" + ] . + +``` + +**Output** +``` +# empty database + +``` + diff --git a/src/test/resources/rml-core/RMLTC0000-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0000-JSON/mapping.ttl new file mode 100644 index 00000000..41da352f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0000-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0000-JSON/output.nq b/src/test/resources/rml-core/RMLTC0000-JSON/output.nq new file mode 100644 index 00000000..ca0b9916 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0000-JSON/output.nq @@ -0,0 +1 @@ +# empty database diff --git a/src/test/resources/rml-core/RMLTC0000-JSON/student.json b/src/test/resources/rml-core/RMLTC0000-JSON/student.json new file mode 100644 index 00000000..81bf2f6a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0000-JSON/student.json @@ -0,0 +1,3 @@ +{ + "students": [] +} diff --git a/src/test/resources/rml-core/RMLTC0001a-JSON/README.md b/src/test/resources/rml-core/RMLTC0001a-JSON/README.md new file mode 100644 index 00000000..0bb26b0c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0001a-JSON/README.md @@ -0,0 +1,51 @@ +## RMLTC0001a-JSON + +**Title**: "One column mapping, subject URI generation by using rml:template" + +**Description**: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap . + + rml:template "http://example.com/{$.Name}" . + +``` + +**Output** +``` + "Venus" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0001a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0001a-JSON/mapping.ttl new file mode 100644 index 00000000..0a0f009a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0001a-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap . + + rml:template "http://example.com/{$.Name}" . diff --git a/src/test/resources/rml-core/RMLTC0001a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0001a-JSON/output.nq new file mode 100644 index 00000000..73f40ddf --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0001a-JSON/output.nq @@ -0,0 +1,2 @@ + "Venus" . + diff --git a/src/test/resources/rml-core/RMLTC0001a-JSON/student.json b/src/test/resources/rml-core/RMLTC0001a-JSON/student.json new file mode 100644 index 00000000..b3ae4c4e --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0001a-JSON/student.json @@ -0,0 +1,5 @@ +{ + "students": [{ + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0001b-JSON/README.md b/src/test/resources/rml-core/RMLTC0001b-JSON/README.md new file mode 100644 index 00000000..f8e738ce --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0001b-JSON/README.md @@ -0,0 +1,52 @@ +## RMLTC0001b-JSON + +**Title**: "One column mapping, generation of a BlankNode subject by using rml:termType" + +**Description**: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "{$.Name}"; + rml:termType rml:BlankNode + ] . + +``` + +**Output** +``` +_:Venus "Venus" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0001b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0001b-JSON/mapping.ttl new file mode 100644 index 00000000..5d0a5678 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0001b-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "{$.Name}"; + rml:termType rml:BlankNode + ] . diff --git a/src/test/resources/rml-core/RMLTC0001b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0001b-JSON/output.nq new file mode 100644 index 00000000..082a16c0 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0001b-JSON/output.nq @@ -0,0 +1,2 @@ +_:Venus "Venus" . + diff --git a/src/test/resources/rml-core/RMLTC0001b-JSON/student.json b/src/test/resources/rml-core/RMLTC0001b-JSON/student.json new file mode 100644 index 00000000..b3ae4c4e --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0001b-JSON/student.json @@ -0,0 +1,5 @@ +{ + "students": [{ + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/README.md b/src/test/resources/rml-core/RMLTC0002a-JSON/README.md new file mode 100644 index 00000000..850f1d5b --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002a-JSON/README.md @@ -0,0 +1,61 @@ +## RMLTC0002a-JSON + +**Title**: "Two columns mapping, generation of a subject URI by the concatenation of two column values" + +**Description**: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class foaf:Person; + rml:template "http://example.com/{$.ID}/{$.Name}" + ] . + +``` + +**Output** +``` + "Venus" . + "10" . + . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0002a-JSON/mapping.ttl new file mode 100644 index 00000000..7cee3d86 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002a-JSON/mapping.ttl @@ -0,0 +1,28 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class foaf:Person; + rml:template "http://example.com/{$.ID}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq new file mode 100644 index 00000000..174309a6 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq @@ -0,0 +1,4 @@ + "Venus" . + "10" . + . + diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/student.json b/src/test/resources/rml-core/RMLTC0002a-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002a-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0002b-JSON/README.md b/src/test/resources/rml-core/RMLTC0002b-JSON/README.md new file mode 100644 index 00000000..452ea19f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002b-JSON/README.md @@ -0,0 +1,53 @@ +## RMLTC0002b-JSON + +**Title**: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType" + +**Description**: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "students{$.ID}"; + rml:termType rml:BlankNode + ] . + +``` + +**Output** +``` +_:students10 "Venus" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0002b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0002b-JSON/mapping.ttl new file mode 100644 index 00000000..fb76dbc4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002b-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "students{$.ID}"; + rml:termType rml:BlankNode + ] . diff --git a/src/test/resources/rml-core/RMLTC0002b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0002b-JSON/output.nq new file mode 100644 index 00000000..be918d0b --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002b-JSON/output.nq @@ -0,0 +1,2 @@ +_:students10 "Venus" . + diff --git a/src/test/resources/rml-core/RMLTC0002b-JSON/student.json b/src/test/resources/rml-core/RMLTC0002b-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002b-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0002e-JSON/README.md b/src/test/resources/rml-core/RMLTC0002e-JSON/README.md new file mode 100644 index 00000000..3a237729 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002e-JSON/README.md @@ -0,0 +1,45 @@ +## RMLTC0002e-JSON + +**Title**: "Two columns mapping, an undefined rml:path" + +**Description**: "Tests the presence of an undefined rml:path" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student2.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.IDs" + ]; + rml:predicate ex:id + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}/{$.Name}" + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0002e-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0002e-JSON/mapping.ttl new file mode 100644 index 00000000..5fff6df9 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002e-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student2.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.IDs" + ]; + rml:predicate ex:id + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0002e-JSON/student.json b/src/test/resources/rml-core/RMLTC0002e-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002e-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0002g-JSON/README.md b/src/test/resources/rml-core/RMLTC0002g-JSON/README.md new file mode 100644 index 00000000..5a04f6e5 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002g-JSON/README.md @@ -0,0 +1,45 @@ +## RMLTC0002g-JSON + +**Title**: "Two columns mapping, invalid JSONPath" + +**Description**: "Test the presence of an invalid JSONPath" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student2.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.IDs" + ]; + rml:predicate ex:id + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}/{$.Name}" + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0002g-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0002g-JSON/mapping.ttl new file mode 100644 index 00000000..f13174c8 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002g-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student2.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.IDs" + ]; + rml:predicate ex:id + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.ID}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0002g-JSON/student.json b/src/test/resources/rml-core/RMLTC0002g-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0002g-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0003c-JSON/README.md b/src/test/resources/rml-core/RMLTC0003c-JSON/README.md new file mode 100644 index 00000000..67fdc5a3 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0003c-JSON/README.md @@ -0,0 +1,53 @@ +## RMLTC0003c-JSON + +**Title**: "Three columns mapping, by using a rml:template to produce literal" + +**Description**: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.FirstName} {$.LastName}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/Student{$.ID}" + ] . + +``` + +**Output** +``` + "Venus Williams" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0003c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0003c-JSON/mapping.ttl new file mode 100644 index 00000000..0b42150f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0003c-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.FirstName} {$.LastName}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/Student{$.ID}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0003c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0003c-JSON/output.nq new file mode 100644 index 00000000..180f90c2 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0003c-JSON/output.nq @@ -0,0 +1 @@ + "Venus Williams" . diff --git a/src/test/resources/rml-core/RMLTC0003c-JSON/student.json b/src/test/resources/rml-core/RMLTC0003c-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0003c-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0004a-JSON/README.md b/src/test/resources/rml-core/RMLTC0004a-JSON/README.md new file mode 100644 index 00000000..2fcfb0be --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0004a-JSON/README.md @@ -0,0 +1,77 @@ +## RMLTC0004a-JSON + +**Title**: "Two column mapping, from one row table to two different triples" + +**Description**: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "Student": "Venus", + "Sport":"Tennis" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student_sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Student" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class ex:Student; + rml:template "http://example.com/{$.Student}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student_sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Sport" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class ex:Sport; + rml:template "http://example.com/{$.Sport}" + ] . + +``` + +**Output** +``` + "Venus" . + . + "Tennis" . + . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0004a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0004a-JSON/mapping.ttl new file mode 100644 index 00000000..ff87cbc9 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0004a-JSON/mapping.ttl @@ -0,0 +1,43 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student_sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Student" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class ex:Student; + rml:template "http://example.com/{$.Student}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student_sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Sport" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class ex:Sport; + rml:template "http://example.com/{$.Sport}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0004a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0004a-JSON/output.nq new file mode 100644 index 00000000..164ca8ba --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0004a-JSON/output.nq @@ -0,0 +1,5 @@ + "Venus" . + . + "Tennis" . + . + diff --git a/src/test/resources/rml-core/RMLTC0004a-JSON/student_sport.json b/src/test/resources/rml-core/RMLTC0004a-JSON/student_sport.json new file mode 100644 index 00000000..5e537b36 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0004a-JSON/student_sport.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "Student": "Venus", + "Sport":"Tennis" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0004b-JSON/README.md b/src/test/resources/rml-core/RMLTC0004b-JSON/README.md new file mode 100644 index 00000000..fcb279b2 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0004b-JSON/README.md @@ -0,0 +1,45 @@ +## RMLTC0004b-JSON + +**Title**: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap" + +**Description**: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Name}"; + rml:termType rml:Literal + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0004b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0004b-JSON/mapping.ttl new file mode 100644 index 00000000..36480e52 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0004b-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Name}"; + rml:termType rml:Literal + ] . diff --git a/src/test/resources/rml-core/RMLTC0004b-JSON/student.json b/src/test/resources/rml-core/RMLTC0004b-JSON/student.json new file mode 100644 index 00000000..b3ae4c4e --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0004b-JSON/student.json @@ -0,0 +1,5 @@ +{ + "students": [{ + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0005a-JSON/README.md b/src/test/resources/rml-core/RMLTC0005a-JSON/README.md new file mode 100644 index 00000000..28dae551 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0005a-JSON/README.md @@ -0,0 +1,70 @@ +## RMLTC0005a-JSON + +**Title**: "Typing of resources" + +**Description**: "Tests the typing of resources" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + { + "fname": "Bob", + "lname": "Smith", + "amount": "30.0E0" + }, + { + "fname": "Sue", + "lname": "Jones", + "amount": "20.0E0" + }, + { + "fname": "Bob", + "lname": "Smith", + "amount": "30.0E0" + } + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "ious.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:owes + ]; + rml:subjectMap [ + rml:class foaf:Person; + rml:template "http://example.com/{$.fname};{$.lname}" + ] . + +``` + +**Output** +``` + . + "30.0E0" . + . + "20.0E0" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0005a-JSON/ious.json b/src/test/resources/rml-core/RMLTC0005a-JSON/ious.json new file mode 100644 index 00000000..b30b9ffa --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0005a-JSON/ious.json @@ -0,0 +1,19 @@ +{ + "persons": [ + { + "fname": "Bob", + "lname": "Smith", + "amount": "30.0E0" + }, + { + "fname": "Sue", + "lname": "Jones", + "amount": "20.0E0" + }, + { + "fname": "Bob", + "lname": "Smith", + "amount": "30.0E0" + } + ] +} diff --git a/src/test/resources/rml-core/RMLTC0005a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0005a-JSON/mapping.ttl new file mode 100644 index 00000000..d692582e --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0005a-JSON/mapping.ttl @@ -0,0 +1,23 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "ious.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:owes + ]; + rml:subjectMap [ + rml:class foaf:Person; + rml:template "http://example.com/{$.fname};{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0005a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0005a-JSON/output.nq new file mode 100644 index 00000000..64e91da4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0005a-JSON/output.nq @@ -0,0 +1,5 @@ + . + "30.0E0" . + . + "20.0E0" . + diff --git a/src/test/resources/rml-core/RMLTC0006a-JSON/README.md b/src/test/resources/rml-core/RMLTC0006a-JSON/README.md new file mode 100644 index 00000000..ffa61754 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0006a-JSON/README.md @@ -0,0 +1,56 @@ +## RMLTC0006a-JSON + +**Title**: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap" + +**Description**: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:constant "Bad Student" + ]; + rml:predicateMap [ + rml:constant ex:description + ] + ]; + rml:subjectMap [ + rml:constant ex:BadStudent; + rml:graphMap [ + rml:constant + ] + ] . + +``` + +**Output** +``` + "Bad Student" . +``` + diff --git a/src/test/resources/rml-core/RMLTC0006a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0006a-JSON/mapping.ttl new file mode 100644 index 00000000..3196ff7a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0006a-JSON/mapping.ttl @@ -0,0 +1,26 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:constant "Bad Student" + ]; + rml:predicateMap [ + rml:constant ex:description + ] + ]; + rml:subjectMap [ + rml:constant ex:BadStudent; + rml:graphMap [ + rml:constant + ] + ] . diff --git a/src/test/resources/rml-core/RMLTC0006a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0006a-JSON/output.nq new file mode 100644 index 00000000..4e6fd3ef --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0006a-JSON/output.nq @@ -0,0 +1 @@ + "Bad Student" . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0006a-JSON/student.json b/src/test/resources/rml-core/RMLTC0006a-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0006a-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0007a-JSON/README.md b/src/test/resources/rml-core/RMLTC0007a-JSON/README.md new file mode 100644 index 00000000..c86dcf39 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007a-JSON/README.md @@ -0,0 +1,52 @@ +## RMLTC0007a-JSON + +**Title**: "Typing resources by relying on rdf:type predicate" + +**Description**: "Tests the typing resources by relying on rdf:type predicate" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . + +``` + +**Output** +``` + . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0007a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007a-JSON/mapping.ttl new file mode 100644 index 00000000..ac7b148b --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007a-JSON/mapping.ttl @@ -0,0 +1,20 @@ +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0007a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007a-JSON/output.nq new file mode 100644 index 00000000..76f87f89 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007a-JSON/output.nq @@ -0,0 +1,2 @@ + . + diff --git a/src/test/resources/rml-core/RMLTC0007a-JSON/student.json b/src/test/resources/rml-core/RMLTC0007a-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007a-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0007b-JSON/README.md b/src/test/resources/rml-core/RMLTC0007b-JSON/README.md new file mode 100644 index 00000000..7dcbda75 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007b-JSON/README.md @@ -0,0 +1,60 @@ +## RMLTC0007b-JSON + +**Title**: "Assigning triples to Named Graphs" + +**Description**: "Tests the generation of triples to a named graph" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:graph ex:PersonGraph; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . + +``` + +**Output** +``` + "Venus" . + . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0007b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007b-JSON/mapping.ttl new file mode 100644 index 00000000..d9043524 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007b-JSON/mapping.ttl @@ -0,0 +1,27 @@ +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:graph ex:PersonGraph; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0007b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007b-JSON/output.nq new file mode 100644 index 00000000..5c4eb261 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007b-JSON/output.nq @@ -0,0 +1,3 @@ + "Venus" . + . + diff --git a/src/test/resources/rml-core/RMLTC0007b-JSON/student.json b/src/test/resources/rml-core/RMLTC0007b-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007b-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/README.md b/src/test/resources/rml-core/RMLTC0007c-JSON/README.md new file mode 100644 index 00000000..7bd10d6e --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007c-JSON/README.md @@ -0,0 +1,63 @@ +## RMLTC0007c-JSON + +**Title**: "One row mapping, using rml:class" + +**Description**: "Tests subjectmap with more than one class IRIs, rml:class" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class ex:Student, foaf:Person; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . + +``` + +**Output** +``` + "Venus" . + "10" . + . + . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007c-JSON/mapping.ttl new file mode 100644 index 00000000..65764100 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007c-JSON/mapping.ttl @@ -0,0 +1,28 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class ex:Student, foaf:Person; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq new file mode 100644 index 00000000..fb4d7fe2 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq @@ -0,0 +1,5 @@ + "Venus" . + "10" . + . + . + diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/student.json b/src/test/resources/rml-core/RMLTC0007c-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007c-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/README.md b/src/test/resources/rml-core/RMLTC0007d-JSON/README.md new file mode 100644 index 00000000..82b12af4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007d-JSON/README.md @@ -0,0 +1,69 @@ +## RMLTC0007d-JSON + +**Title**: "One column mapping, specifying an rml:predicateObjectMap with rdf:type" + +**Description**: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:object ex:Student; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . + +``` + +**Output** +``` + "Venus" . + "10" . + . + . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007d-JSON/mapping.ttl new file mode 100644 index 00000000..fe8e475a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007d-JSON/mapping.ttl @@ -0,0 +1,34 @@ +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:object ex:Student; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq new file mode 100644 index 00000000..2f24266d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq @@ -0,0 +1,5 @@ + "Venus" . + "10" . + . + . + diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/student.json b/src/test/resources/rml-core/RMLTC0007d-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007d-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/README.md b/src/test/resources/rml-core/RMLTC0007e-JSON/README.md new file mode 100644 index 00000000..a4b5eb8b --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007e-JSON/README.md @@ -0,0 +1,62 @@ +## RMLTC0007e-JSON + +**Title**: "One column mapping, using rml:graphMap and rml:class" + +**Description**: "Tests subjectmap with rml:graphMap and rml:class" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class foaf:Person; + rml:graph ex:PersonGraph; + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . + +``` + +**Output** +``` + "10" . + "Venus" . + . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007e-JSON/mapping.ttl new file mode 100644 index 00000000..19e307c7 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007e-JSON/mapping.ttl @@ -0,0 +1,29 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:class foaf:Person; + rml:graph ex:PersonGraph; + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq new file mode 100644 index 00000000..4cbaaf55 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq @@ -0,0 +1,4 @@ + "10" . + "Venus" . + . + diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/student.json b/src/test/resources/rml-core/RMLTC0007e-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007e-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/README.md b/src/test/resources/rml-core/RMLTC0007f-JSON/README.md new file mode 100644 index 00000000..32e9b11a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007f-JSON/README.md @@ -0,0 +1,66 @@ +## RMLTC0007f-JSON + +**Title**: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type" + +**Description**: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:graph ex:PersonGraph; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . + +``` + +**Output** +``` + . + "Venus" . + "10" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007f-JSON/mapping.ttl new file mode 100644 index 00000000..8dd905cf --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007f-JSON/mapping.ttl @@ -0,0 +1,32 @@ +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:graph ex:PersonGraph; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq new file mode 100644 index 00000000..d4694d78 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq @@ -0,0 +1,4 @@ + . + "Venus" . + "10" . + diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/student.json b/src/test/resources/rml-core/RMLTC0007f-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007f-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0007g-JSON/README.md b/src/test/resources/rml-core/RMLTC0007g-JSON/README.md new file mode 100644 index 00000000..3a17bc06 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007g-JSON/README.md @@ -0,0 +1,54 @@ +## RMLTC0007g-JSON + +**Title**: "Assigning triples to the default graph" + +**Description**: "Tests the generation of triples to the default graph" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:graph rml:defaultGraph; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . + +``` + +**Output** +``` + "Venus" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0007g-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007g-JSON/mapping.ttl new file mode 100644 index 00000000..bfacef74 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007g-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:graph rml:defaultGraph; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0007g-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007g-JSON/output.nq new file mode 100644 index 00000000..6c29bcce --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007g-JSON/output.nq @@ -0,0 +1,2 @@ + "Venus" . + diff --git a/src/test/resources/rml-core/RMLTC0007g-JSON/student.json b/src/test/resources/rml-core/RMLTC0007g-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007g-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0007h-JSON/README.md b/src/test/resources/rml-core/RMLTC0007h-JSON/README.md new file mode 100644 index 00000000..f53be206 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007h-JSON/README.md @@ -0,0 +1,50 @@ +## RMLTC0007h-JSON + +**Title**: "Assigning triples to a non-IRI named graph" + +**Description**: "Tests the generation of triples to a non-IRI named graph, which is an error" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:graphMap [ + rml:reference "$.ID"; + rml:termType rml:Literal + ]; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0007h-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0007h-JSON/mapping.ttl new file mode 100644 index 00000000..c79dd6ed --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007h-JSON/mapping.ttl @@ -0,0 +1,25 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:graphMap [ + rml:reference "$.ID"; + rml:termType rml:Literal + ]; + rml:template "http://example.com/Student/{$.ID}/{$.FirstName}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0007h-JSON/student.json b/src/test/resources/rml-core/RMLTC0007h-JSON/student.json new file mode 100644 index 00000000..dcdd9388 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0007h-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "FirstName":"Venus", + "LastName":"Williams" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0008a-JSON/README.md b/src/test/resources/rml-core/RMLTC0008a-JSON/README.md new file mode 100644 index 00000000..8f103be4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008a-JSON/README.md @@ -0,0 +1,74 @@ +## RMLTC0008a-JSON + +**Title**: "Generation of triples to a target graph by using rml:graphMap and rml:template" + +**Description**: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus Williams", + "Sport": "Tennis" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:reference "$.Sport" + ]; + rml:predicate ex:Sport + ]; + rml:subjectMap [ + rml:graphMap [ + rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}" + ]; + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . + +``` + +**Output** +``` + . + "Venus Williams" . + "10" . + "Tennis" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0008a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0008a-JSON/mapping.ttl new file mode 100644 index 00000000..c12600ca --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008a-JSON/mapping.ttl @@ -0,0 +1,39 @@ +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:reference "$.Sport" + ]; + rml:predicate ex:Sport + ]; + rml:subjectMap [ + rml:graphMap [ + rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}" + ]; + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0008a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0008a-JSON/output.nq new file mode 100644 index 00000000..2856ef24 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008a-JSON/output.nq @@ -0,0 +1,5 @@ + . + "Venus Williams" . + "10" . + "Tennis" . + diff --git a/src/test/resources/rml-core/RMLTC0008a-JSON/student.json b/src/test/resources/rml-core/RMLTC0008a-JSON/student.json new file mode 100644 index 00000000..cd7526f3 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008a-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus Williams", + "Sport": "Tennis" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0008b-JSON/README.md b/src/test/resources/rml-core/RMLTC0008b-JSON/README.md new file mode 100644 index 00000000..eb07d5cc --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008b-JSON/README.md @@ -0,0 +1,92 @@ +## RMLTC0008b-JSON + +**Title**: "Generation of triples referencing object map" + +**Description**: "Tests the mapping specification referencing object map without join" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus Williams", + "Sport": "Tennis" + }] +} + +``` + +**Mapping** +``` +@prefix activity: . +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap ; + rml:predicate ex:Sport + ], [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . + + a rml:RefObjectMap; + rml:parentTriplesMap . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object activity:Sport; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Sport}" + ] . + +``` + +**Output** +``` + . + "Venus Williams" . + "10" . + . + . + + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0008b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0008b-JSON/mapping.ttl new file mode 100644 index 00000000..9aba67e8 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008b-JSON/mapping.ttl @@ -0,0 +1,55 @@ +@prefix activity: . +@prefix ex: . +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap ; + rml:predicate ex:Sport + ], [ + rml:object foaf:Person; + rml:predicate rdf:type + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ], [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . + + a rml:RefObjectMap; + rml:parentTriplesMap . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object activity:Sport; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Sport}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0008b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0008b-JSON/output.nq new file mode 100644 index 00000000..7742ae45 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008b-JSON/output.nq @@ -0,0 +1,7 @@ + . + "Venus Williams" . + "10" . + . + . + + diff --git a/src/test/resources/rml-core/RMLTC0008b-JSON/student.json b/src/test/resources/rml-core/RMLTC0008b-JSON/student.json new file mode 100644 index 00000000..cd7526f3 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008b-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus Williams", + "Sport": "Tennis" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0008c-JSON/README.md b/src/test/resources/rml-core/RMLTC0008c-JSON/README.md new file mode 100644 index 00000000..cb8103a7 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008c-JSON/README.md @@ -0,0 +1,55 @@ +## RMLTC0008c-JSON + +**Title**: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap" + +**Description**: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus Williams", + "Sport": "Tennis" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:name, foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . + +``` + +**Output** +``` + "Venus Williams" . + "Venus Williams" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0008c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0008c-JSON/mapping.ttl new file mode 100644 index 00000000..a610a24c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008c-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:name, foaf:name + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0008c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0008c-JSON/output.nq new file mode 100644 index 00000000..d36f700c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008c-JSON/output.nq @@ -0,0 +1,3 @@ + "Venus Williams" . + "Venus Williams" . + diff --git a/src/test/resources/rml-core/RMLTC0008c-JSON/student.json b/src/test/resources/rml-core/RMLTC0008c-JSON/student.json new file mode 100644 index 00000000..cd7526f3 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0008c-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus Williams", + "Sport": "Tennis" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/README.md b/src/test/resources/rml-core/RMLTC0009a-JSON/README.md new file mode 100644 index 00000000..49bbe110 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009a-JSON/README.md @@ -0,0 +1,90 @@ +## RMLTC0009a-JSON + +**Title**: "Generation of triples from foreign key relations" + +**Description**: "Test foreign key relationships among logical tables" + +**Error expected?** No + +**Input** +``` +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Name": "Demi Moore" + } + ] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:child "$.Sport"; + rml:parent "$.ID" + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/resource/sport_{$.ID}" + ] . + +``` + +**Output** +``` + "Venus Williams" . + "Demi Moore" . + "Tennis" . + . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0009a-JSON/mapping.ttl new file mode 100644 index 00000000..596bd136 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009a-JSON/mapping.ttl @@ -0,0 +1,50 @@ +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:child "$.Sport"; + rml:parent "$.ID" + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/resource/sport_{$.ID}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0009a-JSON/output.nq new file mode 100644 index 00000000..b0b89f8b --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009a-JSON/output.nq @@ -0,0 +1,4 @@ + "Venus Williams" . + "Demi Moore" . + "Tennis" . + . diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/sport.json b/src/test/resources/rml-core/RMLTC0009a-JSON/sport.json new file mode 100644 index 00000000..98b89704 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009a-JSON/sport.json @@ -0,0 +1,8 @@ +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + } + ] +} diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/student.json b/src/test/resources/rml-core/RMLTC0009a-JSON/student.json new file mode 100644 index 00000000..a99528c1 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009a-JSON/student.json @@ -0,0 +1,13 @@ +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Name": "Demi Moore" + } + ] +} diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/README.md b/src/test/resources/rml-core/RMLTC0009b-JSON/README.md new file mode 100644 index 00000000..0d6849fb --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009b-JSON/README.md @@ -0,0 +1,100 @@ +## RMLTC0009b-JSON + +**Title**: "Generation of triples to multiple graphs" + +**Description**: "Test that results from distinct parts of the mapping can be directed to different target graphs." + +**Error expected?** No + +**Input** +``` +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Name": "Demi Moore" + } + ] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:child "$.Sport"; + rml:parent "$.ID" + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:graph ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:graph ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . + +``` + +**Output** +``` + . + "Venus Williams" . + . + "Demi Moore" . + . + "Tennis" . + . + . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0009b-JSON/mapping.ttl new file mode 100644 index 00000000..4a12b17f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009b-JSON/mapping.ttl @@ -0,0 +1,56 @@ +@prefix foaf: . +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:graph ; + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:graph ; + rml:objectMap [ a rml:RefObjectMap; + rml:joinCondition [ + rml:child "$.Sport"; + rml:parent "$.ID" + ]; + rml:parentTriplesMap + ]; + rml:predicate + ]; + rml:subjectMap [ + rml:class ; + rml:graph ; + rml:template "http://example.com/resource/student_{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:class ; + rml:graph ; + rml:template "http://example.com/resource/sport_{$.ID}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0009b-JSON/output.nq new file mode 100644 index 00000000..aef6b08c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009b-JSON/output.nq @@ -0,0 +1,8 @@ + . + "Venus Williams" . + . + "Demi Moore" . + . + "Tennis" . + . + . diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/sport.json b/src/test/resources/rml-core/RMLTC0009b-JSON/sport.json new file mode 100644 index 00000000..98b89704 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009b-JSON/sport.json @@ -0,0 +1,8 @@ +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + } + ] +} diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/student.json b/src/test/resources/rml-core/RMLTC0009b-JSON/student.json new file mode 100644 index 00000000..a99528c1 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0009b-JSON/student.json @@ -0,0 +1,13 @@ +{ + "students" : [ + { + "ID": 10, + "Sport": 100, + "Name": "Venus Williams" + }, + { + "ID": 20, + "Name": "Demi Moore" + } + ] +} diff --git a/src/test/resources/rml-core/RMLTC0010a-JSON/README.md b/src/test/resources/rml-core/RMLTC0010a-JSON/README.md new file mode 100644 index 00000000..37bc7686 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010a-JSON/README.md @@ -0,0 +1,63 @@ +## RMLTC0010a-JSON + +**Title**: "Template with table column with blank space" + +**Description**: "Tests a template with blank space in column value" + +**Error expected?** No + +**Input** +``` +{ + "countries": [{ + "Country Code": 1, + "Name":"Bolivia, Plurinational State of", + "ISO 3166": "BO" + }, { + "Country Code": 2, + "Name":"Ireland", + "ISO 3166": "IE" + }, { + "Country Code": 3, + "Name":"Saint Martin (French part)", + "ISO 3166": "MF" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_info.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:name + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.['Country Code']}" + ] . + +``` + +**Output** +``` + "Bolivia, Plurinational State of" . + "Ireland" . + "Saint Martin (French part)" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0010a-JSON/country_info.json b/src/test/resources/rml-core/RMLTC0010a-JSON/country_info.json new file mode 100644 index 00000000..4e8d578a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010a-JSON/country_info.json @@ -0,0 +1,15 @@ +{ + "countries": [{ + "Country Code": 1, + "Name":"Bolivia, Plurinational State of", + "ISO 3166": "BO" + }, { + "Country Code": 2, + "Name":"Ireland", + "ISO 3166": "IE" + }, { + "Country Code": 3, + "Name":"Saint Martin (French part)", + "ISO 3166": "MF" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0010a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0010a-JSON/mapping.ttl new file mode 100644 index 00000000..370edb7c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010a-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_info.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:name + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.['Country Code']}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0010a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0010a-JSON/output.nq new file mode 100644 index 00000000..29911d6f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010a-JSON/output.nq @@ -0,0 +1,4 @@ + "Bolivia, Plurinational State of" . + "Ireland" . + "Saint Martin (French part)" . + diff --git a/src/test/resources/rml-core/RMLTC0010b-JSON/README.md b/src/test/resources/rml-core/RMLTC0010b-JSON/README.md new file mode 100644 index 00000000..f2d50d64 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010b-JSON/README.md @@ -0,0 +1,63 @@ +## RMLTC0010b-JSON + +**Title**: "Template with table columns with special chars" + +**Description**: "Tests a template with special chars in column value" + +**Error expected?** No + +**Input** +``` +{ + "countries": [{ + "Country Code": 1, + "Name":"Bolivia, Plurinational State of", + "ISO 3166": "BO" + }, { + "Country Code": 2, + "Name":"Ireland", + "ISO 3166": "IE" + }, { + "Country Code": 3, + "Name":"Saint Martin (French part)", + "ISO 3166": "MF" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_info.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:name + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.['Country Code']}/{$.Name}" + ] . + +``` + +**Output** +``` + "Bolivia, Plurinational State of" . + "Ireland" . + "Saint Martin (French part)" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0010b-JSON/country_info.json b/src/test/resources/rml-core/RMLTC0010b-JSON/country_info.json new file mode 100644 index 00000000..4e8d578a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010b-JSON/country_info.json @@ -0,0 +1,15 @@ +{ + "countries": [{ + "Country Code": 1, + "Name":"Bolivia, Plurinational State of", + "ISO 3166": "BO" + }, { + "Country Code": 2, + "Name":"Ireland", + "ISO 3166": "IE" + }, { + "Country Code": 3, + "Name":"Saint Martin (French part)", + "ISO 3166": "MF" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0010b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0010b-JSON/mapping.ttl new file mode 100644 index 00000000..1f9f4db6 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010b-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_info.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:name + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.['Country Code']}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0010b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0010b-JSON/output.nq new file mode 100644 index 00000000..c92a08b0 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010b-JSON/output.nq @@ -0,0 +1,4 @@ + "Bolivia, Plurinational State of" . + "Ireland" . + "Saint Martin (French part)" . + diff --git a/src/test/resources/rml-core/RMLTC0010c-JSON/README.md b/src/test/resources/rml-core/RMLTC0010c-JSON/README.md new file mode 100644 index 00000000..67b87e59 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010c-JSON/README.md @@ -0,0 +1,64 @@ +## RMLTC0010c-JSON + +**Title**: "Template with table columns with special chars and backslashes" + +**Description**: "Tests a template with special chars in reference value and backslash escapes in string templates" + +**Error expected?** No + +**Input** +``` +{ + "countries": [{ + "Country Code": 1, + "Name":"Bolivia, Plurinational State of", + "ISO 3166": "BO" + }, { + "Country Code": 2, + "Name":"Ireland", + "ISO 3166": "IE" + }, { + "Country Code": 3, + "Name":"Saint Martin (French part)", + "ISO 3166": "MF" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_info.json" + ] + ]; + rml:predicateObjectMap [ + rml:predicate ex:code; + rml:objectMap [ + rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}"; + rml:termType rml:Literal + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.['Country Code']}/{$.Name}" + ] . + +``` + +**Output** +``` + "{{{ BO }}}" . + "{{{ IE }}}" . + "{{{ MF }}}" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0010c-JSON/country_info.json b/src/test/resources/rml-core/RMLTC0010c-JSON/country_info.json new file mode 100644 index 00000000..4e8d578a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010c-JSON/country_info.json @@ -0,0 +1,15 @@ +{ + "countries": [{ + "Country Code": 1, + "Name":"Bolivia, Plurinational State of", + "ISO 3166": "BO" + }, { + "Country Code": 2, + "Name":"Ireland", + "ISO 3166": "IE" + }, { + "Country Code": 3, + "Name":"Saint Martin (French part)", + "ISO 3166": "MF" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0010c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0010c-JSON/mapping.ttl new file mode 100644 index 00000000..fb1afc8d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010c-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_info.json" + ] + ]; + rml:predicateObjectMap [ + rml:predicate ex:code; + rml:objectMap [ + rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}"; + rml:termType rml:Literal + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.['Country Code']}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0010c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0010c-JSON/output.nq new file mode 100644 index 00000000..5c7e1080 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0010c-JSON/output.nq @@ -0,0 +1,4 @@ + "{{{ BO }}}" . + "{{{ IE }}}" . + "{{{ MF }}}" . + diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/README.md b/src/test/resources/rml-core/RMLTC0011b-JSON/README.md new file mode 100644 index 00000000..d9577b18 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0011b-JSON/README.md @@ -0,0 +1,116 @@ +## RMLTC0011b-JSON + +**Title**: "M to M relation, by using an additional Triples Map" + +**Description**: "Tests, M to M relations, by using an additional Triples Map" + +**Error expected?** No + +**Input** +``` +{ + "students": [ + {"ID":10, "FirstName":"Venus", "LastName":"Williams"}, + {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"}, + {"ID":12, "FirstName":"David", "LastName":"Villa"} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.links[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student_sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "http://example.com/sport/{$.ID_Sport}" + ]; + rml:predicate ex:plays + ]; + rml:subjectMap [ + rml:template "http://example.com/student/{$.ID_Student}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate ex:firstName + ], [ + rml:objectMap [ + rml:reference "$.LastName" + ]; + rml:predicate ex:lastName + ]; + rml:subjectMap [ + rml:template "http://example.com/student/{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Description" + ]; + rml:predicate ex:description + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ]; + rml:subjectMap [ + rml:template "http://example.com/sport/{$.ID}" + ] . + +``` + +**Output** +``` + "Williams" . + "Venus" . + "Villa" . + "David" . + "Alonso" . + "Fernando" . + "Tennis" . + "110" . + "Football" . + "111" . + "Formula1" . + "112" . + . + . + . + . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0011b-JSON/mapping.ttl new file mode 100644 index 00000000..29ba8387 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0011b-JSON/mapping.ttl @@ -0,0 +1,69 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.links[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student_sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "http://example.com/sport/{$.ID_Sport}" + ]; + rml:predicate ex:plays + ]; + rml:subjectMap [ + rml:template "http://example.com/student/{$.ID_Student}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate ex:firstName + ], [ + rml:objectMap [ + rml:reference "$.LastName" + ]; + rml:predicate ex:lastName + ]; + rml:subjectMap [ + rml:template "http://example.com/student/{$.ID}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.sports[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "sport.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Description" + ]; + rml:predicate ex:description + ], [ + rml:objectMap [ + rml:reference "$.ID" + ]; + rml:predicate ex:id + ]; + rml:subjectMap [ + rml:template "http://example.com/sport/{$.ID}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0011b-JSON/output.nq new file mode 100644 index 00000000..d2759cec --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0011b-JSON/output.nq @@ -0,0 +1,17 @@ + "Williams" . + "Venus" . + "Villa" . + "David" . + "Alonso" . + "Fernando" . + "Tennis" . + "110" . + "Football" . + "111" . + "Formula1" . + "112" . + . + . + . + . + diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/sport.json b/src/test/resources/rml-core/RMLTC0011b-JSON/sport.json new file mode 100644 index 00000000..7d4615b0 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0011b-JSON/sport.json @@ -0,0 +1,7 @@ +{ + "sports": [ + {"ID":110, "Description":"Tennis"}, + {"ID":111, "Description":"Football"}, + {"ID":112, "Description":"Formula1"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/student.json b/src/test/resources/rml-core/RMLTC0011b-JSON/student.json new file mode 100644 index 00000000..60771847 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0011b-JSON/student.json @@ -0,0 +1,7 @@ +{ + "students": [ + {"ID":10, "FirstName":"Venus", "LastName":"Williams"}, + {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"}, + {"ID":12, "FirstName":"David", "LastName":"Villa"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/student_sport.json b/src/test/resources/rml-core/RMLTC0011b-JSON/student_sport.json new file mode 100644 index 00000000..19c60124 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0011b-JSON/student_sport.json @@ -0,0 +1,8 @@ +{ + "links": [ + {"ID_Student":10, "ID_Sport":110}, + {"ID_Student":11, "ID_Sport":111}, + {"ID_Student":11, "ID_Sport":112}, + {"ID_Student":12, "ID_Sport":111} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/README.md b/src/test/resources/rml-core/RMLTC0012a-JSON/README.md new file mode 100644 index 00000000..94dbd97c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012a-JSON/README.md @@ -0,0 +1,64 @@ +## RMLTC0012a-JSON + +**Title**: "Blank node referencing multiple columns" + +**Description**: "Tests that blank nodes can be generated by referencing multiple columns" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20}, + {"fname":"Bob","lname":"Smith","amount":30} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.fname} {$.lname}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}{$.lname}{$.amount}"; + rml:termType rml:BlankNode + ] . + +``` + +**Output** +``` +_:BobSmith30 "30" . +_:BobSmith30 "Bob Smith" . +_:SueJones20 "20" . +_:SueJones20 "Sue Jones" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0012a-JSON/mapping.ttl new file mode 100644 index 00000000..7caeb4cf --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012a-JSON/mapping.ttl @@ -0,0 +1,29 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.fname} {$.lname}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}{$.lname}{$.amount}"; + rml:termType rml:BlankNode + ] . diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0012a-JSON/output.nq new file mode 100644 index 00000000..7f9ce194 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012a-JSON/output.nq @@ -0,0 +1,5 @@ +_:BobSmith30 "30" . +_:BobSmith30 "Bob Smith" . +_:SueJones20 "20" . +_:SueJones20 "Sue Jones" . + diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0012a-JSON/persons.json new file mode 100644 index 00000000..513e9890 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012a-JSON/persons.json @@ -0,0 +1,7 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20}, + {"fname":"Bob","lname":"Smith","amount":30} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/README.md b/src/test/resources/rml-core/RMLTC0012b-JSON/README.md new file mode 100644 index 00000000..e3256c38 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012b-JSON/README.md @@ -0,0 +1,67 @@ +## RMLTC0012b-JSON + +**Title**: "Duplicate tuples generate same blank node" + +**Description**: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent." + +**Error expected?** No + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.fname} {$.lname}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "{$.fname}{$.lname}"; + rml:termType rml:BlankNode + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.lives[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "lives.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.city" + ]; + rml:predicate ex:city + ]; + rml:subjectMap [ + rml:template "{$.fname}{$.lname}"; + rml:termType rml:BlankNode + ] . + +``` + +**Output** +``` +_:BobSmith "London" . +_:BobSmith "Bob Smith" . +_:SueJones "Madrid" . +_:SueJones "Sue Jones" . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/lives.json b/src/test/resources/rml-core/RMLTC0012b-JSON/lives.json new file mode 100644 index 00000000..6ffc3601 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012b-JSON/lives.json @@ -0,0 +1,7 @@ +{ + "lives": [ + {"fname":"Bob","lname":"Smith","city":"London"}, + {"fname":"Sue","lname":"Jones","city":"Madrid"}, + {"fname":"Bob","lname":"Smith","city":"London"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0012b-JSON/mapping.ttl new file mode 100644 index 00000000..82aa3b30 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012b-JSON/mapping.ttl @@ -0,0 +1,44 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.fname} {$.lname}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:template "{$.fname}{$.lname}"; + rml:termType rml:BlankNode + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.lives[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "lives.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.city" + ]; + rml:predicate ex:city + ]; + rml:subjectMap [ + rml:template "{$.fname}{$.lname}"; + rml:termType rml:BlankNode + ] . diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0012b-JSON/output.nq new file mode 100644 index 00000000..0d556bbd --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012b-JSON/output.nq @@ -0,0 +1,5 @@ +_:BobSmith "London" . +_:BobSmith "Bob Smith" . +_:SueJones "Madrid" . +_:SueJones "Sue Jones" . + diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0012b-JSON/persons.json new file mode 100644 index 00000000..513e9890 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012b-JSON/persons.json @@ -0,0 +1,7 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20}, + {"fname":"Bob","lname":"Smith","amount":30} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0012c-JSON/README.md b/src/test/resources/rml-core/RMLTC0012c-JSON/README.md new file mode 100644 index 00000000..47befcf4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012c-JSON/README.md @@ -0,0 +1,50 @@ +## RMLTC0012c-JSON + +**Title**: "TriplesMap without subjectMap" + +**Description**: "Tests a RML with missing information, TriplesMap without subjectMap." + +**Error expected?** Yes + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20}, + {"fname":"Bob","lname":"Smith","amount":30} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.fname} {$.lname}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0012c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0012c-JSON/mapping.ttl new file mode 100644 index 00000000..c458a4aa --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012c-JSON/mapping.ttl @@ -0,0 +1,25 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.fname} {$.lname}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ] . diff --git a/src/test/resources/rml-core/RMLTC0012c-JSON/persons.json b/src/test/resources/rml-core/RMLTC0012c-JSON/persons.json new file mode 100644 index 00000000..513e9890 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012c-JSON/persons.json @@ -0,0 +1,7 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20}, + {"fname":"Bob","lname":"Smith","amount":30} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0012d-JSON/README.md b/src/test/resources/rml-core/RMLTC0012d-JSON/README.md new file mode 100644 index 00000000..54555564 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012d-JSON/README.md @@ -0,0 +1,57 @@ +## RMLTC0012d-JSON + +**Title**: "TriplesMap with two subjectMap" + +**Description**: "Tests a RML with wrong information, TriplesMap with two subjectMap." + +**Error expected?** Yes + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20}, + {"fname":"Bob","lname":"Smith","amount":30} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.fname} {$.lname}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}_{$.lname}_{$.amount}"; + rml:termType rml:BlankNode + ], [ + rml:template "{$.amount}_{$.fname}_{$.lname}"; + rml:termType rml:BlankNode + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0012d-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0012d-JSON/mapping.ttl new file mode 100644 index 00000000..a8baa088 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012d-JSON/mapping.ttl @@ -0,0 +1,32 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:template "{$.fname} {$.lname}"; + rml:termType rml:Literal + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}_{$.lname}_{$.amount}"; + rml:termType rml:BlankNode + ], [ + rml:template "{$.amount}_{$.fname}_{$.lname}"; + rml:termType rml:BlankNode + ] . diff --git a/src/test/resources/rml-core/RMLTC0012d-JSON/persons.json b/src/test/resources/rml-core/RMLTC0012d-JSON/persons.json new file mode 100644 index 00000000..513e9890 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0012d-JSON/persons.json @@ -0,0 +1,7 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20}, + {"fname":"Bob","lname":"Smith","amount":30} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0013a-JSON/README.md b/src/test/resources/rml-core/RMLTC0013a-JSON/README.md new file mode 100644 index 00000000..e8a3ee14 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0013a-JSON/README.md @@ -0,0 +1,51 @@ +## RMLTC0013a-JSON + +**Title**: "Null value in JSON file" + +**Description**: "Tests if null values in JSON files are handled correctly." + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"ID":"1","Name":"Alice","DateOfBirth":null}, + {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.DateOfBirth" + ]; + rml:predicate ex:BirthDay + ]; + rml:subjectMap [ + rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}" + ] . + +``` + +**Output** +``` + "September, 2010" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0013a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0013a-JSON/mapping.ttl new file mode 100644 index 00000000..c1bd8ddc --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0013a-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.DateOfBirth" + ]; + rml:predicate ex:BirthDay + ]; + rml:subjectMap [ + rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0013a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0013a-JSON/output.nq new file mode 100644 index 00000000..e143b3ef --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0013a-JSON/output.nq @@ -0,0 +1 @@ + "September, 2010" . diff --git a/src/test/resources/rml-core/RMLTC0013a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0013a-JSON/persons.json new file mode 100644 index 00000000..d7472e18 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0013a-JSON/persons.json @@ -0,0 +1,6 @@ +{ + "persons": [ + {"ID":"1","Name":"Alice","DateOfBirth":null}, + {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/README.md b/src/test/resources/rml-core/RMLTC0015a-JSON/README.md new file mode 100644 index 00000000..6724525b --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015a-JSON/README.md @@ -0,0 +1,77 @@ +## RMLTC0015a-JSON + +**Title**: "Generation of language tags from a table with language information" + +**Description**: "Generation of language tags from a table with language information" + +**Error expected?** No + +**Input** +``` +{ + "countries": [ + {"Code": "BO", "Name": "Bolivia, Plurinational State of"}, + {"Code": "IE", "Name": "Ireland"} + ] +} + +``` + +**Mapping** +``` +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_en.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:language "en"; + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Code}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_es.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:language "es"; + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Code}" + ] . + +``` + +**Output** +``` + "Bolivia, Plurinational State of"@en . + "Estado Plurinacional de Bolivia"@es . + "Ireland"@en . + "Irlanda"@es . + + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/country_en.json b/src/test/resources/rml-core/RMLTC0015a-JSON/country_en.json new file mode 100644 index 00000000..84a05519 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015a-JSON/country_en.json @@ -0,0 +1,6 @@ +{ + "countries": [ + {"Code": "BO", "Name": "Bolivia, Plurinational State of"}, + {"Code": "IE", "Name": "Ireland"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/country_es.json b/src/test/resources/rml-core/RMLTC0015a-JSON/country_es.json new file mode 100644 index 00000000..b861adf0 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015a-JSON/country_es.json @@ -0,0 +1,6 @@ +{ + "countries": [ + {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"}, + {"Code": "IE", "Name": "Irlanda"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0015a-JSON/mapping.ttl new file mode 100644 index 00000000..4c3a5035 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015a-JSON/mapping.ttl @@ -0,0 +1,42 @@ +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_en.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:language "en"; + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Code}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_es.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:language "es"; + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Code}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0015a-JSON/output.nq new file mode 100644 index 00000000..a80dd6a3 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015a-JSON/output.nq @@ -0,0 +1,6 @@ + "Bolivia, Plurinational State of"@en . + "Estado Plurinacional de Bolivia"@es . + "Ireland"@en . + "Irlanda"@es . + + diff --git a/src/test/resources/rml-core/RMLTC0015b-JSON/README.md b/src/test/resources/rml-core/RMLTC0015b-JSON/README.md new file mode 100644 index 00000000..77492a08 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015b-JSON/README.md @@ -0,0 +1,66 @@ +## RMLTC0015b-JSON + +**Title**: "Generation of language tags from a table with language information, and a term map with invalid rml:language value" + +**Description**: "Tests a term map with an invalid rml:language value, which is an error" + +**Error expected?** Yes + +**Input** +``` +{ + "countries": [ + {"Code": "BO", "Name": "Bolivia, Plurinational State of"}, + {"Code": "IE", "Name": "Ireland"} + ] +} + +``` + +**Mapping** +``` +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_en.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:language "a-english"; + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Code}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_en.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:language "a-spanish"; + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Code}" + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0015b-JSON/country_en.json b/src/test/resources/rml-core/RMLTC0015b-JSON/country_en.json new file mode 100644 index 00000000..84a05519 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015b-JSON/country_en.json @@ -0,0 +1,6 @@ +{ + "countries": [ + {"Code": "BO", "Name": "Bolivia, Plurinational State of"}, + {"Code": "IE", "Name": "Ireland"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0015b-JSON/country_es.json b/src/test/resources/rml-core/RMLTC0015b-JSON/country_es.json new file mode 100644 index 00000000..b861adf0 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015b-JSON/country_es.json @@ -0,0 +1,6 @@ +{ + "countries": [ + {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"}, + {"Code": "IE", "Name": "Irlanda"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0015b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0015b-JSON/mapping.ttl new file mode 100644 index 00000000..6f485f7d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0015b-JSON/mapping.ttl @@ -0,0 +1,42 @@ +@prefix rdfs: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_en.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:language "a-english"; + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Code}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.countries[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "country_en.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:language "a-spanish"; + rml:reference "$.Name" + ]; + rml:predicate rdfs:label + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Code}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/README.md b/src/test/resources/rml-core/RMLTC0019a-JSON/README.md new file mode 100644 index 00000000..6c906c7d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0019a-JSON/README.md @@ -0,0 +1,60 @@ +## RMLTC0019a-JSON + +**Title**: "Generation of triples by using IRI value in columns" + +**Description**: "Test the generation of triples by using IRI value in attributes" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + { + "ID": 10, + "FirstName": "http://example.com/ns#Jhon", + "LastName": "Smith" + }, + { + "ID": 20, + "FirstName": "Carlos", + "LastName": "Mendoza" + } + ] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:reference "$.FirstName" + ] . + +``` + +**Output** +``` + "http://example.com/ns#Jhon" . + "Carlos" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0019a-JSON/mapping.ttl new file mode 100644 index 00000000..2870ff6e --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0019a-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:reference "$.FirstName" + ] . diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq new file mode 100644 index 00000000..d07559d8 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq @@ -0,0 +1,2 @@ + "http://example.com/ns#Jhon" . + "Carlos" . diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0019a-JSON/persons.json new file mode 100644 index 00000000..01420506 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0019a-JSON/persons.json @@ -0,0 +1,14 @@ +{ + "persons": [ + { + "ID": 10, + "FirstName": "http://example.com/ns#Jhon", + "LastName": "Smith" + }, + { + "ID": 20, + "FirstName": "Carlos", + "LastName": "Mendoza" + } + ] +} diff --git a/src/test/resources/rml-core/RMLTC0019b-JSON/README.md b/src/test/resources/rml-core/RMLTC0019b-JSON/README.md new file mode 100644 index 00000000..73dcd7b4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0019b-JSON/README.md @@ -0,0 +1,63 @@ +## RMLTC0019b-JSON + +**Title**: "Generation of triples by using IRI value in columns, with data error" + +**Description**: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + { + "ID": 10, + "FirstName": "http://example.com/ns#Jhon", + "LastName": "Smith" + }, + { + "ID": 20, + "FirstName": "Carlos", + "LastName": "Mendoza" + }, + { + "ID": 30, + "FirstName": "Juan Daniel", + "LastName": "Crespo" + } + ] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:reference "$.FirstName" + ] . + +``` + +**Output** +``` + +``` + diff --git a/src/test/resources/rml-core/RMLTC0019b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0019b-JSON/mapping.ttl new file mode 100644 index 00000000..2870ff6e --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0019b-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.FirstName" + ]; + rml:predicate foaf:name + ]; + rml:subjectMap [ + rml:reference "$.FirstName" + ] . diff --git a/src/test/resources/rml-core/RMLTC0019b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0019b-JSON/output.nq new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json new file mode 100644 index 00000000..ba1e6036 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json @@ -0,0 +1,19 @@ +{ + "persons": [ + { + "ID": 10, + "FirstName": "http://example.com/ns#Jhon", + "LastName": "Smith" + }, + { + "ID": 20, + "FirstName": "Carlos", + "LastName": "Mendoza" + }, + { + "ID": 30, + "FirstName": "Juan Daniel", + "LastName": "Crespo" + } + ] +} diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/README.md b/src/test/resources/rml-core/RMLTC0020a-JSON/README.md new file mode 100644 index 00000000..1458831b --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0020a-JSON/README.md @@ -0,0 +1,58 @@ +## RMLTC0020a-JSON + +**Title**: "Generation of triples by using IRI value in columns" + +**Description**: "Test the generation of triples by using IRI value in attributes" + +**Error expected?** No + +**Input** +``` +{ + "students": [ + {"Name": "http://example.com/company/Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "path/../Danny"}, + {"Name": "Emily Smith"} + ] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "{$.Name}"; + rml:termType rml:IRI + ] . + +``` + +**Output** +``` + . + . + . + . + . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0020a-JSON/mapping.ttl new file mode 100644 index 00000000..0d2892f8 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0020a-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "{$.Name}"; + rml:termType rml:IRI + ] . diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq new file mode 100644 index 00000000..65071a55 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq @@ -0,0 +1,5 @@ + . + . + . + . + . diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/student.json b/src/test/resources/rml-core/RMLTC0020a-JSON/student.json new file mode 100644 index 00000000..3b14e8fd --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0020a-JSON/student.json @@ -0,0 +1,9 @@ +{ + "students": [ + {"Name": "http://example.com/company/Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "path/../Danny"}, + {"Name": "Emily Smith"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0021a-JSON/README.md b/src/test/resources/rml-core/RMLTC0021a-JSON/README.md new file mode 100644 index 00000000..b5511f29 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0021a-JSON/README.md @@ -0,0 +1,73 @@ +## RMLTC0021a-JSON + +**Title**: "Generation of triples referencing object map" + +**Description**: "Tests the mapping specification referencing object map with same logical source and join condition" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus Williams", + "Sport": "Tennis" + }, { + "ID": 20, + "Name":"Serena Williams", + "Sport": "Tennis" + }, { + "ID": 30, + "Name":"Loena Hendrickx", + "Sport": "Figure skating" + }] +} + +``` + +**Mapping** +``` +@prefix activity: . +@prefix ex: . +@prefix rdf: . +@prefix rml: . + + a rml:RefObjectMap; + rml:joinCondition [ + rml:child "$.Sport"; + rml:parent "$.Sport" + ]; + rml:parentTriplesMap . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap ; + rml:predicate ex:sameSportAs + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . + +``` + +**Output** +``` + . + . + . + . + . + + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0021a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0021a-JSON/mapping.ttl new file mode 100644 index 00000000..f7a7d85a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0021a-JSON/mapping.ttl @@ -0,0 +1,28 @@ +@prefix activity: . +@prefix ex: . +@prefix rdf: . +@prefix rml: . + + a rml:RefObjectMap; + rml:joinCondition [ + rml:child "$.Sport"; + rml:parent "$.Sport" + ]; + rml:parentTriplesMap . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap ; + rml:predicate ex:sameSportAs + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.ID}/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0021a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0021a-JSON/output.nq new file mode 100644 index 00000000..4488c582 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0021a-JSON/output.nq @@ -0,0 +1,7 @@ + . + . + . + . + . + + diff --git a/src/test/resources/rml-core/RMLTC0021a-JSON/student.json b/src/test/resources/rml-core/RMLTC0021a-JSON/student.json new file mode 100644 index 00000000..a1d5027d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0021a-JSON/student.json @@ -0,0 +1,15 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus Williams", + "Sport": "Tennis" + }, { + "ID": 20, + "Name":"Serena Williams", + "Sport": "Tennis" + }, { + "ID": 30, + "Name":"Loena Hendrickx", + "Sport": "Figure skating" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0022a-JSON/README.md b/src/test/resources/rml-core/RMLTC0022a-JSON/README.md new file mode 100644 index 00000000..514bc3dd --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022a-JSON/README.md @@ -0,0 +1,61 @@ +## RMLTC0022a-JSON + +**Title**: "Generating of triples with constant datatype" + +**Description**: "Test triples with a fixed constant datatype" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . +@prefix xsd: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatype xsd:string; + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:datatype xsd:int; + rml:reference "$.Age" + ]; + rml:predicate ex:age + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Name}" + ] . + +``` + +**Output** +``` + "Venus"^^ . + "21"^^ . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0022a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0022a-JSON/mapping.ttl new file mode 100644 index 00000000..761e5507 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022a-JSON/mapping.ttl @@ -0,0 +1,30 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . +@prefix xsd: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatype xsd:string; + rml:reference "$.Name" + ]; + rml:predicate foaf:name + ], [ + rml:objectMap [ + rml:datatype xsd:int; + rml:reference "$.Age" + ]; + rml:predicate ex:age + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.Name}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0022a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0022a-JSON/output.nq new file mode 100644 index 00000000..f18b6f47 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022a-JSON/output.nq @@ -0,0 +1,2 @@ + "Venus"^^ . + "21"^^ . diff --git a/src/test/resources/rml-core/RMLTC0022a-JSON/student.json b/src/test/resources/rml-core/RMLTC0022a-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022a-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0022b-JSON/README.md b/src/test/resources/rml-core/RMLTC0022b-JSON/README.md new file mode 100644 index 00000000..4f280921 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022b-JSON/README.md @@ -0,0 +1,56 @@ +## RMLTC0022b-JSON + +**Title**: "Generating of triples with datatypeMap" + +**Description**: "Test triples with a XSD datatype generated from the data" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatypeMap [ + rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}" + ]; + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.FOO}" + ] . + + +``` + +**Output** +``` + "1"^^ . + "2"^^ . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0022b-JSON/data.json b/src/test/resources/rml-core/RMLTC0022b-JSON/data.json new file mode 100644 index 00000000..6b0dcef9 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022b-JSON/data.json @@ -0,0 +1,4 @@ +[ + { "FOO": 1, "BAR": "string"}, + { "FOO": 2, "BAR": "int"} +] diff --git a/src/test/resources/rml-core/RMLTC0022b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0022b-JSON/mapping.ttl new file mode 100644 index 00000000..dec8c244 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022b-JSON/mapping.ttl @@ -0,0 +1,25 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatypeMap [ + rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}" + ]; + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.FOO}" + ] . + diff --git a/src/test/resources/rml-core/RMLTC0022b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0022b-JSON/output.nq new file mode 100644 index 00000000..0e3c60c4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022b-JSON/output.nq @@ -0,0 +1,2 @@ + "1"^^ . + "2"^^ . diff --git a/src/test/resources/rml-core/RMLTC0022b-JSON/student.json b/src/test/resources/rml-core/RMLTC0022b-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022b-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0022c-JSON/README.md b/src/test/resources/rml-core/RMLTC0022c-JSON/README.md new file mode 100644 index 00000000..81444a3d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022c-JSON/README.md @@ -0,0 +1,55 @@ +## RMLTC0022c-JSON + +**Title**: "Generating of triples with datatypeMap with custom datatype" + +**Description**: "Test triples with a custom datype from the data" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatypeMap [ + rml:template "datatype#{$.BAR}" + ]; + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.FOO}" + ] . + +``` + +**Output** +``` + "1"^^ . + "2"^^ . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0022c-JSON/data.json b/src/test/resources/rml-core/RMLTC0022c-JSON/data.json new file mode 100644 index 00000000..6b0dcef9 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022c-JSON/data.json @@ -0,0 +1,4 @@ +[ + { "FOO": 1, "BAR": "string"}, + { "FOO": 2, "BAR": "int"} +] diff --git a/src/test/resources/rml-core/RMLTC0022c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0022c-JSON/mapping.ttl new file mode 100644 index 00000000..c76b54ee --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022c-JSON/mapping.ttl @@ -0,0 +1,24 @@ +@prefix ex: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "data.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:datatypeMap [ + rml:template "datatype#{$.BAR}" + ]; + rml:reference "$.FOO" + ]; + rml:predicate ex:x + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.FOO}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0022c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0022c-JSON/output.nq new file mode 100644 index 00000000..0e3c60c4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022c-JSON/output.nq @@ -0,0 +1,2 @@ + "1"^^ . + "2"^^ . diff --git a/src/test/resources/rml-core/RMLTC0022c-JSON/student.json b/src/test/resources/rml-core/RMLTC0022c-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0022c-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0023a-JSON/README.md b/src/test/resources/rml-core/RMLTC0023a-JSON/README.md new file mode 100644 index 00000000..d117d362 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023a-JSON/README.md @@ -0,0 +1,40 @@ +## RMLTC0023a-JSON + +**Title**: "Invalid IRI template 1" + +**Description**: "Test handling of invalid IRI template" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{NON_EXISTING_COLUMN}"; + rml:class foaf:Person; + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0023a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0023a-JSON/mapping.ttl new file mode 100644 index 00000000..0e890d83 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023a-JSON/mapping.ttl @@ -0,0 +1,16 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{NON_EXISTING_COLUMN}"; + rml:class foaf:Person; + ] . diff --git a/src/test/resources/rml-core/RMLTC0023a-JSON/student.json b/src/test/resources/rml-core/RMLTC0023a-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023a-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0023b-JSON/README.md b/src/test/resources/rml-core/RMLTC0023b-JSON/README.md new file mode 100644 index 00000000..ac69aec3 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023b-JSON/README.md @@ -0,0 +1,40 @@ +## RMLTC0023b-JSON + +**Title**: "Invalid IRI template 2" + +**Description**: "Test handling of invalid IRI template" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "ID": 10, + "{Name}":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{{Name}}"; + rml:class foaf:Person; + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0023b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0023b-JSON/mapping.ttl new file mode 100644 index 00000000..4c4e6923 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023b-JSON/mapping.ttl @@ -0,0 +1,16 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{{Name}}"; + rml:class foaf:Person; + ] . diff --git a/src/test/resources/rml-core/RMLTC0023b-JSON/student.json b/src/test/resources/rml-core/RMLTC0023b-JSON/student.json new file mode 100644 index 00000000..2aa21689 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023b-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "{Name}":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0023c-JSON/README.md b/src/test/resources/rml-core/RMLTC0023c-JSON/README.md new file mode 100644 index 00000000..2b7b103d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023c-JSON/README.md @@ -0,0 +1,41 @@ +## RMLTC0023c-JSON + +**Title**: "Invalid IRI template 3" + +**Description**: "Test handling of invalid IRI template" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "ID": 10, + "N\ame":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{N\ame}"; + rml:class foaf:Person; + ] . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0023c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0023c-JSON/mapping.ttl new file mode 100644 index 00000000..e23f6935 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023c-JSON/mapping.ttl @@ -0,0 +1,17 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{N\ame}"; + rml:class foaf:Person; + ] . + diff --git a/src/test/resources/rml-core/RMLTC0023c-JSON/student.json b/src/test/resources/rml-core/RMLTC0023c-JSON/student.json new file mode 100644 index 00000000..a905e537 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023c-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "N\ame":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0023d-JSON/README.md b/src/test/resources/rml-core/RMLTC0023d-JSON/README.md new file mode 100644 index 00000000..c3073f9c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023d-JSON/README.md @@ -0,0 +1,41 @@ +## RMLTC0023d-JSON + +**Title**: "Invalid IRI template 4" + +**Description**: "Test handling of invalid IRI template" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name\}"; + rml:class foaf:Person; + ] . + + +``` + diff --git a/src/test/resources/rml-core/RMLTC0023d-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0023d-JSON/mapping.ttl new file mode 100644 index 00000000..0b46f351 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023d-JSON/mapping.ttl @@ -0,0 +1,17 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name\}"; + rml:class foaf:Person; + ] . + diff --git a/src/test/resources/rml-core/RMLTC0023d-JSON/student.json b/src/test/resources/rml-core/RMLTC0023d-JSON/student.json new file mode 100644 index 00000000..0f6f797f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023d-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "Name":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0023e-JSON/README.md b/src/test/resources/rml-core/RMLTC0023e-JSON/README.md new file mode 100644 index 00000000..d5504619 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023e-JSON/README.md @@ -0,0 +1,47 @@ +## RMLTC0023e-JSON + +**Title**: "Invalid IRI template 5" + +**Description**: "Test handling of invalid IRI template" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "{Name}":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{\\{Name\\}}"; + rml:class foaf:Person; + ] . + + +``` + +**Output** +``` + . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0023e-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0023e-JSON/mapping.ttl new file mode 100644 index 00000000..6a619068 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023e-JSON/mapping.ttl @@ -0,0 +1,17 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{\\{Name\\}}"; + rml:class foaf:Person; + ] . + diff --git a/src/test/resources/rml-core/RMLTC0023e-JSON/student.json b/src/test/resources/rml-core/RMLTC0023e-JSON/student.json new file mode 100644 index 00000000..2aa21689 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023e-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "{Name}":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0023f-JSON/README.md b/src/test/resources/rml-core/RMLTC0023f-JSON/README.md new file mode 100644 index 00000000..167724e5 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023f-JSON/README.md @@ -0,0 +1,46 @@ +## RMLTC0023f-JSON + +**Title**: "Invalid IRI template 6" + +**Description**: "Test handling of invalid IRI template" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "N\ame":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{N\\\ame}"; + rml:class foaf:Person; + ] . + +``` + +**Output** +``` + . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0023f-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0023f-JSON/mapping.ttl new file mode 100644 index 00000000..98c1d29e --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023f-JSON/mapping.ttl @@ -0,0 +1,16 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{N\\\ame}"; + rml:class foaf:Person; + ] . diff --git a/src/test/resources/rml-core/RMLTC0023f-JSON/student.json b/src/test/resources/rml-core/RMLTC0023f-JSON/student.json new file mode 100644 index 00000000..a905e537 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023f-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "N\ame":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0025a-JSON/README.md b/src/test/resources/rml-core/RMLTC0025a-JSON/README.md new file mode 100644 index 00000000..5bf2ee67 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025a-JSON/README.md @@ -0,0 +1,53 @@ +## RMLTC0025a-JSON + +**Title**: "Generation of triples with constant blank node " + +**Description**: "Tests the generation of triples with a constant blank node" + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "Name":"Venus" + }, + { + "Name":"Julio" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . +@prefix ex: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:student + ]; + rml:subject _:School . + +``` + +**Output** +``` +_:School "Julio" . +_:School "Venus" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0025a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0025a-JSON/mapping.ttl new file mode 100644 index 00000000..fb1a85a8 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025a-JSON/mapping.ttl @@ -0,0 +1,20 @@ +@prefix foaf: . +@prefix rml: . +@prefix ex: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:student + ]; + rml:subject _:School . diff --git a/src/test/resources/rml-core/RMLTC0025a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0025a-JSON/output.nq new file mode 100644 index 00000000..0c848cda --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025a-JSON/output.nq @@ -0,0 +1,2 @@ +_:School "Julio" . +_:School "Venus" . diff --git a/src/test/resources/rml-core/RMLTC0025a-JSON/student.json b/src/test/resources/rml-core/RMLTC0025a-JSON/student.json new file mode 100644 index 00000000..10ebb2e1 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025a-JSON/student.json @@ -0,0 +1,8 @@ +{ + "students": [{ + "Name":"Venus" + }, + { + "Name":"Julio" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0025b-JSON/README.md b/src/test/resources/rml-core/RMLTC0025b-JSON/README.md new file mode 100644 index 00000000..d2bb61be --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025b-JSON/README.md @@ -0,0 +1,49 @@ +## RMLTC0025b-JSON + +**Title**: "Usage of constant term maps in combination with explicitly defined term types" + +**Description**: "Tests the usage of constant term maps in combination with explicitly defined term types" + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "Name":"Venus" + }, + { + "Name":"Julio" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . +@prefix ex: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:student + ]; + rml:subjectMap [ + rml:constant "School"; + rml:termType rml:BlankNode + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0025b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0025b-JSON/mapping.ttl new file mode 100644 index 00000000..387a3943 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025b-JSON/mapping.ttl @@ -0,0 +1,23 @@ +@prefix foaf: . +@prefix rml: . +@prefix ex: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:student + ]; + rml:subjectMap [ + rml:constant "School"; + rml:termType rml:BlankNode + ] . diff --git a/src/test/resources/rml-core/RMLTC0025b-JSON/student.json b/src/test/resources/rml-core/RMLTC0025b-JSON/student.json new file mode 100644 index 00000000..10ebb2e1 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025b-JSON/student.json @@ -0,0 +1,8 @@ +{ + "students": [{ + "Name":"Venus" + }, + { + "Name":"Julio" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/README.md b/src/test/resources/rml-core/RMLTC0026a-JSON/README.md new file mode 100644 index 00000000..85e87a24 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/README.md @@ -0,0 +1,53 @@ +## RMLTC0026a-JSON + +**Title**: "Generation of triples from arrays" + +**Description**: "Tests the generation of triples from array input data structures" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amounts" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.fname}/{$.lname}" + ] . + +``` + +**Output** +``` + "30" . + "40" . + "50" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl new file mode 100644 index 00000000..780bd99a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amounts" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.fname}/{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq new file mode 100644 index 00000000..3b8e09fb --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq @@ -0,0 +1,3 @@ + "30" . + "40" . + "50" . diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json new file mode 100644 index 00000000..705406a9 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json @@ -0,0 +1,5 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0027a-JSON/README.md b/src/test/resources/rml-core/RMLTC0027a-JSON/README.md new file mode 100644 index 00000000..f1710ce8 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027a-JSON/README.md @@ -0,0 +1,75 @@ +## RMLTC0027a-JSON + +**Title**: "Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs" + +**Description**: "Tests the generation of triples from relative IRIs using base IRI" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.lname}" + ] . + +``` + +**Output** +``` + "30" . + "20" . + "30" . + "20" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0027a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0027a-JSON/mapping.ttl new file mode 100644 index 00000000..41ed54da --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027a-JSON/mapping.ttl @@ -0,0 +1,42 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0027a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0027a-JSON/output.nq new file mode 100644 index 00000000..0fbfa129 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027a-JSON/output.nq @@ -0,0 +1,4 @@ + "30" . + "20" . + "30" . + "20" . diff --git a/src/test/resources/rml-core/RMLTC0027a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0027a-JSON/persons.json new file mode 100644 index 00000000..b7f1a04f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027a-JSON/persons.json @@ -0,0 +1,6 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0027b-JSON/README.md b/src/test/resources/rml-core/RMLTC0027b-JSON/README.md new file mode 100644 index 00000000..0caf95be --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027b-JSON/README.md @@ -0,0 +1,76 @@ +## RMLTC0027b-JSON + +**Title**: "Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter" + +**Description**: "Tests the generation of triples from relative IRI using base IRI parameter" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . +@base . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . + +``` + +**Output** +``` + "30" . + "20" . + "30" . + "20" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0027b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0027b-JSON/mapping.ttl new file mode 100644 index 00000000..bf2b788c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027b-JSON/mapping.ttl @@ -0,0 +1,43 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . +@base . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0027b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0027b-JSON/output.nq new file mode 100644 index 00000000..0fbfa129 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027b-JSON/output.nq @@ -0,0 +1,4 @@ + "30" . + "20" . + "30" . + "20" . diff --git a/src/test/resources/rml-core/RMLTC0027b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0027b-JSON/persons.json new file mode 100644 index 00000000..b7f1a04f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027b-JSON/persons.json @@ -0,0 +1,6 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0027c-JSON/README.md b/src/test/resources/rml-core/RMLTC0027c-JSON/README.md new file mode 100644 index 00000000..b93968e1 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027c-JSON/README.md @@ -0,0 +1,76 @@ +## RMLTC0027c-JSON + +**Title**: "Two triples maps, both with rml:baseIRI defined" + +**Description**: "Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . + +``` + +**Output** +``` + "30" . + "20" . + "30" . + "20" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0027c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0027c-JSON/mapping.ttl new file mode 100644 index 00000000..d2825418 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027c-JSON/mapping.ttl @@ -0,0 +1,43 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0027c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0027c-JSON/output.nq new file mode 100644 index 00000000..0fbfa129 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027c-JSON/output.nq @@ -0,0 +1,4 @@ + "30" . + "20" . + "30" . + "20" . diff --git a/src/test/resources/rml-core/RMLTC0027c-JSON/persons.json b/src/test/resources/rml-core/RMLTC0027c-JSON/persons.json new file mode 100644 index 00000000..b7f1a04f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027c-JSON/persons.json @@ -0,0 +1,6 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0027d-JSON/README.md b/src/test/resources/rml-core/RMLTC0027d-JSON/README.md new file mode 100644 index 00000000..34d51f07 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027d-JSON/README.md @@ -0,0 +1,77 @@ +## RMLTC0027d-JSON + +**Title**: "Two triples maps,both with rml:bseIRI defined overwritten by baseIRI parameter" + +**Description**: "Tests the generation of triples by with base IRIs different than the base IRI parameter" + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . +@base . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . + +``` + +**Output** +``` + "30" . + "20" . + "30" . + "20" . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0027d-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0027d-JSON/mapping.ttl new file mode 100644 index 00000000..09c495ce --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027d-JSON/mapping.ttl @@ -0,0 +1,44 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . +@base . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0027d-JSON/output.nq b/src/test/resources/rml-core/RMLTC0027d-JSON/output.nq new file mode 100644 index 00000000..d39b1093 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027d-JSON/output.nq @@ -0,0 +1,4 @@ + "30" . + "20" . + "30" . + "20" . diff --git a/src/test/resources/rml-core/RMLTC0027d-JSON/persons.json b/src/test/resources/rml-core/RMLTC0027d-JSON/persons.json new file mode 100644 index 00000000..b7f1a04f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027d-JSON/persons.json @@ -0,0 +1,6 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0028a-JSON/README.md b/src/test/resources/rml-core/RMLTC0028a-JSON/README.md new file mode 100644 index 00000000..533278be --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028a-JSON/README.md @@ -0,0 +1,58 @@ +## RMLTC0028a-JSON + +**Title**: "Generation of triples using the URI term type" + +**Description**: "Tests the generation of triples with a URI term type in the subject or object" + +**Error expected?** No + +**Input** +``` +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:URI + ] . + +``` + +**Output** +``` + . + . + . + . + . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0028a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0028a-JSON/mapping.ttl new file mode 100644 index 00000000..2d873b5a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028a-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:URI + ] . diff --git a/src/test/resources/rml-core/RMLTC0028a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0028a-JSON/output.nq new file mode 100644 index 00000000..0d4f5564 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028a-JSON/output.nq @@ -0,0 +1,5 @@ + . + . + . + . + . diff --git a/src/test/resources/rml-core/RMLTC0028a-JSON/student.json b/src/test/resources/rml-core/RMLTC0028a-JSON/student.json new file mode 100644 index 00000000..c1c6e961 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028a-JSON/student.json @@ -0,0 +1,9 @@ +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0028b-JSON/README.md b/src/test/resources/rml-core/RMLTC0028b-JSON/README.md new file mode 100644 index 00000000..8622292f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028b-JSON/README.md @@ -0,0 +1,58 @@ +## RMLTC0028b-JSON + +**Title**: "Generation of triples using the UnsafeURI term type" + +**Description**: "Tests the generation of triples with a UnsafeURI term type in the subject or object" + +**Error expected?** No + +**Input** +``` +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:UnsafeURI + ] . + +``` + +**Output** +``` + . + . + . + . + . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0028b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0028b-JSON/mapping.ttl new file mode 100644 index 00000000..803c17e1 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028b-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:UnsafeURI + ] . diff --git a/src/test/resources/rml-core/RMLTC0028b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0028b-JSON/output.nq new file mode 100644 index 00000000..0d4f5564 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028b-JSON/output.nq @@ -0,0 +1,5 @@ + . + . + . + . + . diff --git a/src/test/resources/rml-core/RMLTC0028b-JSON/student.json b/src/test/resources/rml-core/RMLTC0028b-JSON/student.json new file mode 100644 index 00000000..c1c6e961 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028b-JSON/student.json @@ -0,0 +1,9 @@ +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0028c-JSON/README.md b/src/test/resources/rml-core/RMLTC0028c-JSON/README.md new file mode 100644 index 00000000..45998be4 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028c-JSON/README.md @@ -0,0 +1,58 @@ +## RMLTC0028c-JSON + +**Title**: "Generation of triples using the UnsafeIRI term type" + +**Description**: "Tests the generation of triples with a UnsafeIRI term type in the subject or object" + +**Error expected?** No + +**Input** +``` +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:UnsafeIRI + ] . + +``` + +**Output** +``` + . + . + . + . + . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0028c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0028c-JSON/mapping.ttl new file mode 100644 index 00000000..4a03ab54 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028c-JSON/mapping.ttl @@ -0,0 +1,21 @@ +@prefix foaf: . +@prefix rdf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:object foaf:Person; + rml:predicate rdf:type + ]; + rml:subjectMap [ + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:UnsafeIRI + ] . diff --git a/src/test/resources/rml-core/RMLTC0028c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0028c-JSON/output.nq new file mode 100644 index 00000000..0d4f5564 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028c-JSON/output.nq @@ -0,0 +1,5 @@ + . + . + . + . + . diff --git a/src/test/resources/rml-core/RMLTC0028c-JSON/student.json b/src/test/resources/rml-core/RMLTC0028c-JSON/student.json new file mode 100644 index 00000000..c1c6e961 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028c-JSON/student.json @@ -0,0 +1,9 @@ +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} diff --git a/src/test/resources/rml-core/config.js b/src/test/resources/rml-core/config.js new file mode 100644 index 00000000..04c4caa8 --- /dev/null +++ b/src/test/resources/rml-core/config.js @@ -0,0 +1,72 @@ +async function loadTurtle() { + //this is the function you call in 'preProcess', to load the highlighter + const worker = await new Promise(resolve => { + require(["core/worker"], ({ worker }) => resolve(worker)); + }); + const action = "highlight-load-lang"; + const langURL = + "https://cdn.jsdelivr.net/gh/redmer/highlightjs-turtle/src/languages/turtle.js"; + const propName = "hljsDefineTurtle"; // This funtion is defined in the highlighter being loaded + const lang = "turtle"; // this is the class you use to identify the language + worker.postMessage({ action, langURL, propName, lang }); + return new Promise(resolve => { + worker.addEventListener("message", function listener({ data }) { + const { action: responseAction, lang: responseLang } = data; + if (responseAction === action && responseLang === lang) { + worker.removeEventListener("message", listener); + resolve(); + } + }); + }); +} + +var respecConfig = { + // check https://respec.org/docs/ for the meaning of these keys + preProcess: [loadTurtle], + authors: [ + { + name: "Dylan Van Assche", + url: "https://dylanvanassche.be", + company: "IDLab – Ghent University – imec", + orcid: "0000-0002-7195-9935", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + edDraftURI: "https://w3id.org/rml/core/test-cases/", + editors: [ + { + name: "Dylan Van Assche", + url: "https://dylanvanassche.be", + company: "IDLab – Ghent University – imec", + orcid: "0000-0002-7195-9935", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + formerEditors: [ + ], + github: "https://github.com/kg-construct/rml-core", + license: "w3c-software-doc", + localBiblio: { + "RML-Core": { + title: "RML-Core", + href: "https://w3id.org/rml/core/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "07 August 2024", + }, + "RML-IO": { + title: "RML-IO", + href: "https://w3id.org/rml/io/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "12 March 2024", + }, + }, + otherLinks: [], + shortName: "RML-Core-Testcases", + specStatus: "CG-DRAFT", + // W3C config + copyrightStart: "2024", + doJsonLd: true, + group: "kg-construct", +}; diff --git a/src/test/resources/rml-core/descriptions.csv b/src/test/resources/rml-core/descriptions.csv new file mode 100644 index 00000000..a291d76e --- /dev/null +++ b/src/test/resources/rml-core/descriptions.csv @@ -0,0 +1,437 @@ +ID,Title,Purpose,"Error +expected?",Input ,"Output +default","Output +1","Output +2","Output +3",Comment +RMLTC0000-CSV,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-JSON,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-XML,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-MySQL,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-PostgreSQL,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-SQLServer,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-SPARQL,Empty dataset,Test if an empty dataset produces an empty RDF graph,no,,,,,, +RMLTC0001a-CSV,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-JSON,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-XML,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-MySQL,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-PostgreSQL,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-SQLServer,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-SPARQL,"One tripple mapping, subject URI generation by using rml:template",Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one tripple to one property,no,,,,,, +RMLTC0001b-CSV,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-JSON,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-XML,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-MySQL,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-PostgreSQL,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-SQLServer,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-SPARQL,"One tripple mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one tripple to one property,no,,,,,, +RMLTC0002a-CSV,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-JSON,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-XML,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-MySQL,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-PostgreSQL,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-SQLServer,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-SPARQL,"Two tripples mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two tripple mapping, no primary key; (2) subject URI generated by the concatenation of two tripple object values; (3) one tripple object to one property",no,,,,,, +RMLTC0002b-CSV,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-JSON,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-XML,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-MySQL,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-PostgreSQL,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-SQLServer,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-SPARQL,"Two tripples maping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two tripple mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one triple to one property",no,,,,,, +RMLTC0002c-CSV,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-JSON,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-XML,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-MySQL,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-PostgreSQL,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-SQLServer,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002d-MySQL,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, +RMLTC0002d-PostgreSQL,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, +RMLTC0002d-SQLServer,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, +RMLTC0002e-CSV,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-JSON,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-XML,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-MySQL,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-PostgreSQL,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-SQLServer,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002f-MySQL,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, +RMLTC0002f-PostgreSQL,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, +RMLTC0002f-SQLServer,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, +RMLTC0002g-JSON,"Two columns mapping, invalid JSONPath",Test the presence of an invalid JSONPath,yes,,,,,, +RMLTC0002g-MySQL,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, +RMLTC0002g-PostgreSQL,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, +RMLTC0002g-SQLServer,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, +RMLTC0002g-SPARQL,"Two tripples mapping, invalid SPARQL query",Tests the presence of an invalid SPARQL query,yes,,,,,, +RMLTC0002h-MySQL,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, +RMLTC0002h-PostgreSQL,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, +RMLTC0002h-SQLServer,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, +RMLTC0002h-SPARQL,"Two tripples mapping, duplicate variable name in SELECT",Tests the presence of duplicate variable names in the SELECT list of the SPARQL query,yes,,,,,, +RMLTC0002i-MySQL,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, +RMLTC0002i-PostgreSQL,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, +RMLTC0002i-SQLServer,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, +RMLTC0002j-MySQL,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, +RMLTC0002j-PostgreSQL,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, +RMLTC0002j-SQLServer,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, +RMLTC0003a-MySQL,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, +RMLTC0003a-PostgreSQL,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, +RMLTC0003a-SQLServer,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, +RMLTC0003b-MySQL,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, +RMLTC0003b-PostgreSQL,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, +RMLTC0003b-SQLServer,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, +RMLTC0003c-CSV,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-JSON,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-XML,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-MySQL,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-PostgreSQL,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-SQLServer,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-SPARQL,"Three tripple mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0004a-CSV,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-JSON,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-XML,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-MySQL,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-PostgreSQL,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-SQLServer,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-SPARQL,"Two BlankNodes mapping, from one object to two different triples","Tests: (1) two BlankNodes mapping, (2) subject URI generated by a tripple object value; (3) from one BlankNode to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004b-CSV,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-JSON,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-XML,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-MySQL,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-PostgreSQL,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-SQLServer,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-SPARQL,"One tripple mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0005a-CSV,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-JSON,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-XML,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-MySQL,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-PostgreSQL,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-SQLServer,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005b-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, +RMLTC0005b-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, +RMLTC0005b-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, +RMLTC0006a-CSV,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-JSON,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-XML,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-MySQL,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-PostgreSQL,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-SQLServer,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-SPARQL,"rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0007a-CSV,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-JSON,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-XML,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-MySQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-PostgreSQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-SQLServer,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-SPARQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007b-CSV,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-JSON,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-XML,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-MySQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-PostgreSQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-SQLServer,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-SPARQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007c-CSV,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-JSON,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-XML,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-MySQL,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-PostgreSQL,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-SQLServer,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-SPARQL,"One object mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007d-CSV,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-JSON,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-XML,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-MySQL,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-PostgreSQL,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-SQLServer,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-SPARQL,"One object mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007e-CSV,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-JSON,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-XML,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-MySQL,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-PostgreSQL,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-SQLServer,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-SPARQL,"One object mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007f-CSV,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-JSON,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-XML,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-MySQL,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-PostgreSQL,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-SQLServer,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-SPARQL,"One object mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007g-CSV,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-JSON,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-XML,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-MySQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-PostgreSQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-SQLServer,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-SPARQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007h-CSV,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-JSON,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-XML,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-MySQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-PostgreSQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-SQLServer,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-SPARQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0008a-CSV,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-JSON,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-XML,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-MySQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-PostgreSQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-SQLServer,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-SPARQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008b-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008c-CSV,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-JSON,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-XML,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-MySQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-PostgreSQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-SQLServer,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-SPARQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0009a-CSV,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-JSON,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-XML,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-MySQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-PostgreSQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-SQLServer,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-SPARQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009b-CSV,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-JSON,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-XML,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-MySQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-PostgreSQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-SQLServer,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-SPARQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009c-MySQL,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, +RMLTC0009c-PostgreSQL,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, +RMLTC0009c-SQLServer,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, +RMLTC0009d-MySQL,Named column in logical table,Test a logical table named column.,no,,,,,, +RMLTC0009d-PostgreSQL,Named column in logical table,Test a logical table named column.,no,,,,,, +RMLTC0009d-SQLServer,Named column in logical table,Test a logical table named column.,no,,,,,, +RMLTC0010a-CSV,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010a-JSON,Template with table column with blank space,Tests a template with blank space in column value,no,,,,,, +RMLTC0010a-MySQL,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010a-PostgreSQL,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010a-SQLServer,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010b-CSV,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-JSON,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-XML,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-MySQL,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-PostgreSQL,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-SQLServer,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010c-CSV,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-JSON,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-XML,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-MySQL,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-PostgreSQL,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-SQLServer,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, +RMLTC0011a-MySQL,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, +RMLTC0011a-PostgreSQL,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, +RMLTC0011a-SQLServer,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, +RMLTC0011b-CSV,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-JSON,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-XML,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-MySQL,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-PostgreSQL,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-SQLServer,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0012a-CSV,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-JSON,Blank node referencing multiple columns,Tests that blank nodes can be generated by referencing multiple columns,no,,,,,, +RMLTC0012a-XML,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-MySQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-PostgreSQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-SQLServer,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-SPARQL,Duplicate triples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-CSV,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-JSON,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-XML,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-MySQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-PostgreSQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-SQLServer,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-SPARQL,Duplicate triples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012c-CSV,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-JSON,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-XML,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-MySQL,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-PostgreSQL,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-SQLServer,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012d-CSV,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-JSON,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-XML,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-MySQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-PostgreSQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-SQLServer,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012e-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0012e-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0012e-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0013a-JSON,Null value in JSON file,Tests if null values in JSON files are handled correctly.,no,,,,,, +RMLTC0013a-MySQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +RMLTC0013a-PostgreSQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +RMLTC0013a-SQLServer,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +"Inverse expression can only be used for run-time optimizations, i.e., if you use it it will only affect performance, but not the resulting RDF. Therefore, I would suggest to skip those.",Subjectmap with rr:inverseExpression,Tests a rml:subjectMap with rr:inverseExpression,no,,,,,, +,Triplesmaps with rr:inverseExpression and rr:joinCondition,"Test two triplesmaps, one with a rr:inverseExpression and the other with a rr:joinCondition for foerign key relations",no,,,,,, +,"Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps","Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps",no,,,,,, +RMLTC0014d-MySQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0014d-PostgreSQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0014d-SQLServer,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0015a-CSV,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-JSON,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-XML,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-MySQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-PostgreSQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-SQLServer,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015b-CSV,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-JSON,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-XML,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-MySQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-PostgreSQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-SQLServer,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0016a-MySQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016a-PostgreSQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016a-SQLServer,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016b-MySQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016b-PostgreSQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016b-SQLServer,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016c-MySQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016c-PostgreSQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016c-SQLServer,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016d-MySQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016d-PostgreSQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016d-SQLServer,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016e-MySQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0016e-PostgreSQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0016e-SQLServer,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0018a-MySQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0018a-PostgreSQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0018a-SQLServer,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0019a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, +RMLTC0019a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, +RMLTC0019a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019b-CSV,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-JSON,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-XML,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in elements, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-MySQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-PostgreSQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-SQLServer,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0020a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, +RMLTC0020a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, +RMLTC0020a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020b-CSV,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-JSON,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-XML,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-MySQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-PostgreSQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-SQLServer,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0021a-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0012d-MySQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-PostgreSQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-SQLServer,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012e-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0012e-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0012e-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0013a-JSON,Null value in JSON file,Tests if null values in JSON files are handled correctly.,no,,,,,, +RMLTC0013a-MySQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +RMLTC0013a-PostgreSQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +RMLTC0013a-SQLServer,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +"Inverse expression can only be used for run-time optimizations, i.e., if you use it it will only affect performance, but not the resulting RDF. Therefore, I would suggest to skip those.",Subjectmap with rr:inverseExpression,Tests a rml:subjectMap with rr:inverseExpression,no,,,,,, +,Triplesmaps with rr:inverseExpression and rr:joinCondition,"Test two triplesmaps, one with a rr:inverseExpression and the other with a rr:joinCondition for foerign key relations",no,,,,,, +,"Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps","Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps",no,,,,,, +RMLTC0014d-MySQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0014d-PostgreSQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0014d-SQLServer,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0015a-CSV,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-JSON,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-XML,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-MySQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-PostgreSQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-SQLServer,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015b-CSV,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-JSON,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-XML,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-MySQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-PostgreSQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-SQLServer,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0016a-MySQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016a-PostgreSQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016a-SQLServer,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016b-MySQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016b-PostgreSQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016b-SQLServer,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016c-MySQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016c-PostgreSQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016c-SQLServer,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016d-MySQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016d-PostgreSQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016d-SQLServer,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016e-MySQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0016e-PostgreSQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0016e-SQLServer,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0018a-MySQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0018a-PostgreSQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0018a-SQLServer,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0019a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, +RMLTC0019a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, +RMLTC0019a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019b-CSV,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-JSON,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-XML,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in elements, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-MySQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-PostgreSQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-SQLServer,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0020a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, +RMLTC0020a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, +RMLTC0020a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020b-CSV,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-JSON,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-XML,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-MySQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-PostgreSQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-SQLServer,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0021a-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0022a-JSON,Generating of triples with constant datatype,Test triples with a fixed constant datatype,no,,,,,, +RMLTC0022b-JSON,Generating of triples with datatypeMap,Test triples with a XSD datatype generated from the data,no,,,,,, +RMLTC0022c-JSON,Generating of triples with datatypeMap with custom datatype,Test triples with a custom datype from the data,no,,,,,, +,,,,,,,,, +RMLTC0023a-JSON,Invalid IRI template 1,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023b-JSON,Invalid IRI template 2,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023c-JSON,Invalid IRI template 3,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023d-JSON,Invalid IRI template 4,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023e-JSON,Invalid IRI template 5,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023f-JSON,Invalid IRI template 6,Test handling of invalid IRI template,yes,,,,,, +RMLTC0025a-JSON,Generation of triples with constant blank node ,Tests the generation of triples with a constant blank node,no,,,,,, +RMLTC0025b-JSON,Usage of constant term maps in combination with explicitly defined term types,Tests the usage of constant term maps in combination with explicitly defined term types,yes,,,,,, +RMLTC0026a-JSON,Generation of triples from arrays,Tests the generation of triples from array input data structures,no,,,,,, +RMLTC0027a-JSON,"Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs",Tests the generation of triples from relative IRIs using base IRI,no,,,,,, +RMLTC0027b-JSON,"Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter",Tests the generation of triples from relative IRI using base IRI parameter,no,,,,,, +RMLTC0027c-JSON,"Two triples maps, both with rml:baseIRI defined","Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter",no,,,,,, +RMLTC0027d-JSON,"Two triples maps,both with rml:bseIRI defined overwritten by baseIRI parameter",Tests the generation of triples by with base IRIs different than the base IRI parameter,no,,,,,, +RMLTC0028a-JSON,Generation of triples using the URI term type,Tests the generation of triples with a URI term type in the subject or object,no,,,,,, +RMLTC0028b-JSON,Generation of triples using the UnsafeURI term type,Tests the generation of triples with a UnsafeURI term type in the subject or object,no,,,,,, +RMLTC0028c-JSON,Generation of triples using the UnsafeIRI term type,Tests the generation of triples with a UnsafeIRI term type in the subject or object,no,,,,,, \ No newline at end of file diff --git a/src/test/resources/rml-core/dev.html b/src/test/resources/rml-core/dev.html new file mode 100644 index 00000000..cf34fc5f --- /dev/null +++ b/src/test/resources/rml-core/dev.html @@ -0,0 +1,152 @@ + + + + + RML-Core: Test Cases + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/src/test/resources/rml-core/docs/20250130/index.html b/src/test/resources/rml-core/docs/20250130/index.html new file mode 100644 index 00000000..8c6f0c29 --- /dev/null +++ b/src/test/resources/rml-core/docs/20250130/index.html @@ -0,0 +1,19356 @@ + + + + + + +RML-Core: Test Cases + + + + + + + + + + + + + + +
+ +

RML-Core: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Core-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/core/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-core + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-CSV

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
Name
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

6. RMLTC0000-MySQL

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  Name VARCHAR(50)
+);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
# empty database
+
+
+

7. RMLTC0000-PostgreSQL

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
# empty database
+
+
+

8. RMLTC0000-SPARQL

+

Title: "Empty dataset"

+

Description: "Test if an empty dataset produces an empty RDF graph"

+

Error expected? No

+

Input

+

+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            SELECT ?name
+            WHERE {
+                ?name a rdfs:Literal .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+

+
+
+

9. RMLTC0000-SQLServer

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
# empty database
+
+
+

10. RMLTC0000-XML

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

11. RMLTC0001a-CSV

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

12. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

13. RMLTC0001a-MySQL

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

14. RMLTC0001a-PostgreSQL

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

15. RMLTC0001a-SPARQL

+

Title: "One tripple mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one tripple to one property"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+[] foaf:name "Venus" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            SELECT ?name
+            WHERE {
+                ?x foaf:name ?name .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

16. RMLTC0001a-SQLServer

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

17. RMLTC0001a-XML

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

18. RMLTC0001b-CSV

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

19. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

20. RMLTC0001b-MySQL

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

21. RMLTC0001b-PostgreSQL

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  name VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

22. RMLTC0001b-SPARQL

+

Title: "One tripple mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one tripple to one property"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+[] foaf:name "Venus" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            SELECT ?name
+            WHERE {
+                ?x foaf:name ?name .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

23. RMLTC0001b-SQLServer

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

24. RMLTC0001b-XML

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

25. RMLTC0002a-CSV

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

26. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

27. RMLTC0002a-MySQL

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

28. RMLTC0002a-PostgreSQL

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

29. RMLTC0002a-SPARQL

+

Title: "Two tripples mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two tripple mapping, no primary key; (2) subject URI generated by the concatenation of two tripple object values; (3) one tripple object to one property"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?ID
+            WHERE {
+                ?x foaf:name ?Name ;
+                   rdf:ID ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID.value"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

30. RMLTC0002a-SQLServer

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student ("ID", "Name") values (10, 'Venus');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

31. RMLTC0002a-XML

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10".
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

32. RMLTC0002b-CSV

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

33. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

34. RMLTC0002b-MySQL

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

35. RMLTC0002b-PostgreSQL

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

36. RMLTC0002b-SPARQL

+

Title: "Two tripples maping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two tripple mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one triple to one property"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?ID
+            WHERE {
+                ?x foaf:name ?Name ;
+                   rdf:ID ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID.value}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

37. RMLTC0002b-SQLServer

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

38. RMLTC0002b-XML

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

39. RMLTC0002c-CSV

+

Title: "Two columns mapping, an undefined SQL identifier / logical reference"

+

Description: "Tests the presence of an undefined SQL identifier / logical reference"

+

Error expected? Yes

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+
+

40. RMLTC0002c-MySQL

+

Title: "Two columns mapping, an undefined SQL identifier / logical reference"

+

Description: "Tests the presence of an undefined SQL identifier / logical reference"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

41. RMLTC0002c-PostgreSQL

+

Title: "Two columns mapping, an undefined SQL identifier / logical reference"

+

Description: "Tests the presence of an undefined SQL identifier / logical reference"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

42. RMLTC0002c-SQLServer

+

Title: "Two columns mapping, an undefined SQL identifier / logical reference"

+

Description: "Tests the presence of an undefined SQL identifier / logical reference"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

43. RMLTC0002d-MySQL

+

Title: "Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns"

+

Description: "Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT CONCAT('Student', ID) AS StudentId, ID, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "StudentId";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".
+
+
+

44. RMLTC0002d-PostgreSQL

+

Title: "Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns"

+

Description: "Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT ('Student' || ID) AS StudentId, ID, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "studentid";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".
+
+
+

45. RMLTC0002d-SQLServer

+

Title: "Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns"

+

Description: "Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT CONCAT('Student', ID) AS StudentId, ID, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "StudentId";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".
+
+
+

46. RMLTC0002e-CSV

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+
+

47. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

48. RMLTC0002e-MySQL

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Students\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

49. RMLTC0002e-PostgreSQL

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Students\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

50. RMLTC0002e-SQLServer

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Students\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

51. RMLTC0002e-XML

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+
+

52. RMLTC0002f-MySQL

+

Title: "Two columns mapping, delimited identifiers referenced as regular identifiers"

+

Description: "Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Student;
+CREATE TABLE Student (
+ID INTEGER,
+Name VARCHAR(15)
+);
+INSERT INTO Student (ID, Name) VALUES(10,'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Student\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "\"ID\""
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "\"Name\""
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{\"ID\"}/{\"Name\"}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

53. RMLTC0002f-PostgreSQL

+

Title: "Two columns mapping, delimited identifiers referenced as regular identifiers"

+

Description: "Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS Student CASCADE;
+CREATE TABLE Student (
+ID INTEGER,
+Name VARCHAR(15)
+);
+INSERT INTO Student (ID, Name) VALUES(10,'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Student\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "\"ID\""
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "\"Name\""
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{\"ID\"}/{\"Name\"}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

54. RMLTC0002f-SQLServer

+

Title: "Two columns mapping, delimited identifiers referenced as regular identifiers"

+

Description: "Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS TestDB.Student;
+CREATE TABLE Student (
+ID INTEGER,
+Name VARCHAR(15)
+);
+INSERT INTO Student (ID, Name) VALUES(10,'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Student\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "\"ID\""
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "\"Name\""
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{\"ID\"}/{\"Name\"}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

55. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

56. RMLTC0002g-MySQL

+

Title: "Two columns mapping, invalid SQL query"

+

Description: "Tests the presence of an invalid SQL query"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

57. RMLTC0002g-PostgreSQL

+

Title: "Two columns mapping, invalid SQL query"

+

Description: "Tests the presence of an invalid SQL query"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

58. RMLTC0002g-SPARQL

+

Title: "Two tripples mapping, invalid SPARQL query"

+

Description: "Tests the presence of an invalid SPARQL query"

+

Error expected? Yes

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT qsdfqsdf sqdfqsdfsd ?Nsdfqs ame ?ID qmsndfknqskfmdnemznfmkznfmizmnknfmz
+            WHERE {
+                ?x foaf:name ?Name ;
+                   rdf:ID ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+
+

59. RMLTC0002g-SQLServer

+

Title: "Two columns mapping, invalid SQL query"

+

Description: "Tests the presence of an invalid SQL query"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

60. RMLTC0002h-MySQL

+

Title: "Two columns mapping, duplicate column name in SELECT"

+

Description: "Tests the presence of duplicate column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

61. RMLTC0002h-PostgreSQL

+

Title: "Two columns mapping, duplicate column name in SELECT"

+

Description: "Tests the presence of duplicate column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

62. RMLTC0002h-SPARQL

+

Title: "Two tripples mapping, duplicate variable name in SELECT"

+

Description: "Tests the presence of duplicate variable names in the SELECT list of the SPARQL query"

+

Error expected? Yes

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?Name
+            WHERE {
+                ?x foaf:name ?Name ;
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+
+

63. RMLTC0002h-SQLServer

+

Title: "Two columns mapping, duplicate column name in SELECT"

+

Description: "Tests the presence of duplicate column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

64. RMLTC0002i-MySQL

+

Title: "Two columns mapping, SQL Version identifier"

+

Description: "Tests the presence of a SQL Version identifier "

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

65. RMLTC0002i-PostgreSQL

+

Title: "Two columns mapping, SQL Version identifier"

+

Description: "Tests the presence of a SQL Version identifier "

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

66. RMLTC0002i-SQLServer

+

Title: "Two columns mapping, SQL Version identifier"

+

Description: "Tests the presence of a SQL Version identifier "

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

67. RMLTC0002j-MySQL

+

Title: "Two columns mapping, qualified column names"

+

Description: "Tests the presence of qualified column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT NoColumnName, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

68. RMLTC0002j-PostgreSQL

+

Title: "Two columns mapping, qualified column names"

+

Description: "Tests the presence of qualified column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT NoColumnName, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

69. RMLTC0002j-SQLServer

+

Title: "Two columns mapping, qualified column names"

+

Description: "Tests the presence of qualified column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT NoColumnName, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

70. RMLTC0003a-MySQL

+

Title: "Three columns mapping, undefined SQL Version identifier"

+

Description: "Tests the presence of an undefined SQL Version identifier"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT FirstName, LastName FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

71. RMLTC0003a-PostgreSQL

+

Title: "Three columns mapping, undefined SQL Version identifier"

+

Description: "Tests the presence of an undefined SQL Version identifier"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT FirstName, LastName FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

72. RMLTC0003a-SQLServer

+

Title: "Three columns mapping, undefined SQL Version identifier"

+

Description: "Tests the presence of an undefined SQL Version identifier"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT FirstName, LastName FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

73. RMLTC0003b-MySQL

+

Title: "Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT ID, LastName, CONCAT(`FirstName`, '', `LastName`) as Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{LastName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .
+
+
+

74. RMLTC0003b-PostgreSQL

+

Title: "Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  id INTEGER,
+  firstname VARCHAR(50),
+  lastname VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT id, lastname, concat_ws(firstname, '', lastname) as name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{id}/{lastname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .
+
+
+

75. RMLTC0003b-SQLServer

+

Title: "Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT ID, LastName, concat_ws(FirstName, '', LastName) as Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{LastName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .
+
+
+

76. RMLTC0003c-CSV

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

77. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

78. RMLTC0003c-MySQL

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

79. RMLTC0003c-PostgreSQL

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

80. RMLTC0003c-SPARQL

+

Title: "Three tripple mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName.value} {LastName.value}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

81. RMLTC0003c-SQLServer

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

82. RMLTC0003c-XML

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

83. RMLTC0004a-CSV

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
Student,Sport
+Venus,Tennis
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

84. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

85. RMLTC0004a-MySQL

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
Student,Sport
+Venus,Tennis
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

86. RMLTC0004a-PostgreSQL

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
Student,Sport
+Venus,Tennis
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+

87. RMLTC0004a-SPARQL

+

Title: "Two BlankNodes mapping, from one object to two different triples"

+

Description: "Tests: (1) two BlankNodes mapping, (2) subject URI generated by a tripple object value; (3) from one BlankNode to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+
+[] a ns1:Student ;
+    ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Student
+            WHERE {
+                ?x  a <http://example.com/Student> ;
+                    foaf:name  ?Student .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student.value}"
+    ] .
+
+ex:TriplesMap2 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?Sport
+                WHERE {
+                    ?x  a <http://example.com/Student> ;
+                        <http://example.com/plays> ?sportObject .
+                    ?sportObject foaf:name ?Sport .
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+

88. RMLTC0004a-SQLServer

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
Student,Sport
+Venus,Tennis
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

89. RMLTC0004a-XML

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <Student>Venus</Student>
+    <Sport>Tennis</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

90. RMLTC0004b-CSV

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

91. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

92. RMLTC0004b-MySQL

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

93. RMLTC0004b-PostgreSQL

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

94. RMLTC0004b-SPARQL

+

Title: "One tripple mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+[] foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name
+            WHERE {
+                ?x foaf:name ?Name .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name.value}";
+      rml:termType rml:Literal
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+
+

95. RMLTC0004b-SQLServer

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

96. RMLTC0004b-XML

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

97. RMLTC0005a-CSV

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
fname,lname,amount
+Bob,Smith,30.0E0
+Sue,Jones,20.0E0
+Bob,Smith,30.0E0
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

98. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

99. RMLTC0005a-MySQL

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+
+

100. RMLTC0005a-PostgreSQL

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+
+

101. RMLTC0005a-SQLServer

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+
+

102. RMLTC0005a-XML

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<persons>
+  <person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30.0E0</amount>
+  </person>
+  <person>
+    <fname>Sue</fname>
+    <lname>Jones</lname>
+    <amount>20.0E0</amount>
+  </person>
+  <person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30.0E0</amount>
+  </person>
+</persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/persons/person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

103. RMLTC0005b-MySQL

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/base/IOUs>;
+      rml:template "{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:Bob_Smith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+    
+
+
+

104. RMLTC0005b-PostgreSQL

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/base/IOUs>;
+      rml:template "{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:Bob_Smith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+    
+
+
+

105. RMLTC0005b-SQLServer

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/base/IOUs>;
+      rml:template "{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:Bob_Smith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+    
+
+
+

106. RMLTC0006a-CSV

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

107. RMLTC0006a-JSON

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

108. RMLTC0006a-MySQL

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

109. RMLTC0006a-PostgreSQL

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

110. RMLTC0006a-SPARQL

+

Title: "rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?BadStudent ?LastName ?ID
+            WHERE {
+
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

111. RMLTC0006a-SQLServer

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

112. RMLTC0006a-XML

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

113. RMLTC0007a-CSV

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

114. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

115. RMLTC0007a-MySQL

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

116. RMLTC0007a-PostgreSQL

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

117. RMLTC0007a-SPARQL

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

118. RMLTC0007a-SQLServer

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

119. RMLTC0007a-XML

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

120. RMLTC0007b-CSV

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

121. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

122. RMLTC0007b-MySQL

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

123. RMLTC0007b-PostgreSQL

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

124. RMLTC0007b-SPARQL

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

125. RMLTC0007b-SQLServer

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

126. RMLTC0007b-XML

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

127. RMLTC0007c-CSV

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

128. RMLTC0007c-JSON

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

129. RMLTC0007c-MySQL

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

130. RMLTC0007c-PostgreSQL

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

131. RMLTC0007c-SPARQL

+

Title: "One object mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

132. RMLTC0007c-SQLServer

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

133. RMLTC0007c-XML

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

134. RMLTC0007d-CSV

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

135. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

136. RMLTC0007d-MySQL

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

137. RMLTC0007d-PostgreSQL

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

138. RMLTC0007d-SPARQL

+

Title: "One object mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

139. RMLTC0007d-SQLServer

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

140. RMLTC0007d-XML

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

141. RMLTC0007e-CSV

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

142. RMLTC0007e-JSON

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

143. RMLTC0007e-MySQL

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

144. RMLTC0007e-PostgreSQL

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

145. RMLTC0007e-SPARQL

+

Title: "One object mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

146. RMLTC0007e-SQLServer

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

147. RMLTC0007e-XML

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

148. RMLTC0007f-CSV

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

149. RMLTC0007f-JSON

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

150. RMLTC0007f-MySQL

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

151. RMLTC0007f-PostgreSQL

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

152. RMLTC0007f-SPARQL

+

Title: "One object mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

153. RMLTC0007f-SQLServer

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

154. RMLTC0007f-XML

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

155. RMLTC0007g-CSV

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

156. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

157. RMLTC0007g-MySQL

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

158. RMLTC0007g-PostgreSQL

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

159. RMLTC0007g-SPARQL

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

160. RMLTC0007g-SQLServer

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

161. RMLTC0007g-XML

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

162. RMLTC0007h-CSV

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+
+

163. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

164. RMLTC0007h-MySQL

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

165. RMLTC0007h-PostgreSQL

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

166. RMLTC0007h-SPARQL

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+
+

167. RMLTC0007h-SQLServer

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

168. RMLTC0007h-XML

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+
+

169. RMLTC0008a-CSV

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
ID,Name,Sport
+10,Venus Williams,Tennis
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

170. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

171. RMLTC0008a-MySQL

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50),
+  Sport VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+
+

172. RMLTC0008a-PostgreSQL

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+
+

173. RMLTC0008a-SPARQL

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?Sport ?ID
+            WHERE {
+                ?x  foaf:name ?Name ;
+                    rdf:ID    ?ID ;
+                    <http://example.com/plays>  ?sportObject .
+                ?sportObject foaf:name ?Sport .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID.value"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport.value"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID.value}/{Name.value}"
+        ];
+      rml:template "http://example.com/Student/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

174. RMLTC0008a-SQLServer

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+
+

175. RMLTC0008a-XML

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

176. RMLTC0008b-CSV

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
ID,Name,Sport
+10,Venus Williams,Tennis
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

177. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

178. RMLTC0008b-MySQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50),
+  Sport VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

179. RMLTC0008b-PostgreSQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

180. RMLTC0008b-SPARQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?ID
+            WHERE {
+                ?x  foaf:name ?Name ;
+                    rdf:ID    ?ID ;
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap ex:RefObjectMap1;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID.value"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{Name.value}"
+    ] .
+
+ex:RefObjectMap1 a rml:RefObjectMap;
+  rml:parentTriplesMap ex:TriplesMap2 .
+
+ex:TriplesMap2 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?Sport
+                WHERE {
+                    ?x a <http://example.com/Sport> .
+                    ?x foaf:name ?Sport .
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

181. RMLTC0008b-SQLServer

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

182. RMLTC0008b-XML

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

183. RMLTC0008c-CSV

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
ID,Name,Sport
+10,Venus Williams,Tennis
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

184. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

185. RMLTC0008c-MySQL

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50),
+  Sport VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

186. RMLTC0008c-PostgreSQL

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

187. RMLTC0008c-SPARQL

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+              SELECT ?Name ?ID
+              WHERE {
+                  ?x  foaf:name ?Name ;
+                      rdf:ID    ?ID ;
+              } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base/#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

188. RMLTC0008c-SQLServer

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

189. RMLTC0008c-XML

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

190. RMLTC0009a-CSV

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
ID,Sport,Name
+10,100,Venus Williams
+20,,Demi Moore
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

191. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

192. RMLTC0009a-MySQL

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Sport VARCHAR(50),
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL , 'Demi Moore');
+
+DROP TABLE IF EXISTS test.sport;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

193. RMLTC0009a-PostgreSQL

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Sport" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL , 'Demi Moore');
+
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  "ID" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

194. RMLTC0009a-SPARQL

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            rdf:ID "100" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+[] ns1:plays [ a ns1:Sport ] ;
+    rdf:ID "20" ;
+    foaf:name "Demi Moore" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+              SELECT ?Name ?ID ?Sport
+              WHERE {
+                  ?x  foaf:name ?Name ;
+                      rdf:ID    ?ID ;
+                      <http://example.com/plays> ?sportObject .
+                  OPTIONAL { ?sportObject a <http://example.com/Sport> ;
+                                            rdf:ID ?Sport . }
+              } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL1>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID.value}"
+    ] .
+
+<http://example.com/base/#InputSPARQL1> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/#InputSPARQL2> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds2/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?ID ?Name
+                WHERE {
+                    ?x  foaf:name ?Name ;
+                        rdf:ID    ?ID ;
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL2>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID.value}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

195. RMLTC0009a-SQLServer

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Sport" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL , 'Demi Moore');
+
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

196. RMLTC0009a-XML

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>100</Sport>
+  </student>
+  <student>
+    <ID>20</ID>
+    <Name>Demi Moore</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/sports/sport";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

197. RMLTC0009b-CSV

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
ID,Sport,Name
+10,100,Venus Williams
+20,,Demi Moore
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

198. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

199. RMLTC0009b-MySQL

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Sport VARCHAR(50),
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL, 'Demi Moore');
+
+DROP TABLE IF EXISTS test.sport;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

200. RMLTC0009b-PostgreSQL

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Sport" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL, 'Demi Moore');
+
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  "ID" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

201. RMLTC0009b-SPARQL

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            rdf:ID "100" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+[] ns1:plays [ a ns1:Sport ] ;
+    rdf:ID "20" ;
+    foaf:name "Demi Moore" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+              SELECT ?Name ?ID ?Sport
+              WHERE {
+                  ?x  foaf:name ?Name ;
+                      rdf:ID    ?ID ;
+                      <http://example.com/plays> ?sportObject .
+                  OPTIONAL { ?sportObject a <http://example.com/Sport> ;
+                                            rdf:ID ?Sport . }
+              } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL1>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport.value";
+              rml:parent "ID.value"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID.value}"
+    ] .
+
+<http://example.com/base/#InputSPARQL1> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/#InputSPARQL2> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds2/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?ID ?Name
+                WHERE {
+                    ?x  foaf:name ?Name ;
+                        rdf:ID    ?ID ;
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL2>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID.value}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

202. RMLTC0009b-SQLServer

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Sport" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL, 'Demi Moore');
+
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

203. RMLTC0009b-XML

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>100</Sport>
+  </student>
+  <student>
+    <ID>20</ID>
+    <Name>Demi Moore</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/sports/sport";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

204. RMLTC0009c-MySQL

+

Title: "Unnamed column in a logical table"

+

Description: "Test a logical table with unnamed column."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Sport;
+DROP TABLE IF EXISTS test.Student;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport)
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+
+
+
+
+

205. RMLTC0009c-PostgreSQL

+

Title: "Unnamed column in a logical table"

+

Description: "Test a logical table with unnamed column."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Sport;
+DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport)
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+
+
+
+
+

206. RMLTC0009c-SQLServer

+

Title: "Unnamed column in a logical table"

+

Description: "Test a logical table with unnamed column."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Sport;
+DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport)
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+
+
+
+
+

207. RMLTC0009d-MySQL

+

Title: "Named column in logical table"

+

Description: "Test a logical table named column."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Student;
+DROP TABLE IF EXISTS test.Sport;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport) as SPORTCOUNT
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "SPORTCOUNT"
+        ];
+      rml:predicate ex:numSport
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+
+
+
+
+
+

208. RMLTC0009d-PostgreSQL

+

Title: "Named column in logical table"

+

Description: "Test a logical table named column."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Student;
+DROP TABLE IF EXISTS Sport;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport) as SPORTCOUNT
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "sportcount"
+        ];
+      rml:predicate ex:numSport
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+
+
+
+
+
+

209. RMLTC0009d-SQLServer

+

Title: "Named column in logical table"

+

Description: "Test a logical table named column."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Student;
+DROP TABLE IF EXISTS Sport;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport) as SPORTCOUNT
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "SPORTCOUNT"
+        ];
+      rml:predicate ex:numSport
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+
+
+
+
+
+

210. RMLTC0010a-CSV

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
Country Code,Name,ISO 3166
+1,"Bolivia, Plurinational State of",BO
+2,"Ireland",IE
+3,"Saint Martin (French part)",MF
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

211. RMLTC0010a-JSON

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

212. RMLTC0010a-MySQL

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.country_info;
+
+CREATE TABLE country_info (
+  `Country Code` INTEGER,
+  Name VARCHAR(100),
+  `ISO 3166` VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

213. RMLTC0010a-PostgreSQL

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

214. RMLTC0010a-SQLServer

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

215. RMLTC0010b-CSV

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
Country Code,Name,ISO 3166
+1,"Bolivia, Plurinational State of",BO
+2,Ireland,IE
+3,"Saint Martin (French part)",MF
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

216. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

217. RMLTC0010b-MySQL

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.country_info;
+
+CREATE TABLE country_info (
+  `Country Code` INTEGER,
+  Name VARCHAR(100),
+  `ISO 3166` VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

218. RMLTC0010b-PostgreSQL

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

219. RMLTC0010b-SQLServer

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

220. RMLTC0010b-XML

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<countries>
+  <country>
+    <CountryCode>1</CountryCode>
+    <Name>Bolivia, Plurinational State of</Name>
+    <ISO3166>BO</ISO3166>
+  </country>
+  <country>
+    <CountryCode>2</CountryCode>
+    <Name>Ireland</Name>
+    <ISO3166>IE</ISO3166>
+  </country>
+  <country>
+    <CountryCode>3</CountryCode>
+    <Name>Saint Martin (French part)</Name>
+    <ISO3166>MF</ISO3166>
+  </country>
+</countries>
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{CountryCode}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

221. RMLTC0010c-CSV

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
Country Code,Name,ISO 3166
+1,"Bolivia, Plurinational State of",BO
+2,Ireland,IE
+3,Saint Martin (French part),MF
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

222. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

223. RMLTC0010c-MySQL

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in column value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.country_info;
+
+CREATE TABLE country_info (
+  `Country Code` INTEGER,
+  Name VARCHAR(100),
+  `ISO 3166` VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

224. RMLTC0010c-PostgreSQL

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in column value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

225. RMLTC0010c-SQLServer

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in column value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

226. RMLTC0010c-XML

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<countries>
+  <country>
+    <CountryCode>1</CountryCode>
+    <Name>Bolivia, Plurinational State of</Name>
+    <ISO3166>BO</ISO3166>
+  </country>
+  <country>
+    <CountryCode>2</CountryCode>
+    <Name>Ireland</Name>
+    <ISO3166>IE</ISO3166>
+  </country>
+  <country>
+    <CountryCode>3</CountryCode>
+    <Name>Saint Martin (French part)</Name>
+    <ISO3166>MF</ISO3166>
+  </country>
+</countries>
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{CountryCode}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

227. RMLTC0011a-MySQL

+

Title: "M to M relation, by using a SQL query"

+

Description: "Tests, M to M relations, by using a SQL query"

+

Error expected? No

+

Input

+
USE test;
+SET FOREIGN_KEY_CHECKS = 0;
+DROP TABLE IF EXISTS test.Student_Sport;
+DROP TABLE IF EXISTS test.Sport;
+DROP TABLE IF EXISTS test.Student;
+SET FOREIGN_KEY_CHECKS = 1;
+
+CREATE TABLE Student (
+ID integer PRIMARY KEY,
+FirstName varchar(50),
+LastName varchar(50)
+);
+CREATE TABLE Sport (
+ID integer PRIMARY KEY,
+Description varchar(50)
+);
+CREATE TABLE Student_Sport (
+ID_Student integer,
+ID_Sport integer,
+PRIMARY KEY (ID_Student,ID_Sport),
+FOREIGN KEY (ID_Student) REFERENCES Student(ID),
+FOREIGN KEY (ID_Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa');
+
+INSERT INTO Sport (ID, Description) VALUES (110,'Tennis');
+INSERT INTO Sport (ID, Description) VALUES (111,'Football');
+INSERT INTO Sport (ID, Description) VALUES (112,'Formula1');
+
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT Student.ID as ID,
+              Student.FirstName as FirstName,
+              Student.LastName as LastName,
+              Sport.Description as Description,
+              Sport.ID as Sport_ID
+       FROM Student,Sport,Student_Sport
+       WHERE Student.ID = Student_Sport.ID_Student
+       AND Sport.ID = Student_Sport.ID_Sport;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ], [
+      rml:objectMap [
+          rml:template "http://example.com/{Sport_ID}/{Description}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{FirstName};{LastName}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT * FROM Sport;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Description}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
+<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
+<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
+<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
+<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/111/Football> <http://example.com/description> "Football" .
+<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
+<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
+<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
+<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .
+
+
+
+

228. RMLTC0011a-PostgreSQL

+

Title: "M to M relation, by using a SQL query"

+

Description: "Tests, M to M relations, by using a SQL query"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Student_Sport;
+DROP TABLE IF EXISTS Sport CASCADE;
+DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Student (
+ID integer PRIMARY KEY,
+FirstName varchar(50),
+LastName varchar(50)
+);
+CREATE TABLE Sport (
+ID integer PRIMARY KEY,
+Description varchar(50)
+);
+CREATE TABLE Student_Sport (
+ID_Student integer,
+ID_Sport integer,
+PRIMARY KEY (ID_Student,ID_Sport),
+FOREIGN KEY (ID_Student) REFERENCES Student(ID),
+FOREIGN KEY (ID_Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa');
+
+INSERT INTO Sport (ID, Description) VALUES (110,'Tennis');
+INSERT INTO Sport (ID, Description) VALUES (111,'Football');
+INSERT INTO Sport (ID, Description) VALUES (112,'Formula1');
+
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT Student.ID as ID,
+              Student.FirstName as FirstName,
+              Student.LastName as LastName,
+              Sport.Description as Description,
+              Sport.ID as Sport_ID
+       FROM Student,Sport,Student_Sport
+       WHERE Student.ID = Student_Sport.ID_Student
+       AND Sport.ID = Student_Sport.ID_Sport;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "id"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "lastname"
+        ];
+      rml:predicate ex:lastName
+    ], [
+      rml:objectMap [
+          rml:template "http://example.com/{sport_id}/{description}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{id}/{firstname};{lastname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT * FROM Sport ;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "id"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "description"
+        ];
+      rml:predicate ex:description
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{id}/{description}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
+<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
+<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
+<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
+<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/111/Football> <http://example.com/description> "Football" .
+<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
+<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
+<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
+<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .
+
+
+
+

229. RMLTC0011a-SQLServer

+

Title: "M to M relation, by using a SQL query"

+

Description: "Tests, M to M relations, by using a SQL query"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE Student (
+ID integer PRIMARY KEY,
+FirstName varchar(50),
+LastName varchar(50)
+);
+CREATE TABLE Sport (
+ID integer PRIMARY KEY,
+Description varchar(50)
+);
+CREATE TABLE Student_Sport (
+ID_Student integer,
+ID_Sport integer,
+PRIMARY KEY (ID_Student,ID_Sport),
+FOREIGN KEY (ID_Student) REFERENCES Student(ID),
+FOREIGN KEY (ID_Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa');
+
+INSERT INTO Sport (ID, Description) VALUES (110,'Tennis');
+INSERT INTO Sport (ID, Description) VALUES (111,'Football');
+INSERT INTO Sport (ID, Description) VALUES (112,'Formula1');
+
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT Student.ID as ID,
+              Student.FirstName as FirstName,
+              Student.LastName as LastName,
+              Sport.Description as Description,
+              Sport.ID as Sport_ID
+       FROM Student,Sport,Student_Sport
+       WHERE Student.ID = Student_Sport.ID_Student
+       AND Sport.ID = Student_Sport.ID_Sport;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ], [
+      rml:objectMap [
+          rml:template "http://example.com/{Sport_ID}/{Description}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{FirstName};{LastName}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT * FROM Sport ;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Description}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
+<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
+<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
+<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
+<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/111/Football> <http://example.com/description> "Football" .
+<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
+<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
+<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
+<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .
+
+
+
+

230. RMLTC0011b-CSV

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+11,Fernando,Alonso
+12,David,Villa
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

231. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

232. RMLTC0011b-MySQL

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
USE test;
+SET FOREIGN_KEY_CHECKS = 0;
+DROP TABLE IF EXISTS test.student_sport;
+DROP TABLE IF EXISTS test.student;
+DROP TABLE IF EXISTS test.sport;
+SET FOREIGN_KEY_CHECKS = 1;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Description VARCHAR(200)
+);
+INSERT INTO sport values ('110','Tennis');
+INSERT INTO sport values ('111','Football');
+INSERT INTO sport values ('112','Formula1');
+
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(200),
+  LastName VARCHAR(200)
+);
+INSERT INTO student values ('10','Venus','Williams');
+INSERT INTO student values ('11','Fernando','Alonso');
+INSERT INTO student values ('12','David','Villa');
+
+
+CREATE TABLE student_sport (
+  ID_Student INTEGER,
+  ID_Sport INTEGER
+);
+INSERT INTO student_sport values ('10', '110');
+INSERT INTO student_sport values ('11','111');
+INSERT INTO student_sport values ('11','112');
+INSERT INTO student_sport values ('12','111');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

233. RMLTC0011b-PostgreSQL

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student_sport;
+DROP TABLE IF EXISTS student;
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Description VARCHAR(200)
+);
+INSERT INTO sport values ('110','Tennis');
+INSERT INTO sport values ('111','Football');
+INSERT INTO sport values ('112','Formula1');
+
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(200),
+  LastName VARCHAR(200)
+);
+INSERT INTO student values ('10','Venus','Williams');
+INSERT INTO student values ('11','Fernando','Alonso');
+INSERT INTO student values ('12','David','Villa');
+
+
+CREATE TABLE student_sport (
+  ID_Student INTEGER,
+  ID_Sport INTEGER
+);
+INSERT INTO student_sport values ('10', '110');
+INSERT INTO student_sport values ('11','111');
+INSERT INTO student_sport values ('11','112');
+INSERT INTO student_sport values ('12','111');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{id_sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{id_student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "lastname"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{id}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "id"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

234. RMLTC0011b-SQLServer

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student_sport;
+DROP TABLE IF EXISTS student;
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Description VARCHAR(200)
+);
+INSERT INTO sport values ('110','Tennis');
+INSERT INTO sport values ('111','Football');
+INSERT INTO sport values ('112','Formula1');
+
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(200),
+  LastName VARCHAR(200)
+);
+INSERT INTO student values ('10','Venus','Williams');
+INSERT INTO student values ('11','Fernando','Alonso');
+INSERT INTO student values ('12','David','Villa');
+
+
+CREATE TABLE student_sport (
+  ID_Student INTEGER,
+  ID_Sport INTEGER
+);
+INSERT INTO student_sport values ('10', '110');
+INSERT INTO student_sport values ('11','111');
+INSERT INTO student_sport values ('11','112');
+INSERT INTO student_sport values ('12','111');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

235. RMLTC0011b-XML

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<Students>
+  <Student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </Student>
+  <Student>
+    <ID>11</ID>
+    <FirstName>Fernando</FirstName>
+    <LastName>Alonso</LastName>
+  </Student>
+  <Student>
+    <ID>12</ID>
+    <FirstName>David</FirstName>
+    <LastName>Villa</LastName>
+  </Student>
+</Students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/links/link";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Students/Student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Sports/Sport";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

236. RMLTC0012a-CSV

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
fname,lname,amount
+Bob,Smith,30
+Sue,Jones,20
+Bob,Smith,30
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

237. RMLTC0012a-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

238. RMLTC0012a-MySQL

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+DROP TABLE IF EXISTS test.Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount INT);
+/* We replaced DOUBLE with INT, because the datatype conversion is different across databases, and this test case is not relevant to that aspect */
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

239. RMLTC0012a-PostgreSQL

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount INT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

240. RMLTC0012a-SPARQL

+

Title: "Duplicate triples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+
+[] ns1:amount "30" ;
+    foaf:firstName "Bob" ;
+    foaf:lastName "Smith" .
+
+[] ns1:amount "20" ;
+    foaf:firstName "Sue" ;
+    foaf:lastName "Jones" .
+
+[] ns1:amount "30" ;
+    foaf:firstName "Bob" ;
+    foaf:lastName "Smith" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?fname ?lname ?amount
+            WHERE {
+                ?x  foaf:firstName ?fname ;
+                    foaf:lastName  ?lname ;
+                    <http://example.com/amount> ?amount .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname.value} {lname.value}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount.value"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname.value}{lname.value}{amount.value}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

241. RMLTC0012a-SQLServer

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount INT);
+/* We replaced DOUBLE with INT, because the datatype conversion is different across databases, and this test case is not relevant to that aspect */
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

242. RMLTC0012a-XML

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<Persons>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30</amount>
+  </Person>
+  <Person>
+    <fname>Sue</fname>
+    <lname>Jones</lname>
+    <amount>20</amount>
+  </Person>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30</amount>
+  </Person>
+</Persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Persons/Person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

243. RMLTC0012b-CSV

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

244. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

245. RMLTC0012b-MySQL

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.persons;
+
+CREATE TABLE persons (
+  fname VARCHAR(200),
+  lname VARCHAR(200),
+  amount INTEGER
+);
+INSERT INTO persons values ('Bob','Smith','30');
+INSERT INTO persons values ('Sue','Jones','20');
+INSERT INTO persons values ('Bob','Smith','30');
+
+DROP TABLE IF EXISTS test.lives;
+
+CREATE TABLE lives (
+  fname VARCHAR(200),
+  lname VARCHAR(200),
+  city VARCHAR(200)
+);
+INSERT INTO lives values ('Bob','Smith','London');
+INSERT INTO lives values ('Sue','Jones','Madrid');
+INSERT INTO lives values ('Bob','Smith','London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "persons"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "lives"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

246. RMLTC0012b-PostgreSQL

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS persons;
+
+CREATE TABLE persons (
+  "fname" VARCHAR(200),
+  "lname" VARCHAR(200),
+  "amount" INTEGER
+);
+INSERT INTO persons values ('Bob','Smith','30');
+INSERT INTO persons values ('Sue','Jones','20');
+INSERT INTO persons values ('Bob','Smith','30');
+
+DROP TABLE IF EXISTS lives;
+
+CREATE TABLE lives (
+  "fname" VARCHAR(200),
+  "lname" VARCHAR(200),
+  "city" VARCHAR(200)
+);
+INSERT INTO lives values ('Bob','Smith','London');
+INSERT INTO lives values ('Sue','Jones','Madrid');
+INSERT INTO lives values ('Bob','Smith','London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "persons"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "lives"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

247. RMLTC0012b-SPARQL

+

Title: "Duplicate triples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+
+[] ns1:amount "30" ;
+    foaf:firstName "Bob" ;
+    foaf:lastName "Smith" .
+
+[] ns1:amount "20" ;
+    foaf:firstName "Sue" ;
+    foaf:lastName "Jones" .
+
+[] ns1:amount "30" ;
+    foaf:firstName "Bob" ;
+    foaf:lastName "Smith" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+              SELECT ?fname ?lname
+              WHERE {
+                   ?x  foaf:firstName ?fname ;
+                       foaf:lastName  ?lname ;
+              } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL1>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname.value} {lname.value}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname.value}{lname.value}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?city ?fname ?lname
+                WHERE {
+                    ?x  foaf:firstName ?fname ;
+                        foaf:lastName  ?lname ;
+                        <http://example.com/city> ?city .
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL2>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city.value"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname.value}{lname.value}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#InputSPARQL1> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/#InputSPARQL2> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds2/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

248. RMLTC0012b-SQLServer

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS persons;
+
+CREATE TABLE persons (
+  "fname" VARCHAR(200),
+  "lname" VARCHAR(200),
+  "amount" INTEGER
+);
+INSERT INTO persons values ('Bob','Smith','30');
+INSERT INTO persons values ('Sue','Jones','20');
+INSERT INTO persons values ('Bob','Smith','30');
+
+DROP TABLE IF EXISTS lives;
+
+CREATE TABLE lives (
+  "fname" VARCHAR(200),
+  "lname" VARCHAR(200),
+  "city" VARCHAR(200)
+);
+INSERT INTO lives values ('Bob','Smith','London');
+INSERT INTO lives values ('Sue','Jones','Madrid');
+INSERT INTO lives values ('Bob','Smith','London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "persons"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "lives"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

249. RMLTC0012b-XML

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Persons/Person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Lives/Live";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

250. RMLTC0012c-CSV

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
fname,lname,amount
+Bob,Smith,30
+Sue,Jones,20
+Bob,Smith,30
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

251. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

252. RMLTC0012c-MySQL

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+DROP TABLE IF EXISTS test.Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

253. RMLTC0012c-PostgreSQL

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+
+

254. RMLTC0012c-SQLServer

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

255. RMLTC0012c-XML

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<Persons>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith></lname>
+    <amount>30</amount>
+  </Person>
+  <Person>
+    <fname>Sue</fname>
+    <lname>Jones></lname>
+    <amount>20</amount>
+  </Person>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith></lname>
+    <amount>30</amount>
+  </Person>
+</Persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Persons/Person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

256. RMLTC0012d-CSV

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
fname,lname,amount
+Bob,Smith,30
+Sue,Jones,20
+Bob,Smith,30
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{amount}_{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

257. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

258. RMLTC0012d-MySQL

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+DROP TABLE IF EXISTS test.Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}"
+    ], [
+      rml:template "{amount}_{fname}_{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

259. RMLTC0012d-PostgreSQL

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}"
+    ], [
+      rml:template "{amount}_{fname}_{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+
+

260. RMLTC0012d-SQLServer

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}"
+    ], [
+      rml:template "{amount}_{fname}_{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

261. RMLTC0012d-XML

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<Persons>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30</amount>
+  </Person>
+  <Person>
+    <fname>Sue</fname>
+    <lname>Jones</lname>
+    <amount>20</amount>
+  </Person>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30</amount>
+  </Person>
+</Persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Persons/Person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{amount}_{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

262. RMLTC0012e-MySQL

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+DROP TABLE IF EXISTS test.Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/IOUs>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Lives"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/Lives>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate <http://example.com/base/IOUs#city>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{city}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
+_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .
+
+
+
+
+

263. RMLTC0012e-PostgreSQL

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/IOUs>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Lives"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/Lives>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate <http://example.com/base/IOUs#city>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{city}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
+_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .
+
+
+
+
+

264. RMLTC0012e-SQLServer

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/IOUs>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Lives"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/Lives>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate <http://example.com/base/IOUs#city>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{city}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
+_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .
+
+
+
+
+

265. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

266. RMLTC0013a-MySQL

+

Title: "Generation of empty triples from referenced columns that have null values"

+

Description: "Tests the generation of empty triples from referenced columns that have null values"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Person;
+
+CREATE TABLE Person (
+ID integer,
+Name varchar(50),
+DateOfBirth varchar(50),
+PRIMARY KEY (ID)
+);
+INSERT INTO Person (ID, Name, DateOfBirth) VALUES (1,'Alice', NULL);
+INSERT INTO Person (ID, Name, DateOfBirth) VALUES (2,'Bob', 'September, 2010');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Person"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+
+
+

267. RMLTC0013a-PostgreSQL

+

Title: "Generation of empty triples from referenced columns that have null values"

+

Description: "Tests the generation of empty triples from referenced columns that have null values"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Person;
+
+CREATE TABLE Person (
+"ID" integer,
+"Name" varchar(50),
+"DateOfBirth" varchar(50),
+PRIMARY KEY ("ID")
+);
+INSERT INTO Person ("ID", "Name", "DateOfBirth") VALUES (1,'Alice', NULL);
+INSERT INTO Person ("ID", "Name", "DateOfBirth") VALUES (2,'Bob', 'September, 2010');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Person"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+
+
+

268. RMLTC0013a-SQLServer

+

Title: "Generation of empty triples from referenced columns that have null values"

+

Description: "Tests the generation of empty triples from referenced columns that have null values"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Person;
+
+CREATE TABLE Person (
+ID integer,
+Name varchar(50),
+DateOfBirth varchar(50),
+PRIMARY KEY (ID)
+);
+INSERT INTO Person (ID, Name, DateOfBirth) VALUES (1,'Alice', NULL);
+INSERT INTO Person (ID, Name, DateOfBirth) VALUES (2,'Bob', 'September, 2010');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Person"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+
+
+

269. RMLTC0014d-MySQL

+

Title: "three tables, one primary key, one foreign key"

+

Description: "Test the translation of database type codes to IRIs"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.DEPT;
+DROP TABLE IF EXISTS test.EMP;
+DROP TABLE IF EXISTS test.LIKES;
+
+CREATE TABLE DEPT (
+      deptno INTEGER UNIQUE,
+      dname VARCHAR(30),
+      loc VARCHAR(100));
+INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK');
+
+CREATE TABLE EMP (
+      empno INTEGER PRIMARY KEY,
+      ename VARCHAR(100),
+      job VARCHAR(30),
+      deptno INTEGER REFERENCES DEPT (deptno),
+      etype VARCHAR(30));
+INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME');
+
+CREATE TABLE LIKES (
+      id INTEGER,
+      likeType VARCHAR(30),
+      likedObj VARCHAR(100));
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer');
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+      SELECT EMP.*, (CASE job
+        WHEN 'CLERK' THEN 'general-office'
+        WHEN 'NIGHTGUARD' THEN 'security'
+        WHEN 'ENGINEER' THEN 'engineering'
+      END) AS ROLE FROM EMP
+    """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://data.example.com/roles/{ROLE}"
+        ];
+      rml:predicate ex:role
+    ];
+  rml:subjectMap [
+      rml:template "http://data.example.com/employee/{empno}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .
+
+
+

270. RMLTC0014d-PostgreSQL

+

Title: "three tables, one primary key, one foreign key"

+

Description: "Test the translation of database type codes to IRIs"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS LIKES;
+DROP TABLE IF EXISTS EMP;
+DROP TABLE IF EXISTS DEPT;
+
+CREATE TABLE DEPT (
+      deptno INTEGER UNIQUE,
+      dname VARCHAR(30),
+      loc VARCHAR(100));
+INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK');
+
+CREATE TABLE EMP (
+      empno INTEGER PRIMARY KEY,
+      ename VARCHAR(100),
+      job VARCHAR(30),
+      deptno INTEGER REFERENCES DEPT (deptno),
+      etype VARCHAR(30));
+INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME');
+
+CREATE TABLE LIKES (
+      id INTEGER,
+      likeType VARCHAR(30),
+      likedObj VARCHAR(100));
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer');
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+      SELECT EMP.*, (CASE job
+        WHEN 'CLERK' THEN 'general-office'
+        WHEN 'NIGHTGUARD' THEN 'security'
+        WHEN 'ENGINEER' THEN 'engineering'
+      END) AS ROLE FROM EMP
+    """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://data.example.com/roles/{role}"
+        ];
+      rml:predicate ex:role
+    ];
+  rml:subjectMap [
+      rml:template "http://data.example.com/employee/{empno}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .
+
+
+

271. RMLTC0014d-SQLServer

+

Title: "three tables, one primary key, one foreign key"

+

Description: "Test the translation of database type codes to IRIs"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE DEPT (
+      deptno INTEGER UNIQUE,
+      dname VARCHAR(30),
+      loc VARCHAR(100));
+INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK');
+
+CREATE TABLE EMP (
+      empno INTEGER PRIMARY KEY,
+      ename VARCHAR(100),
+      job VARCHAR(30),
+      deptno INTEGER REFERENCES DEPT (deptno),
+      etype VARCHAR(30));
+INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME');
+
+CREATE TABLE LIKES (
+      id INTEGER,
+      likeType VARCHAR(30),
+      likedObj VARCHAR(100));
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer');
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+      SELECT EMP.*, (CASE job
+        WHEN 'CLERK' THEN 'general-office'
+        WHEN 'NIGHTGUARD' THEN 'security'
+        WHEN 'ENGINEER' THEN 'engineering'
+      END) AS ROLE FROM EMP
+    """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://data.example.com/roles/{ROLE}"
+        ];
+      rml:predicate ex:role
+    ];
+  rml:subjectMap [
+      rml:template "http://data.example.com/employee/{empno}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .
+
+
+

272. RMLTC0015a-CSV

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
Code,Name
+BO,"Bolivia, Plurinational State of"
+IE,Ireland
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

273. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

274. RMLTC0015a-MySQL

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'ES';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

275. RMLTC0015a-PostgreSQL

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'ES';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

276. RMLTC0015a-SQLServer

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT \"Code\", \"Name\", \"Lan\"
+        FROM \"Country\"
+        WHERE \"Lan\" = 'ES';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

277. RMLTC0015a-XML

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<countries>
+  <country><Code>BO</Code><Name>Bolivia, Plurinational State of</Name></country>
+  <country><Code>IE</Code><Name>Ireland</Name></country>
+</countries>
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

278. RMLTC0015b-CSV

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
Code,Name
+BO,"Bolivia, Plurinational State of"
+IE,Ireland
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+
+

279. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

280. RMLTC0015b-MySQL

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

281. RMLTC0015b-PostgreSQL

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

282. RMLTC0015b-SQLServer

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

283. RMLTC0015b-XML

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<countries>
+  <country><Code>BO</Code><Name>Bolivia, Plurinational State of</Name></country>
+  <country><Code>IE</Code><Name>Ireland</Name></country>
+</countries>
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+
+

284. RMLTC0016a-MySQL

+

Title: "Table with datatypes: string and integer"

+

Description: "Tests the rr:termtype and datatype conversions: string and integer"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sex"
+        ];
+      rml:predicate ex:gender
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient/{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
+<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
+<http://example.com/Patient/10> <http://example.com/gender> "female" .
+<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
+<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
+<http://example.com/Patient/11> <http://example.com/gender> "female" .
+<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
+<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
+<http://example.com/Patient/12> <http://example.com/gender> "male" .
+
+
+
+

285. RMLTC0016a-PostgreSQL

+

Title: "Table with datatypes: string and integer"

+

Description: "Tests the rr:termtype and datatype conversions: string and integer"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "sex"
+        ];
+      rml:predicate ex:gender
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "id"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "lastname"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient/{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
+<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
+<http://example.com/Patient/10> <http://example.com/gender> "female" .
+<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
+<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
+<http://example.com/Patient/11> <http://example.com/gender> "female" .
+<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
+<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
+<http://example.com/Patient/12> <http://example.com/gender> "male" .
+
+
+
+

286. RMLTC0016a-SQLServer

+

Title: "Table with datatypes: string and integer"

+

Description: "Tests the rr:termtype and datatype conversions: string and integer"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sex"
+        ];
+      rml:predicate ex:gender
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient/{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
+<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
+<http://example.com/Patient/10> <http://example.com/gender> "female" .
+<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
+<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
+<http://example.com/Patient/11> <http://example.com/gender> "female" .
+<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
+<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
+<http://example.com/Patient/12> <http://example.com/gender> "male" .
+
+
+
+

287. RMLTC0016b-MySQL

+

Title: "Table with datatypes: real and float"

+

Description: "Tests the rr:termtype and datatype conversions: real and float"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "Weight"
+        ];
+      rml:predicate ex:weight
+    ], [
+      rml:objectMap [
+          rml:reference "Height"
+        ];
+      rml:predicate ex:height
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+

288. RMLTC0016b-PostgreSQL

+

Title: "Table with datatypes: real and float"

+

Description: "Tests the rr:termtype and datatype conversions: real and float"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "weight"
+        ];
+      rml:predicate ex:weight
+    ], [
+      rml:objectMap [
+          rml:reference "height"
+        ];
+      rml:predicate ex:height
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+

289. RMLTC0016b-SQLServer

+

Title: "Table with datatypes: real and float"

+

Description: "Tests the rr:termtype and datatype conversions: real and float"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "Weight"
+        ];
+      rml:predicate ex:weight
+    ], [
+      rml:objectMap [
+          rml:reference "Height"
+        ];
+      rml:predicate ex:height
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+

290. RMLTC0016c-MySQL

+

Title: "Table with datatypes: date and timestamp"

+

Description: "Tests the rr:termtype and datatype conversions: date and timestamp"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "BirthDate"
+        ];
+      rml:predicate ex:birthdate
+    ], [
+      rml:objectMap [
+          rml:reference "EntranceDate"
+        ];
+      rml:predicate ex:entrancedate
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+
+
+

291. RMLTC0016c-PostgreSQL

+

Title: "Table with datatypes: date and timestamp"

+

Description: "Tests the rr:termtype and datatype conversions: date and timestamp"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "birthdate"
+        ];
+      rml:predicate ex:birthdate
+    ], [
+      rml:objectMap [
+          rml:reference "entrancedate"
+        ];
+      rml:predicate ex:entrancedate
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+
+
+

292. RMLTC0016c-SQLServer

+

Title: "Table with datatypes: date and timestamp"

+

Description: "Tests the rr:termtype and datatype conversions: date and timestamp"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "BirthDate"
+        ];
+      rml:predicate ex:birthdate
+    ], [
+      rml:objectMap [
+          rml:reference "EntranceDate"
+        ];
+      rml:predicate ex:entrancedate
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+
+
+

293. RMLTC0016d-MySQL

+

Title: "Table with datatypes, boolean conversions"

+

Description: "Tests the rr:termtype and datatype conversions: boolean"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "PaidInAdvance"
+        ];
+      rml:predicate ex:paid
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

294. RMLTC0016d-PostgreSQL

+

Title: "Table with datatypes, boolean conversions"

+

Description: "Tests the rr:termtype and datatype conversions: boolean"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "paidinadvance"
+        ];
+      rml:predicate ex:paid
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

295. RMLTC0016d-SQLServer

+

Title: "Table with datatypes, boolean conversions"

+

Description: "Tests the rr:termtype and datatype conversions: boolean"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "PaidInAdvance"
+        ];
+      rml:predicate ex:paid
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

296. RMLTC0016e-MySQL

+

Title: "Table with datatypes, binary column"

+

Description: "Tests the rr:termtype and datatype conversions: binary"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:template "data:image/png;hex,{Photo}"
+        ];
+      rml:predicate ex:photo
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+
+
+

297. RMLTC0016e-PostgreSQL

+

Title: "Table with datatypes, binary column"

+

Description: "Tests the rr:termtype and datatype conversions: binary"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:template "data:image/png;hex,{photo}"
+        ];
+      rml:predicate ex:photo
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+
+
+

298. RMLTC0016e-SQLServer

+

Title: "Table with datatypes, binary column"

+

Description: "Tests the rr:termtype and datatype conversions: binary"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:template "data:image/png;hex,{Photo}"
+        ];
+      rml:predicate ex:photo
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+
+
+

299. RMLTC0019a-CSV

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,http://example.com/ns#Jhon,Smith
+20,Carlos,Mendoza
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

300. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

301. RMLTC0019a-MySQL

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT ID, FirstName, LastName
+        FROM Employee
+        WHERE ID < 30
+     """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

302. RMLTC0019a-PostgreSQL

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT ID, FirstName, LastName
+        FROM Employee
+        WHERE ID < 30
+     """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "firstname"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

303. RMLTC0019a-SQLServer

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT ID, FirstName, LastName
+        FROM Employee
+        WHERE ID < 30
+     """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

304. RMLTC0019a-XML

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in elements"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<persons>
+    <person>
+        <ID>10</ID>
+        <FirstName>http://example.com/ns#Jhon</FirstName>
+        <LastName>Smith</LastName>
+    </person>
+    <person>
+        <ID>20</ID>
+        <FirstName>Carlos</FirstName>
+        <LastName>Mendoza</LastName>
+    </person>
+</persons>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/persons/person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

305. RMLTC0019b-CSV

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
ID,FirstName,LastName
+10,http://example.com/ns#Jhon,Smith
+20,Carlos,Mendoza
+30,Juan Daniel,Crespo
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+
+

306. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    },
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+
+

307. RMLTC0019b-MySQL

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Employee"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

308. RMLTC0019b-PostgreSQL

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Employee"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "firstname"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

309. RMLTC0019b-SQLServer

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Employee"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

310. RMLTC0019b-XML

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in elements, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<persons>
+    <person>
+        <ID>10</ID>
+        <FirstName>http://example.com/ns#Jhon</FirstName>
+        <LastName>Smith</LastName>
+    </person>
+    <person>
+        <ID>20</ID>
+        <FirstName>Carlos</FirstName>
+        <LastName>Mendoza</LastName>
+    </person>
+    <person>
+        <ID>30</ID>
+        <FirstName>Juan Daniel</FirstName>
+        <LastName>Crespo</LastName>
+    </person>
+</persons>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/persons/person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+
+

311. RMLTC0020a-CSV

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
Name
+http://example.com/company/Alice
+Bob
+Bob/Charles
+path/../Danny
+Emily Smith
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

312. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

313. RMLTC0020a-MySQL

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Student_Sport;
+DROP TABLE IF EXISTS test.Student;
+
+CREATE TABLE Student (
+Name VARCHAR(50)
+);
+
+INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice');
+INSERT INTO Student (Name) VALUES ('Bob');
+INSERT INTO Student (Name) VALUES ('Bob/Charles');
+INSERT INTO Student (Name) VALUES ('path/../Danny');
+INSERT INTO Student (Name) VALUES ('Emily Smith');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:IRI
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

314. RMLTC0020a-PostgreSQL

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Student (
+Name VARCHAR(50)
+);
+
+INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice');
+INSERT INTO Student (Name) VALUES ('Bob');
+INSERT INTO Student (Name) VALUES ('Bob/Charles');
+INSERT INTO Student (Name) VALUES ('path/../Danny');
+INSERT INTO Student (Name) VALUES ('Emily Smith');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{name}";
+      rml:termType rml:IRI
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

315. RMLTC0020a-SQLServer

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Student (
+Name VARCHAR(50)
+);
+
+INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice');
+INSERT INTO Student (Name) VALUES ('Bob');
+INSERT INTO Student (Name) VALUES ('Bob/Charles');
+INSERT INTO Student (Name) VALUES ('path/../Danny');
+INSERT INTO Student (Name) VALUES ('Emily Smith');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:IRI
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

316. RMLTC0020a-XML

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in elements"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student><Name>http://example.com/company/Alice</Name></student>
+  <student><Name>Bob</Name></student>
+  <student><Name>Bob/Charles</Name></student>
+  <student><Name>path/../Danny</Name></student>
+  <student><Name>Emily Smith</Name></student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

317. RMLTC0021a-CSV

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
ID,Name,Sport
+10,Venus Williams,Tennis
+20,Serena Williams,Tennis
+30,Loena Hendrickx,Figure skating
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

318. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

319. RMLTC0021a-MySQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50),
+  Sport VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+INSERT INTO student values ('20', 'Serena Williams', 'Tennis');
+INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

320. RMLTC0021a-PostgreSQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+INSERT INTO student values ('20', 'Serena Williams', 'Tennis');
+INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

321. RMLTC0021a-SPARQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "20" ;
+    foaf:name "Serena Williams" .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Figure skating" ] ;
+    rdf:ID "30" ;
+    foaf:name "Loena Hendrickx" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:RefObjectMap1 a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport.value";
+      rml:parent "Sport.value"
+    ];
+  rml:parentTriplesMap ex:TriplesMap1 .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?ID
+            WHERE {
+                ?x  foaf:name ?Name ;
+                    rdf:ID    ?ID ;
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap ex:RefObjectMap1;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

322. RMLTC0021a-SQLServer

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+INSERT INTO student values ('20', 'Serena Williams', 'Tennis');
+INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

323. RMLTC0021a-XML

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+  <student>
+    <ID>20</ID>
+    <Name>Serena Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+  <student>
+    <ID>30</ID>
+    <Name>Loena Hendrickx</Name>
+    <Sport>Figure skating</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

324. RMLTC0022a-CSV

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Error expected? No

+

Input

+
Name,Age
+Venus,21
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

325. RMLTC0022b-CSV

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Error expected? No

+

Input

+
FOO,BAR
+1,string
+2,int
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{BAR}"
+            ];
+          rml:reference "FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

326. RMLTC0022c-CSV

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Error expected? No

+

Input

+
FOO,BAR
+1,string
+2,int
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{BAR}"
+            ];
+          rml:reference "FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://example.com/base/datatype#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://example.com/base/datatype#int> .
+
+
+

327. RMLTC0023a-XML

+

Title: "XML attributes selection"

+

Description: "Test generation of triples with selected XML attributes"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<persons>
+  <person fname="Bob" lname="Smith" amount="30.0E0">
+  </person>
+  <person fname="Sue" lname="Jones" amount="20.0E0">
+  </person>
+  <person fname="Bob" lname="Smith" amount="30.0E0">
+  </person>
+</persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/persons/person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "@amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{@fname};{@lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

328. RMLTC0024a-CSV

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{NON_EXISTING_COLUMN}"
+      rml:class foaf:Person;
+    ] .
+
+
+

329. RMLTC0024b-CSV

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{Name}
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}"
+      rml:class foaf:Person;
+    ] .
+
+
+

330. RMLTC0024c-CSV

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
N\ame
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}"
+      rml:class foaf:Person;
+    ] .
+
+
+

331. RMLTC0024d-CSV

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}"
+      rml:class foaf:Person;
+    ] .
+
+
+

332. RMLTC0024e-CSV

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{Name}
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

333. RMLTC0024f-CSV

+

Title: "Invalid IRI template 6"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
N\ame
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/docs/20250204/index.html b/src/test/resources/rml-core/docs/20250204/index.html new file mode 100644 index 00000000..8c6f0c29 --- /dev/null +++ b/src/test/resources/rml-core/docs/20250204/index.html @@ -0,0 +1,19356 @@ + + + + + + +RML-Core: Test Cases + + + + + + + + + + + + + + +
+ +

RML-Core: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Core-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/core/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-core + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-CSV

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
Name
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

6. RMLTC0000-MySQL

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  Name VARCHAR(50)
+);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
# empty database
+
+
+

7. RMLTC0000-PostgreSQL

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
# empty database
+
+
+

8. RMLTC0000-SPARQL

+

Title: "Empty dataset"

+

Description: "Test if an empty dataset produces an empty RDF graph"

+

Error expected? No

+

Input

+

+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            SELECT ?name
+            WHERE {
+                ?name a rdfs:Literal .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+

+
+
+

9. RMLTC0000-SQLServer

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
# empty database
+
+
+

10. RMLTC0000-XML

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

11. RMLTC0001a-CSV

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

12. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

13. RMLTC0001a-MySQL

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

14. RMLTC0001a-PostgreSQL

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

15. RMLTC0001a-SPARQL

+

Title: "One tripple mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one tripple to one property"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+[] foaf:name "Venus" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            SELECT ?name
+            WHERE {
+                ?x foaf:name ?name .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

16. RMLTC0001a-SQLServer

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

17. RMLTC0001a-XML

+

Title: "One column mapping, subject URI generation by using rr:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

18. RMLTC0001b-CSV

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

19. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

20. RMLTC0001b-MySQL

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

21. RMLTC0001b-PostgreSQL

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  name VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

22. RMLTC0001b-SPARQL

+

Title: "One tripple mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one tripple to one property"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+[] foaf:name "Venus" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            SELECT ?name
+            WHERE {
+                ?x foaf:name ?name .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

23. RMLTC0001b-SQLServer

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

24. RMLTC0001b-XML

+

Title: "One column mapping, generation of a BlankNode subject by using rr:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

25. RMLTC0002a-CSV

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

26. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

27. RMLTC0002a-MySQL

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

28. RMLTC0002a-PostgreSQL

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

29. RMLTC0002a-SPARQL

+

Title: "Two tripples mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two tripple mapping, no primary key; (2) subject URI generated by the concatenation of two tripple object values; (3) one tripple object to one property"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?ID
+            WHERE {
+                ?x foaf:name ?Name ;
+                   rdf:ID ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID.value"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

30. RMLTC0002a-SQLServer

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student ("ID", "Name") values (10, 'Venus');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

31. RMLTC0002a-XML

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10".
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

32. RMLTC0002b-CSV

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

33. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

34. RMLTC0002b-MySQL

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

35. RMLTC0002b-PostgreSQL

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

36. RMLTC0002b-SPARQL

+

Title: "Two tripples maping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two tripple mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one triple to one property"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?ID
+            WHERE {
+                ?x foaf:name ?Name ;
+                   rdf:ID ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID.value}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

37. RMLTC0002b-SQLServer

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

38. RMLTC0002b-XML

+

Title: "Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

39. RMLTC0002c-CSV

+

Title: "Two columns mapping, an undefined SQL identifier / logical reference"

+

Description: "Tests the presence of an undefined SQL identifier / logical reference"

+

Error expected? Yes

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+
+

40. RMLTC0002c-MySQL

+

Title: "Two columns mapping, an undefined SQL identifier / logical reference"

+

Description: "Tests the presence of an undefined SQL identifier / logical reference"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

41. RMLTC0002c-PostgreSQL

+

Title: "Two columns mapping, an undefined SQL identifier / logical reference"

+

Description: "Tests the presence of an undefined SQL identifier / logical reference"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

42. RMLTC0002c-SQLServer

+

Title: "Two columns mapping, an undefined SQL identifier / logical reference"

+

Description: "Tests the presence of an undefined SQL identifier / logical reference"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

43. RMLTC0002d-MySQL

+

Title: "Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns"

+

Description: "Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT CONCAT('Student', ID) AS StudentId, ID, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "StudentId";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".
+
+
+

44. RMLTC0002d-PostgreSQL

+

Title: "Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns"

+

Description: "Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT ('Student' || ID) AS StudentId, ID, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "studentid";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".
+
+
+

45. RMLTC0002d-SQLServer

+

Title: "Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns"

+

Description: "Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT CONCAT('Student', ID) AS StudentId, ID, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "StudentId";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".
+
+
+

46. RMLTC0002e-CSV

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+
+

47. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

48. RMLTC0002e-MySQL

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Students\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

49. RMLTC0002e-PostgreSQL

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Students\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

50. RMLTC0002e-SQLServer

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Students\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

51. RMLTC0002e-XML

+

Title: "Two columns mapping, an undefined rr:tableName"

+

Description: "Tests the presence of an undefined rr:tableName"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+
+

52. RMLTC0002f-MySQL

+

Title: "Two columns mapping, delimited identifiers referenced as regular identifiers"

+

Description: "Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Student;
+CREATE TABLE Student (
+ID INTEGER,
+Name VARCHAR(15)
+);
+INSERT INTO Student (ID, Name) VALUES(10,'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Student\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "\"ID\""
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "\"Name\""
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{\"ID\"}/{\"Name\"}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

53. RMLTC0002f-PostgreSQL

+

Title: "Two columns mapping, delimited identifiers referenced as regular identifiers"

+

Description: "Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS Student CASCADE;
+CREATE TABLE Student (
+ID INTEGER,
+Name VARCHAR(15)
+);
+INSERT INTO Student (ID, Name) VALUES(10,'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Student\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "\"ID\""
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "\"Name\""
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{\"ID\"}/{\"Name\"}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

54. RMLTC0002f-SQLServer

+

Title: "Two columns mapping, delimited identifiers referenced as regular identifiers"

+

Description: "Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS TestDB.Student;
+CREATE TABLE Student (
+ID INTEGER,
+Name VARCHAR(15)
+);
+INSERT INTO Student (ID, Name) VALUES(10,'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:iterator "\"Student\""
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "\"ID\""
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "\"Name\""
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{\"ID\"}/{\"Name\"}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

55. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

56. RMLTC0002g-MySQL

+

Title: "Two columns mapping, invalid SQL query"

+

Description: "Tests the presence of an invalid SQL query"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

57. RMLTC0002g-PostgreSQL

+

Title: "Two columns mapping, invalid SQL query"

+

Description: "Tests the presence of an invalid SQL query"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

58. RMLTC0002g-SPARQL

+

Title: "Two tripples mapping, invalid SPARQL query"

+

Description: "Tests the presence of an invalid SPARQL query"

+

Error expected? Yes

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT qsdfqsdf sqdfqsdfsd ?Nsdfqs ame ?ID qmsndfknqskfmdnemznfmkznfmizmnknfmz
+            WHERE {
+                ?x foaf:name ?Name ;
+                   rdf:ID ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+
+

59. RMLTC0002g-SQLServer

+

Title: "Two columns mapping, invalid SQL query"

+

Description: "Tests the presence of an invalid SQL query"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

60. RMLTC0002h-MySQL

+

Title: "Two columns mapping, duplicate column name in SELECT"

+

Description: "Tests the presence of duplicate column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

61. RMLTC0002h-PostgreSQL

+

Title: "Two columns mapping, duplicate column name in SELECT"

+

Description: "Tests the presence of duplicate column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

62. RMLTC0002h-SPARQL

+

Title: "Two tripples mapping, duplicate variable name in SELECT"

+

Description: "Tests the presence of duplicate variable names in the SELECT list of the SPARQL query"

+

Error expected? Yes

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?Name
+            WHERE {
+                ?x foaf:name ?Name ;
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+
+

63. RMLTC0002h-SQLServer

+

Title: "Two columns mapping, duplicate column name in SELECT"

+

Description: "Tests the presence of duplicate column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

64. RMLTC0002i-MySQL

+

Title: "Two columns mapping, SQL Version identifier"

+

Description: "Tests the presence of a SQL Version identifier "

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

65. RMLTC0002i-PostgreSQL

+

Title: "Two columns mapping, SQL Version identifier"

+

Description: "Tests the presence of a SQL Version identifier "

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

66. RMLTC0002i-SQLServer

+

Title: "Two columns mapping, SQL Version identifier"

+

Description: "Tests the presence of a SQL Version identifier "

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

67. RMLTC0002j-MySQL

+

Title: "Two columns mapping, qualified column names"

+

Description: "Tests the presence of qualified column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT NoColumnName, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

68. RMLTC0002j-PostgreSQL

+

Title: "Two columns mapping, qualified column names"

+

Description: "Tests the presence of qualified column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT NoColumnName, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

69. RMLTC0002j-SQLServer

+

Title: "Two columns mapping, qualified column names"

+

Description: "Tests the presence of qualified column names in the SELECT list of the SQL query"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT NoColumnName, Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

70. RMLTC0003a-MySQL

+

Title: "Three columns mapping, undefined SQL Version identifier"

+

Description: "Tests the presence of an undefined SQL Version identifier"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT FirstName, LastName FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

71. RMLTC0003a-PostgreSQL

+

Title: "Three columns mapping, undefined SQL Version identifier"

+

Description: "Tests the presence of an undefined SQL Version identifier"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT FirstName, LastName FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

72. RMLTC0003a-SQLServer

+

Title: "Three columns mapping, undefined SQL Version identifier"

+

Description: "Tests the presence of an undefined SQL Version identifier"

+

Error expected? Yes

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT FirstName, LastName FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

73. RMLTC0003b-MySQL

+

Title: "Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT ID, LastName, CONCAT(`FirstName`, '', `LastName`) as Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{LastName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .
+
+
+

74. RMLTC0003b-PostgreSQL

+

Title: "Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  id INTEGER,
+  firstname VARCHAR(50),
+  lastname VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT id, lastname, concat_ws(firstname, '', lastname) as name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{id}/{lastname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .
+
+
+

75. RMLTC0003b-SQLServer

+

Title: "Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator "SELECT ID, LastName, concat_ws(FirstName, '', LastName) as Name FROM student";
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{LastName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .
+
+
+

76. RMLTC0003c-CSV

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

77. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

78. RMLTC0003c-MySQL

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

79. RMLTC0003c-PostgreSQL

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student CASCADE ;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

80. RMLTC0003c-SPARQL

+

Title: "Three tripple mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName.value} {LastName.value}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

81. RMLTC0003c-SQLServer

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

82. RMLTC0003c-XML

+

Title: "Three columns mapping, by using a rr:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rr:template to produce literal"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{FirstName} {LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

83. RMLTC0004a-CSV

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
Student,Sport
+Venus,Tennis
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

84. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

85. RMLTC0004a-MySQL

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
Student,Sport
+Venus,Tennis
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

86. RMLTC0004a-PostgreSQL

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
Student,Sport
+Venus,Tennis
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+

87. RMLTC0004a-SPARQL

+

Title: "Two BlankNodes mapping, from one object to two different triples"

+

Description: "Tests: (1) two BlankNodes mapping, (2) subject URI generated by a tripple object value; (3) from one BlankNode to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+
+[] a ns1:Student ;
+    ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Student
+            WHERE {
+                ?x  a <http://example.com/Student> ;
+                    foaf:name  ?Student .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student.value}"
+    ] .
+
+ex:TriplesMap2 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?Sport
+                WHERE {
+                    ?x  a <http://example.com/Student> ;
+                        <http://example.com/plays> ?sportObject .
+                    ?sportObject foaf:name ?Sport .
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+

88. RMLTC0004a-SQLServer

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
Student,Sport
+Venus,Tennis
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

89. RMLTC0004a-XML

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <Student>Venus</Student>
+    <Sport>Tennis</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

90. RMLTC0004b-CSV

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

91. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

92. RMLTC0004b-MySQL

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+CREATE TABLE student (
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

93. RMLTC0004b-PostgreSQL

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

94. RMLTC0004b-SPARQL

+

Title: "One tripple mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+
+[] foaf:name "Venus" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name
+            WHERE {
+                ?x foaf:name ?Name .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name.value}";
+      rml:termType rml:Literal
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+
+

95. RMLTC0004b-SQLServer

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('Venus');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

96. RMLTC0004b-XML

+

Title: "One column mapping, presence of rr:termType rr:Literal on rr:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

97. RMLTC0005a-CSV

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
fname,lname,amount
+Bob,Smith,30.0E0
+Sue,Jones,20.0E0
+Bob,Smith,30.0E0
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

98. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

99. RMLTC0005a-MySQL

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+
+

100. RMLTC0005a-PostgreSQL

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+
+

101. RMLTC0005a-SQLServer

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+
+

102. RMLTC0005a-XML

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<persons>
+  <person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30.0E0</amount>
+  </person>
+  <person>
+    <fname>Sue</fname>
+    <lname>Jones</lname>
+    <amount>20.0E0</amount>
+  </person>
+  <person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30.0E0</amount>
+  </person>
+</persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/persons/person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{fname};{lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

103. RMLTC0005b-MySQL

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/base/IOUs>;
+      rml:template "{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:Bob_Smith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+    
+
+
+

104. RMLTC0005b-PostgreSQL

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/base/IOUs>;
+      rml:template "{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:Bob_Smith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+    
+
+
+

105. RMLTC0005b-SQLServer

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname  VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/base/IOUs>;
+      rml:template "{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:Bob_Smith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+    
+
+
+

106. RMLTC0006a-CSV

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

107. RMLTC0006a-JSON

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

108. RMLTC0006a-MySQL

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

109. RMLTC0006a-PostgreSQL

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

110. RMLTC0006a-SPARQL

+

Title: "rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?BadStudent ?LastName ?ID
+            WHERE {
+
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

111. RMLTC0006a-SQLServer

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

112. RMLTC0006a-XML

+

Title: "Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Description: "Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

113. RMLTC0007a-CSV

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

114. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

115. RMLTC0007a-MySQL

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

116. RMLTC0007a-PostgreSQL

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

117. RMLTC0007a-SPARQL

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

118. RMLTC0007a-SQLServer

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

119. RMLTC0007a-XML

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

120. RMLTC0007b-CSV

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

121. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

122. RMLTC0007b-MySQL

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

123. RMLTC0007b-PostgreSQL

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

124. RMLTC0007b-SPARQL

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

125. RMLTC0007b-SQLServer

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

126. RMLTC0007b-XML

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

127. RMLTC0007c-CSV

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

128. RMLTC0007c-JSON

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

129. RMLTC0007c-MySQL

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

130. RMLTC0007c-PostgreSQL

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

131. RMLTC0007c-SPARQL

+

Title: "One object mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

132. RMLTC0007c-SQLServer

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

133. RMLTC0007c-XML

+

Title: "One row mapping, using rr:class"

+

Description: "Tests subjectmap with more than one class IRIs, rr:class"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

134. RMLTC0007d-CSV

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

135. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

136. RMLTC0007d-MySQL

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

137. RMLTC0007d-PostgreSQL

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

138. RMLTC0007d-SPARQL

+

Title: "One object mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

139. RMLTC0007d-SQLServer

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

140. RMLTC0007d-XML

+

Title: "One column mapping, specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

141. RMLTC0007e-CSV

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
ID,Name
+10,Venus
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

142. RMLTC0007e-JSON

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

143. RMLTC0007e-MySQL

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

144. RMLTC0007e-PostgreSQL

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

145. RMLTC0007e-SPARQL

+

Title: "One object mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

146. RMLTC0007e-SQLServer

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

147. RMLTC0007e-XML

+

Title: "One column mapping, using rr:graphMap and rr:class"

+

Description: "Tests subjectmap with rr:graphMap and rr:class"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

148. RMLTC0007f-CSV

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

149. RMLTC0007f-JSON

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

150. RMLTC0007f-MySQL

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

151. RMLTC0007f-PostgreSQL

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

152. RMLTC0007f-SPARQL

+

Title: "One object mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

153. RMLTC0007f-SQLServer

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

154. RMLTC0007f-XML

+

Title: "One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

155. RMLTC0007g-CSV

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

156. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

157. RMLTC0007g-MySQL

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

158. RMLTC0007g-PostgreSQL

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

159. RMLTC0007g-SPARQL

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

160. RMLTC0007g-SQLServer

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

161. RMLTC0007g-XML

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

162. RMLTC0007h-CSV

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+
+

163. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

164. RMLTC0007h-MySQL

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(50),
+  LastName VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

165. RMLTC0007h-PostgreSQL

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

166. RMLTC0007h-SPARQL

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] rdf:ID "10" ;
+    foaf:firstName "Venus" ;
+    foaf:lastName "Williams" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?FirstName ?LastName ?ID
+            WHERE {
+                ?x  foaf:firstName ?FirstName ;
+                    foaf:lastName  ?LastName ;
+                    rdf:ID         ?ID .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID.value}/{FirstName.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+
+

167. RMLTC0007h-SQLServer

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "FirstName" VARCHAR(50),
+  "LastName" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus', 'Williams');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

168. RMLTC0007h-XML

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{ID}/{FirstName}"
+    ] .
+
+
+

169. RMLTC0008a-CSV

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
ID,Name,Sport
+10,Venus Williams,Tennis
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

170. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

171. RMLTC0008a-MySQL

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50),
+  Sport VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+
+

172. RMLTC0008a-PostgreSQL

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+
+

173. RMLTC0008a-SPARQL

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?Sport ?ID
+            WHERE {
+                ?x  foaf:name ?Name ;
+                    rdf:ID    ?ID ;
+                    <http://example.com/plays>  ?sportObject .
+                ?sportObject foaf:name ?Sport .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID.value"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport.value"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID.value}/{Name.value}"
+        ];
+      rml:template "http://example.com/Student/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

174. RMLTC0008a-SQLServer

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+
+

175. RMLTC0008a-XML

+

Title: "Generation of triples to a target graph by using rr:graphMap and rr:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{ID}/{Name}"
+        ];
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

176. RMLTC0008b-CSV

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
ID,Name,Sport
+10,Venus Williams,Tennis
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

177. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

178. RMLTC0008b-MySQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50),
+  Sport VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

179. RMLTC0008b-PostgreSQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

180. RMLTC0008b-SPARQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?ID
+            WHERE {
+                ?x  foaf:name ?Name ;
+                    rdf:ID    ?ID ;
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap ex:RefObjectMap1;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID.value"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{Name.value}"
+    ] .
+
+ex:RefObjectMap1 a rml:RefObjectMap;
+  rml:parentTriplesMap ex:TriplesMap2 .
+
+ex:TriplesMap2 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?Sport
+                WHERE {
+                    ?x a <http://example.com/Sport> .
+                    ?x foaf:name ?Sport .
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

181. RMLTC0008b-SQLServer

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

182. RMLTC0008b-XML

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

183. RMLTC0008c-CSV

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
ID,Name,Sport
+10,Venus Williams,Tennis
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

184. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

185. RMLTC0008c-MySQL

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50),
+  Sport VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

186. RMLTC0008c-PostgreSQL

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

187. RMLTC0008c-SPARQL

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+              SELECT ?Name ?ID
+              WHERE {
+                  ?x  foaf:name ?Name ;
+                      rdf:ID    ?ID ;
+              } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base/#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

188. RMLTC0008c-SQLServer

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

189. RMLTC0008c-XML

+

Title: "Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

190. RMLTC0009a-CSV

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
ID,Sport,Name
+10,100,Venus Williams
+20,,Demi Moore
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

191. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

192. RMLTC0009a-MySQL

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Sport VARCHAR(50),
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL , 'Demi Moore');
+
+DROP TABLE IF EXISTS test.sport;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

193. RMLTC0009a-PostgreSQL

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Sport" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL , 'Demi Moore');
+
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  "ID" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

194. RMLTC0009a-SPARQL

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            rdf:ID "100" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+[] ns1:plays [ a ns1:Sport ] ;
+    rdf:ID "20" ;
+    foaf:name "Demi Moore" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+              SELECT ?Name ?ID ?Sport
+              WHERE {
+                  ?x  foaf:name ?Name ;
+                      rdf:ID    ?ID ;
+                      <http://example.com/plays> ?sportObject .
+                  OPTIONAL { ?sportObject a <http://example.com/Sport> ;
+                                            rdf:ID ?Sport . }
+              } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL1>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID.value}"
+    ] .
+
+<http://example.com/base/#InputSPARQL1> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/#InputSPARQL2> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds2/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?ID ?Name
+                WHERE {
+                    ?x  foaf:name ?Name ;
+                        rdf:ID    ?ID ;
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL2>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID.value}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

195. RMLTC0009a-SQLServer

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Sport" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL , 'Demi Moore');
+
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

196. RMLTC0009a-XML

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>100</Sport>
+  </student>
+  <student>
+    <ID>20</ID>
+    <Name>Demi Moore</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/sports/sport";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

197. RMLTC0009b-CSV

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
ID,Sport,Name
+10,100,Venus Williams
+20,,Demi Moore
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

198. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

199. RMLTC0009b-MySQL

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Sport VARCHAR(50),
+  Name VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL, 'Demi Moore');
+
+DROP TABLE IF EXISTS test.sport;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Name VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

200. RMLTC0009b-PostgreSQL

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Sport" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL, 'Demi Moore');
+
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  "ID" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

201. RMLTC0009b-SPARQL

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            rdf:ID "100" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+[] ns1:plays [ a ns1:Sport ] ;
+    rdf:ID "20" ;
+    foaf:name "Demi Moore" .
+
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+              SELECT ?Name ?ID ?Sport
+              WHERE {
+                  ?x  foaf:name ?Name ;
+                      rdf:ID    ?ID ;
+                      <http://example.com/plays> ?sportObject .
+                  OPTIONAL { ?sportObject a <http://example.com/Sport> ;
+                                            rdf:ID ?Sport . }
+              } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL1>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport.value";
+              rml:parent "ID.value"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID.value}"
+    ] .
+
+<http://example.com/base/#InputSPARQL1> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/#InputSPARQL2> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds2/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?ID ?Name
+                WHERE {
+                    ?x  foaf:name ?Name ;
+                        rdf:ID    ?ID ;
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL2>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name.value"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID.value}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

202. RMLTC0009b-SQLServer

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Sport" VARCHAR(50),
+  "Name" VARCHAR(50)
+);
+INSERT INTO student values ('10', '100', 'Venus Williams');
+INSERT INTO student values ('20', NULL, 'Demi Moore');
+
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  "ID" INTEGER,
+  "Name" VARCHAR(50)
+);
+INSERT INTO sport values ('100', 'Tennis');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

203. RMLTC0009b-XML

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>100</Sport>
+  </student>
+  <student>
+    <ID>20</ID>
+    <Name>Demi Moore</Name>
+  </student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "Sport";
+              rml:parent "ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/sports/sport";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

204. RMLTC0009c-MySQL

+

Title: "Unnamed column in a logical table"

+

Description: "Test a logical table with unnamed column."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Sport;
+DROP TABLE IF EXISTS test.Student;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport)
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+
+
+
+
+

205. RMLTC0009c-PostgreSQL

+

Title: "Unnamed column in a logical table"

+

Description: "Test a logical table with unnamed column."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Sport;
+DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport)
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+
+
+
+
+

206. RMLTC0009c-SQLServer

+

Title: "Unnamed column in a logical table"

+

Description: "Test a logical table with unnamed column."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Sport;
+DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport)
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+
+
+
+
+

207. RMLTC0009d-MySQL

+

Title: "Named column in logical table"

+

Description: "Test a logical table named column."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Student;
+DROP TABLE IF EXISTS test.Sport;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport) as SPORTCOUNT
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "SPORTCOUNT"
+        ];
+      rml:predicate ex:numSport
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+
+
+
+
+
+

208. RMLTC0009d-PostgreSQL

+

Title: "Named column in logical table"

+

Description: "Test a logical table named column."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Student;
+DROP TABLE IF EXISTS Sport;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport) as SPORTCOUNT
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "sportcount"
+        ];
+      rml:predicate ex:numSport
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+
+
+
+
+
+

209. RMLTC0009d-SQLServer

+

Title: "Named column in logical table"

+

Description: "Test a logical table named column."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Student;
+DROP TABLE IF EXISTS Sport;
+
+CREATE TABLE Sport (
+ID integer,
+Name varchar (50),
+PRIMARY KEY (ID)
+);
+
+CREATE TABLE Student (
+ID integer,
+Name varchar(50),
+Sport integer,
+PRIMARY KEY (ID),
+FOREIGN KEY(Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Sport (ID, Name) VALUES (100,'Tennis');
+INSERT INTO Student (ID, Name, Sport) VALUES (10,'Venus Williams', 100);
+INSERT INTO Student (ID, Name, Sport) VALUES (20,'Demi Moore', NULL);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Name, COUNT(Sport) as SPORTCOUNT
+        FROM Student
+        GROUP BY Name
+        """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "SPORTCOUNT"
+        ];
+      rml:predicate ex:numSport
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
+<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
+<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+
+
+
+
+
+

210. RMLTC0010a-CSV

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
Country Code,Name,ISO 3166
+1,"Bolivia, Plurinational State of",BO
+2,"Ireland",IE
+3,"Saint Martin (French part)",MF
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

211. RMLTC0010a-JSON

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

212. RMLTC0010a-MySQL

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.country_info;
+
+CREATE TABLE country_info (
+  `Country Code` INTEGER,
+  Name VARCHAR(100),
+  `ISO 3166` VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

213. RMLTC0010a-PostgreSQL

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

214. RMLTC0010a-SQLServer

+

Title: "Template with table column with special chars"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

215. RMLTC0010b-CSV

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
Country Code,Name,ISO 3166
+1,"Bolivia, Plurinational State of",BO
+2,Ireland,IE
+3,"Saint Martin (French part)",MF
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

216. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

217. RMLTC0010b-MySQL

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.country_info;
+
+CREATE TABLE country_info (
+  `Country Code` INTEGER,
+  Name VARCHAR(100),
+  `ISO 3166` VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

218. RMLTC0010b-PostgreSQL

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

219. RMLTC0010b-SQLServer

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

220. RMLTC0010b-XML

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<countries>
+  <country>
+    <CountryCode>1</CountryCode>
+    <Name>Bolivia, Plurinational State of</Name>
+    <ISO3166>BO</ISO3166>
+  </country>
+  <country>
+    <CountryCode>2</CountryCode>
+    <Name>Ireland</Name>
+    <ISO3166>IE</ISO3166>
+  </country>
+  <country>
+    <CountryCode>3</CountryCode>
+    <Name>Saint Martin (French part)</Name>
+    <ISO3166>MF</ISO3166>
+  </country>
+</countries>
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{CountryCode}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

221. RMLTC0010c-CSV

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
Country Code,Name,ISO 3166
+1,"Bolivia, Plurinational State of",BO
+2,Ireland,IE
+3,Saint Martin (French part),MF
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

222. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

223. RMLTC0010c-MySQL

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in column value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.country_info;
+
+CREATE TABLE country_info (
+  `Country Code` INTEGER,
+  Name VARCHAR(100),
+  `ISO 3166` VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

224. RMLTC0010c-PostgreSQL

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in column value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

225. RMLTC0010c-SQLServer

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in column value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS country_info;
+
+CREATE TABLE country_info (
+  "Country Code" INTEGER,
+  "Name" VARCHAR(100),
+  "ISO 3166" VARCHAR(10)
+);
+INSERT INTO country_info values ('1', 'Bolivia, Plurinational State of', 'BO');
+INSERT INTO country_info values ('2', 'Ireland', 'IE');
+INSERT INTO country_info values ('3', 'Saint Martin (French part)', 'MF');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "country_info"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO 3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Country Code}/{Name}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

226. RMLTC0010c-XML

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<countries>
+  <country>
+    <CountryCode>1</CountryCode>
+    <Name>Bolivia, Plurinational State of</Name>
+    <ISO3166>BO</ISO3166>
+  </country>
+  <country>
+    <CountryCode>2</CountryCode>
+    <Name>Ireland</Name>
+    <ISO3166>IE</ISO3166>
+  </country>
+  <country>
+    <CountryCode>3</CountryCode>
+    <Name>Saint Martin (French part)</Name>
+    <ISO3166>MF</ISO3166>
+  </country>
+</countries>
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {ISO3166} \\}\\}\\}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate ex:code
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{CountryCode}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

227. RMLTC0011a-MySQL

+

Title: "M to M relation, by using a SQL query"

+

Description: "Tests, M to M relations, by using a SQL query"

+

Error expected? No

+

Input

+
USE test;
+SET FOREIGN_KEY_CHECKS = 0;
+DROP TABLE IF EXISTS test.Student_Sport;
+DROP TABLE IF EXISTS test.Sport;
+DROP TABLE IF EXISTS test.Student;
+SET FOREIGN_KEY_CHECKS = 1;
+
+CREATE TABLE Student (
+ID integer PRIMARY KEY,
+FirstName varchar(50),
+LastName varchar(50)
+);
+CREATE TABLE Sport (
+ID integer PRIMARY KEY,
+Description varchar(50)
+);
+CREATE TABLE Student_Sport (
+ID_Student integer,
+ID_Sport integer,
+PRIMARY KEY (ID_Student,ID_Sport),
+FOREIGN KEY (ID_Student) REFERENCES Student(ID),
+FOREIGN KEY (ID_Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa');
+
+INSERT INTO Sport (ID, Description) VALUES (110,'Tennis');
+INSERT INTO Sport (ID, Description) VALUES (111,'Football');
+INSERT INTO Sport (ID, Description) VALUES (112,'Formula1');
+
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT Student.ID as ID,
+              Student.FirstName as FirstName,
+              Student.LastName as LastName,
+              Sport.Description as Description,
+              Sport.ID as Sport_ID
+       FROM Student,Sport,Student_Sport
+       WHERE Student.ID = Student_Sport.ID_Student
+       AND Sport.ID = Student_Sport.ID_Sport;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ], [
+      rml:objectMap [
+          rml:template "http://example.com/{Sport_ID}/{Description}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{FirstName};{LastName}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT * FROM Sport;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Description}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
+<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
+<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
+<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
+<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/111/Football> <http://example.com/description> "Football" .
+<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
+<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
+<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
+<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .
+
+
+
+

228. RMLTC0011a-PostgreSQL

+

Title: "M to M relation, by using a SQL query"

+

Description: "Tests, M to M relations, by using a SQL query"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Student_Sport;
+DROP TABLE IF EXISTS Sport CASCADE;
+DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Student (
+ID integer PRIMARY KEY,
+FirstName varchar(50),
+LastName varchar(50)
+);
+CREATE TABLE Sport (
+ID integer PRIMARY KEY,
+Description varchar(50)
+);
+CREATE TABLE Student_Sport (
+ID_Student integer,
+ID_Sport integer,
+PRIMARY KEY (ID_Student,ID_Sport),
+FOREIGN KEY (ID_Student) REFERENCES Student(ID),
+FOREIGN KEY (ID_Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa');
+
+INSERT INTO Sport (ID, Description) VALUES (110,'Tennis');
+INSERT INTO Sport (ID, Description) VALUES (111,'Football');
+INSERT INTO Sport (ID, Description) VALUES (112,'Formula1');
+
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT Student.ID as ID,
+              Student.FirstName as FirstName,
+              Student.LastName as LastName,
+              Sport.Description as Description,
+              Sport.ID as Sport_ID
+       FROM Student,Sport,Student_Sport
+       WHERE Student.ID = Student_Sport.ID_Student
+       AND Sport.ID = Student_Sport.ID_Sport;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "id"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "lastname"
+        ];
+      rml:predicate ex:lastName
+    ], [
+      rml:objectMap [
+          rml:template "http://example.com/{sport_id}/{description}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{id}/{firstname};{lastname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT * FROM Sport ;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "id"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "description"
+        ];
+      rml:predicate ex:description
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{id}/{description}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
+<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
+<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
+<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
+<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/111/Football> <http://example.com/description> "Football" .
+<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
+<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
+<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
+<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .
+
+
+
+

229. RMLTC0011a-SQLServer

+

Title: "M to M relation, by using a SQL query"

+

Description: "Tests, M to M relations, by using a SQL query"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE Student (
+ID integer PRIMARY KEY,
+FirstName varchar(50),
+LastName varchar(50)
+);
+CREATE TABLE Sport (
+ID integer PRIMARY KEY,
+Description varchar(50)
+);
+CREATE TABLE Student_Sport (
+ID_Student integer,
+ID_Sport integer,
+PRIMARY KEY (ID_Student,ID_Sport),
+FOREIGN KEY (ID_Student) REFERENCES Student(ID),
+FOREIGN KEY (ID_Sport) REFERENCES Sport(ID)
+);
+
+INSERT INTO Student (ID,FirstName,LastName) VALUES (10,'Venus', 'Williams');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (11,'Fernando', 'Alonso');
+INSERT INTO Student (ID,FirstName,LastName) VALUES (12,'David', 'Villa');
+
+INSERT INTO Sport (ID, Description) VALUES (110,'Tennis');
+INSERT INTO Sport (ID, Description) VALUES (111,'Football');
+INSERT INTO Sport (ID, Description) VALUES (112,'Formula1');
+
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (10,110);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,111);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (11,112);
+INSERT INTO Student_Sport (ID_Student, ID_Sport) VALUES (12,111);
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT Student.ID as ID,
+              Student.FirstName as FirstName,
+              Student.LastName as LastName,
+              Sport.Description as Description,
+              Sport.ID as Sport_ID
+       FROM Student,Sport,Student_Sport
+       WHERE Student.ID = Student_Sport.ID_Student
+       AND Sport.ID = Student_Sport.ID_Sport;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ], [
+      rml:objectMap [
+          rml:template "http://example.com/{Sport_ID}/{Description}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{FirstName};{LastName}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+       SELECT * FROM Sport ;
+       """;
+      rml:referenceFormulation rml:SQL2008Query;
+      rml:source <http://example.com/base/#DB_source>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{ID}/{Description}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
+<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
+<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
+<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
+<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/111/Football> <http://example.com/description> "Football" .
+<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
+<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
+<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
+<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
+<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
+<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .
+
+
+
+

230. RMLTC0011b-CSV

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,Venus,Williams
+11,Fernando,Alonso
+12,David,Villa
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

231. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

232. RMLTC0011b-MySQL

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
USE test;
+SET FOREIGN_KEY_CHECKS = 0;
+DROP TABLE IF EXISTS test.student_sport;
+DROP TABLE IF EXISTS test.student;
+DROP TABLE IF EXISTS test.sport;
+SET FOREIGN_KEY_CHECKS = 1;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Description VARCHAR(200)
+);
+INSERT INTO sport values ('110','Tennis');
+INSERT INTO sport values ('111','Football');
+INSERT INTO sport values ('112','Formula1');
+
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(200),
+  LastName VARCHAR(200)
+);
+INSERT INTO student values ('10','Venus','Williams');
+INSERT INTO student values ('11','Fernando','Alonso');
+INSERT INTO student values ('12','David','Villa');
+
+
+CREATE TABLE student_sport (
+  ID_Student INTEGER,
+  ID_Sport INTEGER
+);
+INSERT INTO student_sport values ('10', '110');
+INSERT INTO student_sport values ('11','111');
+INSERT INTO student_sport values ('11','112');
+INSERT INTO student_sport values ('12','111');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

233. RMLTC0011b-PostgreSQL

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student_sport;
+DROP TABLE IF EXISTS student;
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Description VARCHAR(200)
+);
+INSERT INTO sport values ('110','Tennis');
+INSERT INTO sport values ('111','Football');
+INSERT INTO sport values ('112','Formula1');
+
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(200),
+  LastName VARCHAR(200)
+);
+INSERT INTO student values ('10','Venus','Williams');
+INSERT INTO student values ('11','Fernando','Alonso');
+INSERT INTO student values ('12','David','Villa');
+
+
+CREATE TABLE student_sport (
+  ID_Student INTEGER,
+  ID_Sport INTEGER
+);
+INSERT INTO student_sport values ('10', '110');
+INSERT INTO student_sport values ('11','111');
+INSERT INTO student_sport values ('11','112');
+INSERT INTO student_sport values ('12','111');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{id_sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{id_student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "lastname"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{id}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "id"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

234. RMLTC0011b-SQLServer

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student_sport;
+DROP TABLE IF EXISTS student;
+DROP TABLE IF EXISTS sport;
+
+CREATE TABLE sport (
+  ID INTEGER,
+  Description VARCHAR(200)
+);
+INSERT INTO sport values ('110','Tennis');
+INSERT INTO sport values ('111','Football');
+INSERT INTO sport values ('112','Formula1');
+
+
+CREATE TABLE student (
+  ID INTEGER,
+  FirstName VARCHAR(200),
+  LastName VARCHAR(200)
+);
+INSERT INTO student values ('10','Venus','Williams');
+INSERT INTO student values ('11','Fernando','Alonso');
+INSERT INTO student values ('12','David','Villa');
+
+
+CREATE TABLE student_sport (
+  ID_Student INTEGER,
+  ID_Sport INTEGER
+);
+INSERT INTO student_sport values ('10', '110');
+INSERT INTO student_sport values ('11','111');
+INSERT INTO student_sport values ('11','112');
+INSERT INTO student_sport values ('12','111');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student_sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "sport"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

235. RMLTC0011b-XML

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<Students>
+  <Student>
+    <ID>10</ID>
+    <FirstName>Venus</FirstName>
+    <LastName>Williams</LastName>
+  </Student>
+  <Student>
+    <ID>11</ID>
+    <FirstName>Fernando</FirstName>
+    <LastName>Alonso</LastName>
+  </Student>
+  <Student>
+    <ID>12</ID>
+    <FirstName>David</FirstName>
+    <LastName>Villa</LastName>
+  </Student>
+</Students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/links/link";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Students/Student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Sports/Sport";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

236. RMLTC0012a-CSV

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
fname,lname,amount
+Bob,Smith,30
+Sue,Jones,20
+Bob,Smith,30
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

237. RMLTC0012a-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

238. RMLTC0012a-MySQL

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+DROP TABLE IF EXISTS test.Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount INT);
+/* We replaced DOUBLE with INT, because the datatype conversion is different across databases, and this test case is not relevant to that aspect */
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

239. RMLTC0012a-PostgreSQL

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount INT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

240. RMLTC0012a-SPARQL

+

Title: "Duplicate triples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+
+[] ns1:amount "30" ;
+    foaf:firstName "Bob" ;
+    foaf:lastName "Smith" .
+
+[] ns1:amount "20" ;
+    foaf:firstName "Sue" ;
+    foaf:lastName "Jones" .
+
+[] ns1:amount "30" ;
+    foaf:firstName "Bob" ;
+    foaf:lastName "Smith" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base#Country> rml:logicalSource [
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?fname ?lname ?amount
+            WHERE {
+                ?x  foaf:firstName ?fname ;
+                    foaf:lastName  ?lname ;
+                    <http://example.com/amount> ?amount .
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source <http://example.com/base#InputSPARQL>
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname.value} {lname.value}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount.value"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname.value}{lname.value}{amount.value}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

241. RMLTC0012a-SQLServer

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount INT);
+/* We replaced DOUBLE with INT, because the datatype conversion is different across databases, and this test case is not relevant to that aspect */
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

242. RMLTC0012a-XML

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<Persons>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30</amount>
+  </Person>
+  <Person>
+    <fname>Sue</fname>
+    <lname>Jones</lname>
+    <amount>20</amount>
+  </Person>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30</amount>
+  </Person>
+</Persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Persons/Person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

243. RMLTC0012b-CSV

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

244. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

245. RMLTC0012b-MySQL

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.persons;
+
+CREATE TABLE persons (
+  fname VARCHAR(200),
+  lname VARCHAR(200),
+  amount INTEGER
+);
+INSERT INTO persons values ('Bob','Smith','30');
+INSERT INTO persons values ('Sue','Jones','20');
+INSERT INTO persons values ('Bob','Smith','30');
+
+DROP TABLE IF EXISTS test.lives;
+
+CREATE TABLE lives (
+  fname VARCHAR(200),
+  lname VARCHAR(200),
+  city VARCHAR(200)
+);
+INSERT INTO lives values ('Bob','Smith','London');
+INSERT INTO lives values ('Sue','Jones','Madrid');
+INSERT INTO lives values ('Bob','Smith','London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "persons"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "lives"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

246. RMLTC0012b-PostgreSQL

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS persons;
+
+CREATE TABLE persons (
+  "fname" VARCHAR(200),
+  "lname" VARCHAR(200),
+  "amount" INTEGER
+);
+INSERT INTO persons values ('Bob','Smith','30');
+INSERT INTO persons values ('Sue','Jones','20');
+INSERT INTO persons values ('Bob','Smith','30');
+
+DROP TABLE IF EXISTS lives;
+
+CREATE TABLE lives (
+  "fname" VARCHAR(200),
+  "lname" VARCHAR(200),
+  "city" VARCHAR(200)
+);
+INSERT INTO lives values ('Bob','Smith','London');
+INSERT INTO lives values ('Sue','Jones','Madrid');
+INSERT INTO lives values ('Bob','Smith','London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "persons"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "lives"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

247. RMLTC0012b-SPARQL

+

Title: "Duplicate triples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+
+[] ns1:amount "30" ;
+    foaf:firstName "Bob" ;
+    foaf:lastName "Smith" .
+
+[] ns1:amount "20" ;
+    foaf:firstName "Sue" ;
+    foaf:lastName "Jones" .
+
+[] ns1:amount "30" ;
+    foaf:firstName "Bob" ;
+    foaf:lastName "Smith" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+              SELECT ?fname ?lname
+              WHERE {
+                   ?x  foaf:firstName ?fname ;
+                       foaf:lastName  ?lname ;
+              } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL1>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname.value} {lname.value}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname.value}{lname.value}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+                PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+                PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+                SELECT ?city ?fname ?lname
+                WHERE {
+                    ?x  foaf:firstName ?fname ;
+                        foaf:lastName  ?lname ;
+                        <http://example.com/city> ?city .
+                } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base/#InputSPARQL2>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city.value"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname.value}{lname.value}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#InputSPARQL1> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+<http://example.com/base/#InputSPARQL2> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds2/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

248. RMLTC0012b-SQLServer

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS persons;
+
+CREATE TABLE persons (
+  "fname" VARCHAR(200),
+  "lname" VARCHAR(200),
+  "amount" INTEGER
+);
+INSERT INTO persons values ('Bob','Smith','30');
+INSERT INTO persons values ('Sue','Jones','20');
+INSERT INTO persons values ('Bob','Smith','30');
+
+DROP TABLE IF EXISTS lives;
+
+CREATE TABLE lives (
+  "fname" VARCHAR(200),
+  "lname" VARCHAR(200),
+  "city" VARCHAR(200)
+);
+INSERT INTO lives values ('Bob','Smith','London');
+INSERT INTO lives values ('Sue','Jones','Madrid');
+INSERT INTO lives values ('Bob','Smith','London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "persons"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "lives"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

249. RMLTC0012b-XML

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Persons/Person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Lives/Live";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{fname}{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

250. RMLTC0012c-CSV

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
fname,lname,amount
+Bob,Smith,30
+Sue,Jones,20
+Bob,Smith,30
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

251. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

252. RMLTC0012c-MySQL

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+DROP TABLE IF EXISTS test.Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

253. RMLTC0012c-PostgreSQL

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+
+

254. RMLTC0012c-SQLServer

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

255. RMLTC0012c-XML

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<Persons>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith></lname>
+    <amount>30</amount>
+  </Person>
+  <Person>
+    <fname>Sue</fname>
+    <lname>Jones></lname>
+    <amount>20</amount>
+  </Person>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith></lname>
+    <amount>30</amount>
+  </Person>
+</Persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Persons/Person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

256. RMLTC0012d-CSV

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
fname,lname,amount
+Bob,Smith,30
+Sue,Jones,20
+Bob,Smith,30
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{amount}_{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

257. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

258. RMLTC0012d-MySQL

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+DROP TABLE IF EXISTS test.Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}"
+    ], [
+      rml:template "{amount}_{fname}_{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

259. RMLTC0012d-PostgreSQL

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}"
+    ], [
+      rml:template "{amount}_{fname}_{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+
+

260. RMLTC0012d-SQLServer

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}"
+    ], [
+      rml:template "{amount}_{fname}_{lname}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

261. RMLTC0012d-XML

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<Persons>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30</amount>
+  </Person>
+  <Person>
+    <fname>Sue</fname>
+    <lname>Jones</lname>
+    <amount>20</amount>
+  </Person>
+  <Person>
+    <fname>Bob</fname>
+    <lname>Smith</lname>
+    <amount>30</amount>
+  </Person>
+</Persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/Persons/Person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{fname} {lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{amount}_{fname}_{lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

262. RMLTC0012e-MySQL

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key."

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.IOUs;
+DROP TABLE IF EXISTS test.Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/IOUs>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Lives"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/Lives>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate <http://example.com/base/IOUs#city>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{city}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
+_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .
+
+
+
+
+

263. RMLTC0012e-PostgreSQL

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key."

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/IOUs>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Lives"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/Lives>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate <http://example.com/base/IOUs#city>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{city}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
+_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .
+
+
+
+
+

264. RMLTC0012e-SQLServer

+

Title: "Default mapping"

+

Description: "Tests the generation of a default mapping for tables without a primary key."

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS IOUs;
+DROP TABLE IF EXISTS Lives;
+
+CREATE TABLE IOUs (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      amount FLOAT);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Sue', 'Jones', 20);
+INSERT INTO IOUs (fname, lname, amount) VALUES ('Bob', 'Smith', 30);
+
+CREATE TABLE Lives (
+      fname VARCHAR(20),
+      lname VARCHAR(20),
+      city VARCHAR(20));
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+INSERT INTO Lives (fname, lname, city) VALUES ('Sue', 'Jones', 'Madrid');
+INSERT INTO Lives (fname, lname, city) VALUES ('Bob', 'Smith', 'London');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "IOUs"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/IOUs>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "amount"
+        ];
+      rml:predicate <http://example.com/base/IOUs#amount>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Lives"
+    ];
+  rml:predicateObjectMap [
+      rml:object <http://example.com/base/Lives>;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "fname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#fname>
+    ], [
+      rml:objectMap [
+          rml:reference "lname"
+        ];
+      rml:predicate <http://example.com/base/IOUs#lname>
+    ], [
+      rml:objectMap [
+          rml:reference "city"
+        ];
+      rml:predicate <http://example.com/base/IOUs#city>
+    ];
+  rml:subjectMap [
+      rml:template "{fname}_{lname}_{city}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
+_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
+_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
+_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
+_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
+_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .
+
+
+
+
+

265. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

266. RMLTC0013a-MySQL

+

Title: "Generation of empty triples from referenced columns that have null values"

+

Description: "Tests the generation of empty triples from referenced columns that have null values"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Person;
+
+CREATE TABLE Person (
+ID integer,
+Name varchar(50),
+DateOfBirth varchar(50),
+PRIMARY KEY (ID)
+);
+INSERT INTO Person (ID, Name, DateOfBirth) VALUES (1,'Alice', NULL);
+INSERT INTO Person (ID, Name, DateOfBirth) VALUES (2,'Bob', 'September, 2010');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Person"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+
+
+

267. RMLTC0013a-PostgreSQL

+

Title: "Generation of empty triples from referenced columns that have null values"

+

Description: "Tests the generation of empty triples from referenced columns that have null values"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Person;
+
+CREATE TABLE Person (
+"ID" integer,
+"Name" varchar(50),
+"DateOfBirth" varchar(50),
+PRIMARY KEY ("ID")
+);
+INSERT INTO Person ("ID", "Name", "DateOfBirth") VALUES (1,'Alice', NULL);
+INSERT INTO Person ("ID", "Name", "DateOfBirth") VALUES (2,'Bob', 'September, 2010');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Person"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+
+
+

268. RMLTC0013a-SQLServer

+

Title: "Generation of empty triples from referenced columns that have null values"

+

Description: "Tests the generation of empty triples from referenced columns that have null values"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Person;
+
+CREATE TABLE Person (
+ID integer,
+Name varchar(50),
+DateOfBirth varchar(50),
+PRIMARY KEY (ID)
+);
+INSERT INTO Person (ID, Name, DateOfBirth) VALUES (1,'Alice', NULL);
+INSERT INTO Person (ID, Name, DateOfBirth) VALUES (2,'Bob', 'September, 2010');
+
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Person"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+
+
+

269. RMLTC0014d-MySQL

+

Title: "three tables, one primary key, one foreign key"

+

Description: "Test the translation of database type codes to IRIs"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.DEPT;
+DROP TABLE IF EXISTS test.EMP;
+DROP TABLE IF EXISTS test.LIKES;
+
+CREATE TABLE DEPT (
+      deptno INTEGER UNIQUE,
+      dname VARCHAR(30),
+      loc VARCHAR(100));
+INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK');
+
+CREATE TABLE EMP (
+      empno INTEGER PRIMARY KEY,
+      ename VARCHAR(100),
+      job VARCHAR(30),
+      deptno INTEGER REFERENCES DEPT (deptno),
+      etype VARCHAR(30));
+INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME');
+
+CREATE TABLE LIKES (
+      id INTEGER,
+      likeType VARCHAR(30),
+      likedObj VARCHAR(100));
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer');
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+      SELECT EMP.*, (CASE job
+        WHEN 'CLERK' THEN 'general-office'
+        WHEN 'NIGHTGUARD' THEN 'security'
+        WHEN 'ENGINEER' THEN 'engineering'
+      END) AS ROLE FROM EMP
+    """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://data.example.com/roles/{ROLE}"
+        ];
+      rml:predicate ex:role
+    ];
+  rml:subjectMap [
+      rml:template "http://data.example.com/employee/{empno}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .
+
+
+

270. RMLTC0014d-PostgreSQL

+

Title: "three tables, one primary key, one foreign key"

+

Description: "Test the translation of database type codes to IRIs"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS LIKES;
+DROP TABLE IF EXISTS EMP;
+DROP TABLE IF EXISTS DEPT;
+
+CREATE TABLE DEPT (
+      deptno INTEGER UNIQUE,
+      dname VARCHAR(30),
+      loc VARCHAR(100));
+INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK');
+
+CREATE TABLE EMP (
+      empno INTEGER PRIMARY KEY,
+      ename VARCHAR(100),
+      job VARCHAR(30),
+      deptno INTEGER REFERENCES DEPT (deptno),
+      etype VARCHAR(30));
+INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME');
+
+CREATE TABLE LIKES (
+      id INTEGER,
+      likeType VARCHAR(30),
+      likedObj VARCHAR(100));
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer');
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+      SELECT EMP.*, (CASE job
+        WHEN 'CLERK' THEN 'general-office'
+        WHEN 'NIGHTGUARD' THEN 'security'
+        WHEN 'ENGINEER' THEN 'engineering'
+      END) AS ROLE FROM EMP
+    """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://data.example.com/roles/{role}"
+        ];
+      rml:predicate ex:role
+    ];
+  rml:subjectMap [
+      rml:template "http://data.example.com/employee/{empno}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .
+
+
+

271. RMLTC0014d-SQLServer

+

Title: "three tables, one primary key, one foreign key"

+

Description: "Test the translation of database type codes to IRIs"

+

Error expected? No

+

Input

+
USE TestDB;
+EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all'
+EXEC sp_msforeachtable 'DROP TABLE ?'
+
+CREATE TABLE DEPT (
+      deptno INTEGER UNIQUE,
+      dname VARCHAR(30),
+      loc VARCHAR(100));
+INSERT INTO DEPT (deptno, dname, loc) VALUES (10, 'APPSERVER', 'NEW YORK');
+
+CREATE TABLE EMP (
+      empno INTEGER PRIMARY KEY,
+      ename VARCHAR(100),
+      job VARCHAR(30),
+      deptno INTEGER REFERENCES DEPT (deptno),
+      etype VARCHAR(30));
+INSERT INTO EMP (empno, ename, job, deptno, etype ) VALUES (7369, 'SMITH', 'CLERK', 10, 'PART_TIME');
+
+CREATE TABLE LIKES (
+      id INTEGER,
+      likeType VARCHAR(30),
+      likedObj VARCHAR(100));
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Playing', 'Soccer');
+INSERT INTO LIKES (id, likeType, likedObj) VALUES (7369, 'Watching', 'Basketball');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+      SELECT EMP.*, (CASE job
+        WHEN 'CLERK' THEN 'general-office'
+        WHEN 'NIGHTGUARD' THEN 'security'
+        WHEN 'ENGINEER' THEN 'engineering'
+      END) AS ROLE FROM EMP
+    """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://data.example.com/roles/{ROLE}"
+        ];
+      rml:predicate ex:role
+    ];
+  rml:subjectMap [
+      rml:template "http://data.example.com/employee/{empno}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .
+
+
+

272. RMLTC0015a-CSV

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
Code,Name
+BO,"Bolivia, Plurinational State of"
+IE,Ireland
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

273. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

274. RMLTC0015a-MySQL

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'ES';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

275. RMLTC0015a-PostgreSQL

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'ES';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

276. RMLTC0015a-SQLServer

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT \"Code\", \"Name\", \"Lan\"
+        FROM \"Country\"
+        WHERE \"Lan\" = 'ES';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

277. RMLTC0015a-XML

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<countries>
+  <country><Code>BO</Code><Name>Bolivia, Plurinational State of</Name></country>
+  <country><Code>IE</Code><Name>Ireland</Name></country>
+</countries>
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

278. RMLTC0015b-CSV

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
Code,Name
+BO,"Bolivia, Plurinational State of"
+IE,Ireland
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+
+

279. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

280. RMLTC0015b-MySQL

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

281. RMLTC0015b-PostgreSQL

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

282. RMLTC0015b-SQLServer

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Country;
+
+CREATE TABLE Country (
+  Code VARCHAR(2),
+  Name VARCHAR(100),
+  Lan VARCHAR(10),
+  PRIMARY KEY (Code,Lan)
+);
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Bolivia, Plurinational State of', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('BO', 'Estado Plurinacional de Bolivia', 'ES');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Ireland', 'EN');
+INSERT INTO Country (Code, Name, Lan) VALUES ('IE', 'Irlanda', 'ES');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:iterator """
+        SELECT Code, Name, Lan
+        FROM Country
+        WHERE Lan = 'EN';
+       """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

283. RMLTC0015b-XML

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rr:language value"

+

Description: "Tests a term map with an invalid rr:language value, which is an error"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<countries>
+  <country><Code>BO</Code><Name>Bolivia, Plurinational State of</Name></country>
+  <country><Code>IE</Code><Name>Ireland</Name></country>
+</countries>
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/countries/country";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Code}"
+    ] .
+
+
+

284. RMLTC0016a-MySQL

+

Title: "Table with datatypes: string and integer"

+

Description: "Tests the rr:termtype and datatype conversions: string and integer"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sex"
+        ];
+      rml:predicate ex:gender
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient/{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
+<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
+<http://example.com/Patient/10> <http://example.com/gender> "female" .
+<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
+<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
+<http://example.com/Patient/11> <http://example.com/gender> "female" .
+<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
+<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
+<http://example.com/Patient/12> <http://example.com/gender> "male" .
+
+
+
+

285. RMLTC0016a-PostgreSQL

+

Title: "Table with datatypes: string and integer"

+

Description: "Tests the rr:termtype and datatype conversions: string and integer"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "sex"
+        ];
+      rml:predicate ex:gender
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "id"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "lastname"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient/{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
+<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
+<http://example.com/Patient/10> <http://example.com/gender> "female" .
+<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
+<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
+<http://example.com/Patient/11> <http://example.com/gender> "female" .
+<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
+<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
+<http://example.com/Patient/12> <http://example.com/gender> "male" .
+
+
+
+

286. RMLTC0016a-SQLServer

+

Title: "Table with datatypes: string and integer"

+

Description: "Tests the rr:termtype and datatype conversions: string and integer"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "Sex"
+        ];
+      rml:predicate ex:gender
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient/{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
+<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
+<http://example.com/Patient/10> <http://example.com/gender> "female" .
+<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
+<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
+<http://example.com/Patient/11> <http://example.com/gender> "female" .
+<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
+<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
+<http://example.com/Patient/12> <http://example.com/gender> "male" .
+
+
+
+

287. RMLTC0016b-MySQL

+

Title: "Table with datatypes: real and float"

+

Description: "Tests the rr:termtype and datatype conversions: real and float"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "Weight"
+        ];
+      rml:predicate ex:weight
+    ], [
+      rml:objectMap [
+          rml:reference "Height"
+        ];
+      rml:predicate ex:height
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+

288. RMLTC0016b-PostgreSQL

+

Title: "Table with datatypes: real and float"

+

Description: "Tests the rr:termtype and datatype conversions: real and float"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "weight"
+        ];
+      rml:predicate ex:weight
+    ], [
+      rml:objectMap [
+          rml:reference "height"
+        ];
+      rml:predicate ex:height
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+

289. RMLTC0016b-SQLServer

+

Title: "Table with datatypes: real and float"

+

Description: "Tests the rr:termtype and datatype conversions: real and float"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "Weight"
+        ];
+      rml:predicate ex:weight
+    ], [
+      rml:objectMap [
+          rml:reference "Height"
+        ];
+      rml:predicate ex:height
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
+<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .
+
+
+

290. RMLTC0016c-MySQL

+

Title: "Table with datatypes: date and timestamp"

+

Description: "Tests the rr:termtype and datatype conversions: date and timestamp"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "BirthDate"
+        ];
+      rml:predicate ex:birthdate
+    ], [
+      rml:objectMap [
+          rml:reference "EntranceDate"
+        ];
+      rml:predicate ex:entrancedate
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+
+
+

291. RMLTC0016c-PostgreSQL

+

Title: "Table with datatypes: date and timestamp"

+

Description: "Tests the rr:termtype and datatype conversions: date and timestamp"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "birthdate"
+        ];
+      rml:predicate ex:birthdate
+    ], [
+      rml:objectMap [
+          rml:reference "entrancedate"
+        ];
+      rml:predicate ex:entrancedate
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+
+
+

292. RMLTC0016c-SQLServer

+

Title: "Table with datatypes: date and timestamp"

+

Description: "Tests the rr:termtype and datatype conversions: date and timestamp"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "BirthDate"
+        ];
+      rml:predicate ex:birthdate
+    ], [
+      rml:objectMap [
+          rml:reference "EntranceDate"
+        ];
+      rml:predicate ex:entrancedate
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
+<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
+
+
+

293. RMLTC0016d-MySQL

+

Title: "Table with datatypes, boolean conversions"

+

Description: "Tests the rr:termtype and datatype conversions: boolean"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "PaidInAdvance"
+        ];
+      rml:predicate ex:paid
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

294. RMLTC0016d-PostgreSQL

+

Title: "Table with datatypes, boolean conversions"

+

Description: "Tests the rr:termtype and datatype conversions: boolean"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "paidinadvance"
+        ];
+      rml:predicate ex:paid
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

295. RMLTC0016d-SQLServer

+

Title: "Table with datatypes, boolean conversions"

+

Description: "Tests the rr:termtype and datatype conversions: boolean"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "PaidInAdvance"
+        ];
+      rml:predicate ex:paid
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

296. RMLTC0016e-MySQL

+

Title: "Table with datatypes, binary column"

+

Description: "Tests the rr:termtype and datatype conversions: binary"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+X'89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:template "data:image/png;hex,{Photo}"
+        ];
+      rml:predicate ex:photo
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+
+
+

297. RMLTC0016e-PostgreSQL

+

Title: "Table with datatypes, binary column"

+

Description: "Tests the rr:termtype and datatype conversions: binary"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate TIMESTAMP,
+PaidInAdvance BOOLEAN,
+Photo BYTEA,
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',FALSE,
+'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',TRUE,
+'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',TRUE,
+'\x89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:template "data:image/png;hex,{photo}"
+        ];
+      rml:predicate ex:photo
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{id}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+
+
+

298. RMLTC0016e-SQLServer

+

Title: "Table with datatypes, binary column"

+

Description: "Tests the rr:termtype and datatype conversions: binary"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Patient;
+
+CREATE TABLE Patient (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50),
+Sex VARCHAR(6),
+Weight REAL,
+Height FLOAT,
+BirthDate DATE,
+EntranceDate DATETIME,
+PaidInAdvance BIT,
+Photo VARBINARY(200),
+PRIMARY KEY (ID)
+);
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (10,'Monica','Geller','female',80.25,1.65,'1981-10-10','2009-10-10 12:12:22',0,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (11,'Rachel','Green','female',70.22,1.70,'1982-11-12','2008-11-12 09:45:44',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+INSERT INTO Patient (ID, FirstName,LastName,Sex,Weight,Height,BirthDate,EntranceDate,PaidInAdvance,Photo)
+VALUES (12,'Chandler','Bing','male',90.31,1.76,'1978-04-06','2007-03-12 02:13:14',1,
+CAST('89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082' as VARBINARY));
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Patient"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:template "data:image/png;hex,{Photo}"
+        ];
+      rml:predicate ex:photo
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Patient{ID}"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
+
+
+

299. RMLTC0019a-CSV

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
ID,FirstName,LastName
+10,http://example.com/ns#Jhon,Smith
+20,Carlos,Mendoza
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

300. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

301. RMLTC0019a-MySQL

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT ID, FirstName, LastName
+        FROM Employee
+        WHERE ID < 30
+     """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

302. RMLTC0019a-PostgreSQL

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT ID, FirstName, LastName
+        FROM Employee
+        WHERE ID < 30
+     """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "firstname"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

303. RMLTC0019a-SQLServer

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+        SELECT ID, FirstName, LastName
+        FROM Employee
+        WHERE ID < 30
+     """;
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Query
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

304. RMLTC0019a-XML

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in elements"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<persons>
+    <person>
+        <ID>10</ID>
+        <FirstName>http://example.com/ns#Jhon</FirstName>
+        <LastName>Smith</LastName>
+    </person>
+    <person>
+        <ID>20</ID>
+        <FirstName>Carlos</FirstName>
+        <LastName>Mendoza</LastName>
+    </person>
+</persons>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/persons/person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

305. RMLTC0019b-CSV

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
ID,FirstName,LastName
+10,http://example.com/ns#Jhon,Smith
+20,Carlos,Mendoza
+30,Juan Daniel,Crespo
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+
+

306. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    },
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+
+

307. RMLTC0019b-MySQL

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Employee"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+
+

308. RMLTC0019b-PostgreSQL

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
DROP TABLE IF EXISTS Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Employee"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "firstname"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "firstname"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+
+

309. RMLTC0019b-SQLServer

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Employee;
+
+CREATE TABLE Employee (
+ID INTEGER,
+FirstName VARCHAR(50),
+LastName VARCHAR(50)
+);
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (10,'http://example.com/ns#Jhon','Smith');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (20,'Carlos','Mendoza');
+INSERT INTO Employee (ID,FirstName,LastName) VALUES (30,'Juan Daniel','Crespo');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Employee"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+
+

310. RMLTC0019b-XML

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in elements, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
<?xml version="1.0"?>
+
+<persons>
+    <person>
+        <ID>10</ID>
+        <FirstName>http://example.com/ns#Jhon</FirstName>
+        <LastName>Smith</LastName>
+    </person>
+    <person>
+        <ID>20</ID>
+        <FirstName>Carlos</FirstName>
+        <LastName>Mendoza</LastName>
+    </person>
+    <person>
+        <ID>30</ID>
+        <FirstName>Juan Daniel</FirstName>
+        <LastName>Crespo</LastName>
+    </person>
+</persons>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/persons/person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "FirstName"
+    ] .
+
+
+

311. RMLTC0020a-CSV

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
Name
+http://example.com/company/Alice
+Bob
+Bob/Charles
+path/../Danny
+Emily Smith
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

312. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

313. RMLTC0020a-MySQL

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.Student_Sport;
+DROP TABLE IF EXISTS test.Student;
+
+CREATE TABLE Student (
+Name VARCHAR(50)
+);
+
+INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice');
+INSERT INTO Student (Name) VALUES ('Bob');
+INSERT INTO Student (Name) VALUES ('Bob/Charles');
+INSERT INTO Student (Name) VALUES ('path/../Danny');
+INSERT INTO Student (Name) VALUES ('Emily Smith');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:IRI
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

314. RMLTC0020a-PostgreSQL

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Student (
+Name VARCHAR(50)
+);
+
+INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice');
+INSERT INTO Student (Name) VALUES ('Bob');
+INSERT INTO Student (Name) VALUES ('Bob/Charles');
+INSERT INTO Student (Name) VALUES ('path/../Danny');
+INSERT INTO Student (Name) VALUES ('Emily Smith');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{name}";
+      rml:termType rml:IRI
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "password";
+  d2rq:username "postgres" .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

315. RMLTC0020a-SQLServer

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in columns"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS Student;
+
+CREATE TABLE Student (
+Name VARCHAR(50)
+);
+
+INSERT INTO Student (Name) VALUES ('http://example.com/company/Alice');
+INSERT INTO Student (Name) VALUES ('Bob');
+INSERT INTO Student (Name) VALUES ('Bob/Charles');
+INSERT INTO Student (Name) VALUES ('path/../Danny');
+INSERT INTO Student (Name) VALUES ('Emily Smith');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "Student"
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:IRI
+    ] .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

316. RMLTC0020a-XML

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in elements"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student><Name>http://example.com/company/Alice</Name></student>
+  <student><Name>Bob</Name></student>
+  <student><Name>Bob/Charles</Name></student>
+  <student><Name>path/../Danny</Name></student>
+  <student><Name>Emily Smith</Name></student>
+</students>
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

317. RMLTC0021a-CSV

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
ID,Name,Sport
+10,Venus Williams,Tennis
+20,Serena Williams,Tennis
+30,Loena Hendrickx,Figure skating
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

318. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

319. RMLTC0021a-MySQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
USE test;
+DROP TABLE IF EXISTS test.student;
+
+CREATE TABLE student (
+  ID INTEGER,
+  Name VARCHAR(50),
+  Sport VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+INSERT INTO student values ('20', 'Serena Williams', 'Tennis');
+INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
+  d2rq:password "";
+  d2rq:username "root" .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

320. RMLTC0021a-PostgreSQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
DROP TABLE IF EXISTS student;
+
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+INSERT INTO student values ('20', 'Serena Williams', 'Tennis');
+INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "org.postgresql.Driver";
+  d2rq:password "";
+  d2rq:username "postgres" .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

321. RMLTC0021a-SPARQL

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ns1: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "10" ;
+    foaf:name "Venus Williams" .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Tennis" ] ;
+    rdf:ID "20" ;
+    foaf:name "Serena Williams" .
+
+[] ns1:plays [ a ns1:Sport ;
+            foaf:name "Figure skating" ] ;
+    rdf:ID "30" ;
+    foaf:name "Loena Hendrickx" .
+
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+
+ex:RefObjectMap1 a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport.value";
+      rml:parent "Sport.value"
+    ];
+  rml:parentTriplesMap ex:TriplesMap1 .
+
+ex:TriplesMap1 a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator """
+            PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+            SELECT ?Name ?ID
+            WHERE {
+                ?x  foaf:name ?Name ;
+                    rdf:ID    ?ID ;
+            } """;
+      rml:referenceFormulation formats:SPARQL_Results_JSON;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path <http://example.com/base#InputSPARQL>
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap ex:RefObjectMap1;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID.value}/{Name.value}"
+    ] .
+
+<http://example.com/base#InputSPARQL> a sd:Service;
+  sd:endpoint <http://HOST:PORT/ds1/sparql>;
+  sd:supportedLanguage sd:SPARQL11Query .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

322. RMLTC0021a-SQLServer

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
USE TestDB;
+DROP TABLE IF EXISTS student;
+CREATE TABLE student (
+  "ID" INTEGER,
+  "Name" VARCHAR(50),
+  "Sport" VARCHAR(50)
+);
+INSERT INTO student values ('10', 'Venus Williams', 'Tennis');
+INSERT INTO student values ('20', 'Serena Williams', 'Tennis');
+INSERT INTO student values ('30', 'Loena Hendrickx', 'Figure skating');
+
+

Mapping

+
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/#DB_source> a d2rq:Database;
+  d2rq:jdbcDSN "CONNECTIONDSN";
+  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
+  d2rq:password "YourSTRONG!Passw0rd;";
+  d2rq:username "sa" .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [
+      rml:source <http://example.com/base/#DB_source>;
+      rml:referenceFormulation rml:SQL2008Table;
+      rml:iterator "student"
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

323. RMLTC0021a-XML

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<students>
+  <student>
+    <ID>10</ID>
+    <Name>Venus Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+  <student>
+    <ID>20</ID>
+    <Name>Serena Williams</Name>
+    <Sport>Tennis</Sport>
+  </student>
+  <student>
+    <ID>30</ID>
+    <Name>Loena Hendrickx</Name>
+    <Sport>Figure skating</Sport>
+  </student>
+</students>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "Sport";
+      rml:parent "Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/students/student";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{ID}/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

324. RMLTC0022a-CSV

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Error expected? No

+

Input

+
Name,Age
+Venus,21
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

325. RMLTC0022b-CSV

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Error expected? No

+

Input

+
FOO,BAR
+1,string
+2,int
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{BAR}"
+            ];
+          rml:reference "FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

326. RMLTC0022c-CSV

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Error expected? No

+

Input

+
FOO,BAR
+1,string
+2,int
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.csv"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{BAR}"
+            ];
+          rml:reference "FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://example.com/base/datatype#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://example.com/base/datatype#int> .
+
+
+

327. RMLTC0023a-XML

+

Title: "XML attributes selection"

+

Description: "Test generation of triples with selected XML attributes"

+

Error expected? No

+

Input

+
<?xml version="1.0"?>
+
+<persons>
+  <person fname="Bob" lname="Smith" amount="30.0E0">
+  </person>
+  <person fname="Sue" lname="Jones" amount="20.0E0">
+  </person>
+  <person fname="Bob" lname="Smith" amount="30.0E0">
+  </person>
+</persons>
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "/persons/person";
+      rml:referenceFormulation rml:XPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.xml"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "@amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{@fname};{@lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

328. RMLTC0024a-CSV

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{NON_EXISTING_COLUMN}"
+      rml:class foaf:Person;
+    ] .
+
+
+

329. RMLTC0024b-CSV

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{Name}
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}"
+      rml:class foaf:Person;
+    ] .
+
+
+

330. RMLTC0024c-CSV

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
N\ame
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}"
+      rml:class foaf:Person;
+    ] .
+
+
+

331. RMLTC0024d-CSV

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
Name
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}"
+      rml:class foaf:Person;
+    ] .
+
+
+

332. RMLTC0024e-CSV

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{Name}
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

333. RMLTC0024f-CSV

+

Title: "Invalid IRI template 6"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
N\ame
+Venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:CSV;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/docs/20250217/index.html b/src/test/resources/rml-core/docs/20250217/index.html new file mode 100644 index 00000000..128b077d --- /dev/null +++ b/src/test/resources/rml-core/docs/20250217/index.html @@ -0,0 +1,2988 @@ + + + + + + +RML-Core: Test Cases + + + + + + + + + + + + + + +
+ +

RML-Core: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Core-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/core/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-core + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rml:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

6. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rml:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

7. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

8. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

9. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rml:path"

+

Description: "Tests the presence of an undefined rml:path"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

10. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

11. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rml:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

12. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

13. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

14. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

15. RMLTC0006a-JSON

+

Title: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Description: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

16. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

17. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

18. RMLTC0007c-JSON

+

Title: "One row mapping, using rml:class"

+

Description: "Tests subjectmap with more than one class IRIs, rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

19. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

20. RMLTC0007e-JSON

+

Title: "One column mapping, using rml:graphMap and rml:class"

+

Description: "Tests subjectmap with rml:graphMap and rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

21. RMLTC0007f-JSON

+

Title: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

22. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

23. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

24. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rml:graphMap and rml:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

25. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

26. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

27. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

28. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

29. RMLTC0010a-JSON

+

Title: "Template with table column with blank space"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

30. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

31. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

32. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

33. RMLTC0012a-JSON

+

Title: "Blank node referencing multiple columns"

+

Description: "Tests that blank nodes can be generated by referencing multiple columns"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

34. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

35. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

36. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

37. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

38. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

39. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rml:language value"

+

Description: "Tests a term map with an invalid rml:language value, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

40. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

41. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    },
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+
+

42. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

43. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

44. RMLTC0022a-JSON

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "$.Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

45. RMLTC0022b-JSON

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.[*]"
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

46. RMLTC0022c-JSON

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

47. RMLTC0023a-JSON

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{NON_EXISTING_COLUMN}"
+      rml:class foaf:Person;
+    ] .
+
+
+

48. RMLTC0023b-JSON

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}"
+      rml:class foaf:Person;
+    ] .
+
+
+

49. RMLTC0023c-JSON

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}"
+      rml:class foaf:Person;
+    ] .
+
+
+
+

50. RMLTC0023d-JSON

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}"
+      rml:class foaf:Person;
+    ] .
+
+
+
+

51. RMLTC0023e-JSON

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

52. RMLTC0023f-JSON

+

Title: "Invalid IRI template 6"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/docs/20250224/index.html b/src/test/resources/rml-core/docs/20250224/index.html new file mode 100644 index 00000000..b1e604bb --- /dev/null +++ b/src/test/resources/rml-core/docs/20250224/index.html @@ -0,0 +1,3113 @@ + + + + + + +RML-Core: Test Cases + + + + + + + + + + + + + + +
+ +

RML-Core: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Core-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/core/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-core + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rml:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

6. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rml:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

7. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

8. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

9. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rml:path"

+

Description: "Tests the presence of an undefined rml:path"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

10. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

11. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rml:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

12. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

13. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

14. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

15. RMLTC0006a-JSON

+

Title: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Description: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

16. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

17. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

18. RMLTC0007c-JSON

+

Title: "One row mapping, using rml:class"

+

Description: "Tests subjectmap with more than one class IRIs, rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

19. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

20. RMLTC0007e-JSON

+

Title: "One column mapping, using rml:graphMap and rml:class"

+

Description: "Tests subjectmap with rml:graphMap and rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

21. RMLTC0007f-JSON

+

Title: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

22. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

23. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.Name";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

24. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rml:graphMap and rml:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

25. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

26. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

27. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

28. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

29. RMLTC0010a-JSON

+

Title: "Template with table column with blank space"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

30. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

31. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

32. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

33. RMLTC0012a-JSON

+

Title: "Blank node referencing multiple columns"

+

Description: "Tests that blank nodes can be generated by referencing multiple columns"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

34. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

35. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

36. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

37. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

38. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

39. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rml:language value"

+

Description: "Tests a term map with an invalid rml:language value, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

40. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

41. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    },
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+

+
+
+

42. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

43. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

44. RMLTC0022a-JSON

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "$.Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

45. RMLTC0022b-JSON

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

46. RMLTC0022c-JSON

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

47. RMLTC0023a-JSON

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{NON_EXISTING_COLUMN}";
+      rml:class foaf:Person;
+    ] .
+
+
+

48. RMLTC0023b-JSON

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

49. RMLTC0023c-JSON

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

50. RMLTC0023d-JSON

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

51. RMLTC0023e-JSON

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

52. RMLTC0023f-JSON

+

Title: "Invalid IRI template 6"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

53. RMLTC0025a-JSON

+

Title: "Generation of triples with constant blank node "

+

Description: "Tests the generation of triples with a constant blank node"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subject _:School .
+
+

Output

+
_:School <http://example.com/student> "Julio" .
+_:School <http://example.com/student> "Venus" .
+
+
+

54. RMLTC0025b-JSON

+

Title: "Usage of constant term maps in combination with explicitly defined term types"

+

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subjectMap [
+      rml:constant "School";
+      rml:termType rml:BlankNode
+  ] .
+
+
+

55. RMLTC0026a-JSON

+

Title: "Generation of triples from arrays"

+

Description: "Tests the generation of triples from array input data structures"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Student/Bob/Smith> <http://example.com/amount> "30" .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "40" .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50" .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/docs/20250228/index.html b/src/test/resources/rml-core/docs/20250228/index.html new file mode 100644 index 00000000..d298e7e3 --- /dev/null +++ b/src/test/resources/rml-core/docs/20250228/index.html @@ -0,0 +1,3113 @@ + + + + + + +RML-Core: Test Cases + + + + + + + + + + + + + + +
+ +

RML-Core: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Core-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/core/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-core + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rml:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

6. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rml:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

7. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

8. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

9. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rml:path"

+

Description: "Tests the presence of an undefined rml:path"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

10. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

11. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rml:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

12. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

13. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

14. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

15. RMLTC0006a-JSON

+

Title: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Description: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

16. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

17. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

18. RMLTC0007c-JSON

+

Title: "One row mapping, using rml:class"

+

Description: "Tests subjectmap with more than one class IRIs, rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

19. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

20. RMLTC0007e-JSON

+

Title: "One column mapping, using rml:graphMap and rml:class"

+

Description: "Tests subjectmap with rml:graphMap and rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

21. RMLTC0007f-JSON

+

Title: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

22. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

23. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.ID";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

24. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rml:graphMap and rml:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

25. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

26. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

27. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

28. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

29. RMLTC0010a-JSON

+

Title: "Template with table column with blank space"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

30. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

31. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

32. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

33. RMLTC0012a-JSON

+

Title: "Blank node referencing multiple columns"

+

Description: "Tests that blank nodes can be generated by referencing multiple columns"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

34. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

35. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

36. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

37. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

38. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

39. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rml:language value"

+

Description: "Tests a term map with an invalid rml:language value, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

40. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

41. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    },
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+

+
+
+

42. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

43. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

44. RMLTC0022a-JSON

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "$.Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

45. RMLTC0022b-JSON

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

46. RMLTC0022c-JSON

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

47. RMLTC0023a-JSON

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{NON_EXISTING_COLUMN}";
+      rml:class foaf:Person;
+    ] .
+
+
+

48. RMLTC0023b-JSON

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

49. RMLTC0023c-JSON

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

50. RMLTC0023d-JSON

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

51. RMLTC0023e-JSON

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

52. RMLTC0023f-JSON

+

Title: "Invalid IRI template 6"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

53. RMLTC0025a-JSON

+

Title: "Generation of triples with constant blank node "

+

Description: "Tests the generation of triples with a constant blank node"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subject _:School .
+
+

Output

+
_:School <http://example.com/student> "Julio" .
+_:School <http://example.com/student> "Venus" .
+
+
+

54. RMLTC0025b-JSON

+

Title: "Usage of constant term maps in combination with explicitly defined term types"

+

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subjectMap [
+      rml:constant "School";
+      rml:termType rml:BlankNode
+  ] .
+
+
+

55. RMLTC0026a-JSON

+

Title: "Generation of triples from arrays"

+

Description: "Tests the generation of triples from array input data structures"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Student/Bob/Smith> <http://example.com/amount> "30" .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "40" .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50" .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/docs/index.html b/src/test/resources/rml-core/docs/index.html new file mode 100644 index 00000000..d298e7e3 --- /dev/null +++ b/src/test/resources/rml-core/docs/index.html @@ -0,0 +1,3113 @@ + + + + + + +RML-Core: Test Cases + + + + + + + + + + + + + + +
+ +

RML-Core: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Core-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/core/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-core + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rml:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

6. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rml:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

7. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10" .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

8. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

9. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rml:path"

+

Description: "Tests the presence of an undefined rml:path"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

10. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

11. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rml:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

12. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

13. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

14. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

15. RMLTC0006a-JSON

+

Title: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Description: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

16. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

17. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

18. RMLTC0007c-JSON

+

Title: "One row mapping, using rml:class"

+

Description: "Tests subjectmap with more than one class IRIs, rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

19. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

20. RMLTC0007e-JSON

+

Title: "One column mapping, using rml:graphMap and rml:class"

+

Description: "Tests subjectmap with rml:graphMap and rml:class"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

21. RMLTC0007f-JSON

+

Title: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
+
+
+

22. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

23. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.ID";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

24. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rml:graphMap and rml:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

25. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

26. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

27. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

28. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

29. RMLTC0010a-JSON

+

Title: "Template with table column with blank space"

+

Description: "Tests a template with blank space in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

30. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

31. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

32. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

33. RMLTC0012a-JSON

+

Title: "Blank node referencing multiple columns"

+

Description: "Tests that blank nodes can be generated by referencing multiple columns"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

34. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Error expected? No

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

35. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

36. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

37. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

38. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

39. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rml:language value"

+

Description: "Tests a term map with an invalid rml:language value, which is an error"

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
+    {"Code": "IE", "Name": "Ireland"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

40. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

41. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    },
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+

+
+
+

42. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

43. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

44. RMLTC0022a-JSON

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "$.Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

45. RMLTC0022b-JSON

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

46. RMLTC0022c-JSON

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

47. RMLTC0023a-JSON

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{NON_EXISTING_COLUMN}";
+      rml:class foaf:Person;
+    ] .
+
+
+

48. RMLTC0023b-JSON

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

49. RMLTC0023c-JSON

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

50. RMLTC0023d-JSON

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

51. RMLTC0023e-JSON

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

52. RMLTC0023f-JSON

+

Title: "Invalid IRI template 6"

+

Description: "Test handling of invalid IRI template"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

53. RMLTC0025a-JSON

+

Title: "Generation of triples with constant blank node "

+

Description: "Tests the generation of triples with a constant blank node"

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subject _:School .
+
+

Output

+
_:School <http://example.com/student> "Julio" .
+_:School <http://example.com/student> "Venus" .
+
+
+

54. RMLTC0025b-JSON

+

Title: "Usage of constant term maps in combination with explicitly defined term types"

+

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subjectMap [
+      rml:constant "School";
+      rml:termType rml:BlankNode
+  ] .
+
+
+

55. RMLTC0026a-JSON

+

Title: "Generation of triples from arrays"

+

Description: "Tests the generation of triples from array input data structures"

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Student/Bob/Smith> <http://example.com/amount> "30" .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "40" .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50" .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/list.sh b/src/test/resources/rml-core/list.sh new file mode 100644 index 00000000..12c32031 --- /dev/null +++ b/src/test/resources/rml-core/list.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for i in RML*; do + echo "
" +done diff --git a/src/test/resources/rml-core/make-metadata.py b/src/test/resources/rml-core/make-metadata.py new file mode 100644 index 00000000..f42be7f8 --- /dev/null +++ b/src/test/resources/rml-core/make-metadata.py @@ -0,0 +1,273 @@ +#!/usr/bin/env python3 + +import os +import sys +import glob +import csv + +def get_title_description(testcase: str): + with open ('descriptions.csv') as csvfile: + reader = csv.reader(csvfile) + for row in reader: + if row[0] == testcase: + return row[1], row[2] + print(f'{testcase} not found in descriptions.csv') + sys.exit(1) + +def main(spec: str): + with open ('metadata.csv', 'w') as csvfile: + writer = csv.writer(csvfile) + writer.writerow(['ID', 'title', 'description', 'specification', + 'mapping', 'input_format1', 'input_format2', + 'input_format3', 'output_format1', 'output_format2', + 'output_format3', 'input1', 'input2', 'input3', + 'output1', 'output2', 'output3', 'error']) + for testcase in glob.glob('RML*'): + print(testcase) + title, description = get_title_description(testcase) + title = '"' + title + '"' + description = '"' + description + '"' + error = 'false' + input1 = '' + input2 = '' + input3 = '' + input_format1 = '' + input_format2 = '' + input_format3 = '' + output1 = '' + output2 = '' + output3 = '' + output_format1 = '' + output_format2 = '' + output_format3 = '' + + # Input file + if os.path.exists(os.path.join(testcase, 'student.json')): + input1 = 'student.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'student_sport.json')): + if testcase == 'RMLTC0009a-JSON' or testcase == 'RMLTC0009b-JSON': + input3 = 'student_sport.json' + input_format3 = 'application/json' + else: + input1 = 'student_sport.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'sport.json')): + input2 = 'sport.json' + input_format2 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'ious.json')): + input1 = 'ious.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'country_info.json')): + input1 = 'country_info.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'persons.json')): + if testcase == 'RMLTC0012b-JSON': + input2 = 'persons.json' + input_format2 = 'application/json' + else: + input1 = 'persons.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'country_en.json')): + input1 = 'country_en.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'country_es.json')): + input1 = 'country_es.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'data.json')): + input1 = 'data.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'lives.json')): + input1 = 'lives.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'student.xml')): + input1 = 'student.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'student_sport.xml')): + if testcase == 'RMLTC0009a-XML' or testcase == 'RMLTC0009b-XML': + input3 = 'student_sport.xml' + input_format3 = 'text/xml' + else: + input1 = 'student_sport.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'sport.xml')): + input2 = 'sport.xml' + input_format2 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'ious.xml')): + input1 = 'ious.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'country_info.xml')): + input1 = 'country_info.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'persons.xml')): + if testcase == 'RMLTC0012b-XML': + input2 = 'persons.xml' + input_format2 = 'text/xml' + else: + input1 = 'persons.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'country_en.xml')): + input1 = 'country_en.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'country_es.xml')): + input1 = 'country_es.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'data.xml')): + input1 = 'data.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'lives.xml')): + input1 = 'lives.xml' + input_format1 = 'text/xml' + elif os.path.exists(os.path.join(testcase, 'student.csv')): + input1 = 'student.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'student_sport.csv')): + if testcase == 'RMLTC0009a-CSV' or testcase == 'RMLTC0009b-CSV': + input3 = 'student_sport.csv' + input_format3 = 'text/csv' + else: + input1 = 'student_sport.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'sport.csv')): + input2 = 'sport.csv' + input_format2 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'ious.csv')): + input1 = 'ious.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'country_info.csv')): + input1 = 'country_info.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'persons.csv')): + if testcase == 'RMLTC0012b-CSV': + input2 = 'persons.csv' + input_format2 = 'text/csv' + else: + input1 = 'persons.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'country_en.csv')): + input1 = 'country_en.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'country_es.csv')): + input1 = 'country_es.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'data.csv')): + input1 = 'data.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'lives.csv')): + input1 = 'lives.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'resource.sql')): + input1 = 'resource.sql' + if 'MySQL' in testcase: + input_format1 = 'application/sql+mysql' + elif 'PostgreSQL' in testcase: + input_format1 = 'application/sql+postgresql' + elif 'SQLServer' in testcase: + input_format1 = 'application/sql+sqlserver' + elif 'MariaDB' in testcase: + input_format1 = 'application/sql+mariadb' + elif 'SQLite' in testcase: + input_format1 = 'application/sql+sqlite' + else: + input_format1 = 'application/sql' + elif os.path.exists(os.path.join(testcase, 'resource.ttl')): + input1 = 'resource.ttl' + input_format1 = 'text/turtle' + elif os.path.exists(os.path.join(testcase, 'resource1.ttl')): + input1 = 'resource1.ttl' + input_format1 = 'text/turtle' + elif os.path.exists(os.path.join(testcase, 'resource2.ttl')): + input2 = 'resource2.ttl' + input_format2 = 'text/turtle' + + # Mapping file + if os.path.exists(os.path.join(testcase, 'mapping.ttl')): + mapping_file = 'mapping.ttl' + else: + raise ValueError('Mapping file missing!') + + # Output files + if os.path.exists(os.path.join(testcase, 'output.nq')): + output1 = 'output.nq' + output_format1 = 'application/n-quads' + else: + error = 'true'; + + writer.writerow([testcase, title, description, spec, mapping_file, + input_format1, input_format2, input_format3, + output_format1, output_format2, output_format3, + input1, input2, input3, output1, output2, + output3, error]) + lines = [] + # Title and description + lines.append(f'## {testcase}\n\n') + lines.append(f'**Title**: {title}\n\n') + lines.append(f'**Description**: {description}\n\n') + if error == 'true': + error_html = 'Yes' + else: + error_html = 'No' + lines.append(f'**Error expected?** {error_html}\n\n') + + # Input + inputCount = '' + + for index, i in enumerate([input1, input2, input3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + input_html = f'**Input{inputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + input_html = f'**Input{inputCount}**\n `{i}`\n\n' + + lines.append(input_html) + inputCount = f' {index + 1}' + + # Mapping + with open(os.path.join(testcase, mapping_file)) as f: + mapping_html = f'**Mapping**\n```\n{f.read()}\n```\n\n' + lines.append(mapping_html) + + # Output + outputCount = '' + if output2 or output3: + outputCount = ' 1' + + for index, i in enumerate([output1, output2, output3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + output_html = f'**Output{outputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + output_html = f'**Output{outputCount}**\n `{i}`\n\n' + + lines.append(output_html) + outputCount = f' {index + 2}' + + + with open(os.path.join(testcase, 'README.md'), 'w') as f: + f.writelines(lines) + +if __name__ == '__main__': + if len(sys.argv) != 2: + print('Usage: ./make-metadata.py ') + sys.exit(1) + main(sys.argv[1]) diff --git a/src/test/resources/rml-core/manifest.rml.ttl b/src/test/resources/rml-core/manifest.rml.ttl new file mode 100644 index 00000000..864f3ba9 --- /dev/null +++ b/src/test/resources/rml-core/manifest.rml.ttl @@ -0,0 +1,267 @@ +@prefix xsd: . +@prefix dcterms: . +@prefix rml: . +@prefix rmltest: . +@prefix test: . +@base . + +# java -jar .\burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/core/test/ + +_:source + rml:source [ + a rml:RelativePathSource ; + rml:path "metadata.csv" ; + rml:null ""; + ]; + rml:referenceFormulation rml:CSV; +. + +<#TriplesMapTestcase> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:reference "ID"; + rml:class test:TestCase; + ]; + + rml:predicateObjectMap [ + rml:predicate dcterms:identifier; + rml:objectMap [ + rml:reference "ID"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:hasError; + rml:objectMap [ + rml:reference "error"; + rml:datatype xsd:boolean; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:mappingDocument; + rml:objectMap [ + rml:reference "mapping"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; +. + +<#TriplesMapInput1> + a rml:TriplesMap; + + rml:logicalSource _:source ; + + rml:subjectMap [ + rml:template "{ID}/input/{input1}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format1"; + ]; + ]; +. + +<#TriplesMapInput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input2}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format2"; + ]; + ]; +. + +<#TriplesMapInput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input3}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format3"; + ]; + ]; +. + +<#TriplesMapOutput1> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output1}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format1"; + ]; + ]; +. + +<#TriplesMapOutput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output2}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format2"; + ]; + ]; +. + +<#TriplesMapOutput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output3}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format3"; + ]; + ]; +. + diff --git a/src/test/resources/rml-core/manifest.ttl b/src/test/resources/rml-core/manifest.ttl new file mode 100644 index 00000000..27148320 --- /dev/null +++ b/src/test/resources/rml-core/manifest.ttl @@ -0,0 +1,660 @@ + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0026a-JSON" . + "false"^^ . + . + . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0028c-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0013a-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0002g-JSON" . + "true"^^ . + . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0028b-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0004b-JSON" . + "true"^^ . + . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0015b-JSON" . + "true"^^ . + . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "student.json" . + "application/json" . + . + "persons.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0004a-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0019b-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0000-JSON" . + "false"^^ . + . + . + . + "ious.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0008a-JSON" . + "false"^^ . + . + . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0023f-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "persons.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0023b-JSON" . + "true"^^ . + . + . + "mapping.ttl" . + "RMLTC0023e-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0010b-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0023a-JSON" . + "true"^^ . + . + . + "mapping.ttl" . + "RMLTC0012d-JSON" . + "true"^^ . + . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "persons.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0010a-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0012c-JSON" . + "true"^^ . + . + . + "country_info.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0025b-JSON" . + "true"^^ . + . + . + "mapping.ttl" . + "RMLTC0027a-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0027d-JSON" . + "false"^^ . + . + . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0001b-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0007h-JSON" . + "true"^^ . + . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0001a-JSON" . + "false"^^ . + . + . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0003c-JSON" . + "false"^^ . + . + . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0007g-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0005a-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0007c-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "persons.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0007b-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0009a-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0020a-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0022c-JSON" . + "false"^^ . + . + . + . + "output.nq" . + "application/n-quads" . + . + "persons.json" . + "application/json" . + . + "country_en.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0011b-JSON" . + "false"^^ . + . + . + . + "persons.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "persons.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0028a-JSON" . + "false"^^ . + . + . + . + "persons.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0002b-JSON" . + "false"^^ . + . + . + . + "persons.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0002e-JSON" . + "true"^^ . + . + . + "mapping.ttl" . + "RMLTC0015a-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0002a-JSON" . + "false"^^ . + . + . + . + "persons.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0019a-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "student.json" . + "application/json" . + . + "country_en.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0006a-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0008c-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0008b-JSON" . + "false"^^ . + . + . + . + "country_info.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0023d-JSON" . + "true"^^ . + . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0021a-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0023c-JSON" . + "true"^^ . + . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "persons.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0010c-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0012b-JSON" . + "false"^^ . + . + . + . + "student_sport.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0025a-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0027c-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0012a-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0027b-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0007f-JSON" . + "false"^^ . + . + . + . + "student.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "country_info.json" . + "application/json" . + . + "mapping.ttl" . + "RMLTC0007e-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0007a-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0007d-JSON" . + "false"^^ . + . + . + . + "output.nq" . + "application/n-quads" . + . + "persons.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0009b-JSON" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLTC0022b-JSON" . + "false"^^ . + . + . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "mapping.ttl" . + "RMLTC0022a-JSON" . + "false"^^ . + . + . + . diff --git a/src/test/resources/rml-core/metadata.csv b/src/test/resources/rml-core/metadata.csv new file mode 100644 index 00000000..5376fea4 --- /dev/null +++ b/src/test/resources/rml-core/metadata.csv @@ -0,0 +1,60 @@ +ID,title,description,specification,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error +RMLTC0000-JSON,"""one table, one column, zero rows""","""Tests if an empty table produces an empty RDF graph""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0001a-JSON,"""One column mapping, subject URI generation by using rml:template""","""Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0001b-JSON,"""One column mapping, generation of a BlankNode subject by using rml:termType""","""Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0002a-JSON,"""Two columns mapping, generation of a subject URI by the concatenation of two column values""","""Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0002b-JSON,"""Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType""","""Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0002e-JSON,"""Two columns mapping, an undefined rml:path""","""Tests the presence of an undefined rml:path""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0002g-JSON,"""Two columns mapping, invalid JSONPath""","""Test the presence of an invalid JSONPath""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0003c-JSON,"""Three columns mapping, by using a rml:template to produce literal""","""Tests: (1) three column mapping; and (2) the use of rml:template to produce literal""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0004a-JSON,"""Two column mapping, from one row table to two different triples""","""Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student_sport.json,,,output.nq,,,false +RMLTC0004b-JSON,"""One column mapping, presence of rml:termType rml:Literal on rml:subjectMap""","""Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0005a-JSON,"""Typing of resources""","""Tests the typing of resources""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,ious.json,,,output.nq,,,false +RMLTC0006a-JSON,"""Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""","""Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007a-JSON,"""Typing resources by relying on rdf:type predicate""","""Tests the typing resources by relying on rdf:type predicate""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007b-JSON,"""Assigning triples to Named Graphs""","""Tests the generation of triples to a named graph""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007c-JSON,"""One row mapping, using rml:class""","""Tests subjectmap with more than one class IRIs, rml:class""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007d-JSON,"""One column mapping, specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007e-JSON,"""One column mapping, using rml:graphMap and rml:class""","""Tests subjectmap with rml:graphMap and rml:class""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007f-JSON,"""One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007g-JSON,"""Assigning triples to the default graph""","""Tests the generation of triples to the default graph""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0007h-JSON,"""Assigning triples to a non-IRI named graph""","""Tests the generation of triples to a non-IRI named graph, which is an error""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0008a-JSON,"""Generation of triples to a target graph by using rml:graphMap and rml:template""","""Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0008b-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map without join""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0008c-JSON,"""Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""","""Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0009a-JSON,"""Generation of triples from foreign key relations""","""Test foreign key relationships among logical tables""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0009b-JSON,"""Generation of triples to multiple graphs""","""Test that results from distinct parts of the mapping can be directed to different target graphs.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0010a-JSON,"""Template with table column with blank space""","""Tests a template with blank space in column value""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false +RMLTC0010b-JSON,"""Template with table columns with special chars""","""Tests a template with special chars in column value""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false +RMLTC0010c-JSON,"""Template with table columns with special chars and backslashes""","""Tests a template with special chars in reference value and backslash escapes in string templates""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false +RMLTC0011b-JSON,"""M to M relation, by using an additional Triples Map""","""Tests, M to M relations, by using an additional Triples Map""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0012a-JSON,"""Blank node referencing multiple columns""","""Tests that blank nodes can be generated by referencing multiple columns""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0012b-JSON,"""Duplicate tuples generate same blank node""","""Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.""",http://w3id.org/rml/core/,mapping.ttl,,application/json,,application/n-quads,,,,persons.json,,output.nq,,,false +RMLTC0012c-JSON,"""TriplesMap without subjectMap""","""Tests a RML with missing information, TriplesMap without subjectMap.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true +RMLTC0012d-JSON,"""TriplesMap with two subjectMap""","""Tests a RML with wrong information, TriplesMap with two subjectMap.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true +RMLTC0013a-JSON,"""Null value in JSON file""","""Tests if null values in JSON files are handled correctly.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0015a-JSON,"""Generation of language tags from a table with language information""","""Generation of language tags from a table with language information""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,country_en.json,,,output.nq,,,false +RMLTC0015b-JSON,"""Generation of language tags from a table with language information, and a term map with invalid rml:language value""","""Tests a term map with an invalid rml:language value, which is an error""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,country_en.json,,,,,,true +RMLTC0019a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0019b-JSON,"""Generation of triples by using IRI value in columns, with data error""","""Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0020a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0021a-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map with same logical source and join condition""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0022a-JSON,"""Generating of triples with constant datatype""","""Test triples with a fixed constant datatype""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0022b-JSON,"""Generating of triples with datatypeMap""","""Test triples with a XSD datatype generated from the data""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0022c-JSON,"""Generating of triples with datatypeMap with custom datatype""","""Test triples with a custom datype from the data""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0023a-JSON,"""Invalid IRI template 1""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023b-JSON,"""Invalid IRI template 2""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023c-JSON,"""Invalid IRI template 3""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023d-JSON,"""Invalid IRI template 4""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0023e-JSON,"""Invalid IRI template 5""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0023f-JSON,"""Invalid IRI template 6""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0025a-JSON,"""Generation of triples with constant blank node ""","""Tests the generation of triples with a constant blank node""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0025b-JSON,"""Usage of constant term maps in combination with explicitly defined term types""","""Tests the usage of constant term maps in combination with explicitly defined term types""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true +RMLTC0026a-JSON,"""Generation of triples from arrays""","""Tests the generation of triples from array input data structures""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0027a-JSON,"""Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs""","""Tests the generation of triples from relative IRIs using base IRI""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0027b-JSON,"""Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter""","""Tests the generation of triples from relative IRI using base IRI parameter""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0027c-JSON,"""Two triples maps, both with rml:baseIRI defined""","""Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0027d-JSON,"""Two triples maps,both with rml:bseIRI defined overwritten by baseIRI parameter""","""Tests the generation of triples by with base IRIs different than the base IRI parameter""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0028a-JSON,"""Generation of triples using the URI term type""","""Tests the generation of triples with a URI term type in the subject or object""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0028b-JSON,"""Generation of triples using the UnsafeURI term type""","""Tests the generation of triples with a UnsafeURI term type in the subject or object""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false +RMLTC0028c-JSON,"""Generation of triples using the UnsafeIRI term type""","""Tests the generation of triples with a UnsafeIRI term type in the subject or object""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false diff --git a/src/test/resources/rml-core/section/abstract.md b/src/test/resources/rml-core/section/abstract.md new file mode 100644 index 00000000..e7298444 --- /dev/null +++ b/src/test/resources/rml-core/section/abstract.md @@ -0,0 +1 @@ +This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools. diff --git a/src/test/resources/rml-core/section/data-model.md b/src/test/resources/rml-core/section/data-model.md new file mode 100644 index 00000000..f4c3ad6a --- /dev/null +++ b/src/test/resources/rml-core/section/data-model.md @@ -0,0 +1,12 @@ +# Data model + +The test cases are semantically described for re-usability and shareability following the [W3C Test case description](https://www.w3.org/2006/03/test-description). +Each `test:Testcase` as the following properties: + +- `dcterms:identifier`: unique ID of the test case. +- `rmltest:hasError`: if an error of the RML Processor is expected or not. +- `rmltest:input`: One or more input data of the test case. +- `rmltest:output`: One or more output data of the test case. +- `rmltest:inputFormat`: the input data format. +- `rmltest:outputFormat`: the output data format. +- `rmltest:mappingDocument`: the RML mapping rules in Turtle. diff --git a/src/test/resources/rml-core/section/introduction.md b/src/test/resources/rml-core/section/introduction.md new file mode 100644 index 00000000..caad4497 --- /dev/null +++ b/src/test/resources/rml-core/section/introduction.md @@ -0,0 +1,4 @@ +# Introduction + +This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification. diff --git a/src/test/resources/rml-core/section/test-cases.md b/src/test/resources/rml-core/section/test-cases.md new file mode 100644 index 00000000..63cd4274 --- /dev/null +++ b/src/test/resources/rml-core/section/test-cases.md @@ -0,0 +1,10 @@ +# Test cases + +This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on [GitHub](https://github.com/kg-construct/rml-core/tree/main/test-cases) in the folder `test-cases`. +Each test case is contained in a single folder, containing three types of files: + + - Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server. + - One file with the RML rules, called `mapping.ttl`, in the Turtle format. + - Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error. + diff --git a/src/test/resources/rml-fnml/README.md b/src/test/resources/rml-fnml/README.md new file mode 100644 index 00000000..755eeb73 --- /dev/null +++ b/src/test/resources/rml-fnml/README.md @@ -0,0 +1,59 @@ +# FNML Test Cases + +Each test case is within a subfolder of this folder. + +If no output.nq file is present, an error is expected. + +All function descriptions are locally available under [functions.ttl](./functions.ttl). + +Some test cases are under discussion, proposed alternatives are noted via a suffix `b`. + +## Functions that are used in these test cases + +`@prefix idlab-fn: .` +`@prefix grel: .` + +## Open issues for which there are no test cases + +| title | purpose | +|:---------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------:| +| Function on object, 1 constant parameter | Tests if a constant parameter can be used | +| Function on object, wrong type parameter | Tests a function with a wrong type parameter cannot be used | +| Function on object returns null | Tests that no triple should be generated when the result is null. | +| Function on object returns empty string | Tests that a triple is generated when the results is an empty string. | +| Function on object, the output termType is Literal | Tests if the output of the function is assigned the correct termType | +| Function on subject returns invalid IRI | Tests that no triples are generated for a subject that gets an invalid IRI as the result from a function. | +| Function on predicate returns invalid IRI | Tests that no triples are generated for a predicate that gets an invalid IRI as the result from a function. | +| Nested function - Test B | Tests if a composite function of form f(g(x1),h(x2)) works (i.e., two different inner functions are the arguments of the outer function) | +| Nested function - Test C | Tests if a composite function of form f(g(h(x1),x2),x3) works (i.e., the inner function is also a composite function) | +| Function on graph, 1 parameter | Tests if a function can be used on a graph | +| Function on languageMap | Tests that function on LanguageMap is handled | +| Function on graph returns invalid IRI | Tests that no triples are generated for a graph that gets an invalid IRI as the result from a function. | +| Function using non-constant shortcut property function | Tests that a non-constant FNML Function map also works | +| Function using non-constant shortcut property return | Tests that a non-constant FNML Return map also works | +| Function as equal join condition | Tests that functions can be used similar to R2RML (equal) join conditions | +| Function as other type of join condition | Tests that functions can be used for other types of join conditions (eg. string_contains or listContainsElement) | +| Function, parameter as array | Tests that list-style parameters are handled | +| Function, array_get | Tests that list-style of returned data values are handled correctly by FnO | + +## Table + +| new_id | title | purpose | data format | error expected? | input file 1 | +|:------:|:---------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------:|:-----------:|:---------------:|:-----------------:| +| 0000 | Function on object, 0 parameters | Tests (1) if a function without parameters can be used (FnO) (2) if a function on an object map can be used (Term) | CSV | FALSE | student.csv | +| 0000b | Function on object, 0 parameters (replaces 0000) | Tests (1) if a function without parameters can be used (FnO) (2) if a function on an object map can be used (Term) | CSV | FALSE | student.csv | +| 0000 | Function on object, default termType | Tests if the output of the function is assigned the correct termType by default | | | | +| 0001 | Function on object, 1 reference parameter | Tests: (1) if a function with one parameter can be used, (FnO) (2) a reference parameter can be used (Term) | CSV | FALSE | student.csv | +| 0001 | Function using non-constant shortcut property parameter | Tests that a non-constant FNML Parameter map also works | CSV | FALSE | student_param.csv | +| 0002 | Function on object, 1 false reference parameter | Tests if a false reference parameters is caught | CSV | TRUE | student.csv | +| 0003 | Function on object, 1 reference parameter, 1 constant parameter | Tests if a function with multiple parameters can be used | CSV | FALSE | student.csv | +| 0004 | Function on predicate, 1 parameter | Tests if a function can be used on a predicate | CSV | FALSE | student.csv | +| 0004b | Function on predicate, 1 parameter (replaces 0004) | Tests if a function can be used on a predicate | CSV | FALSE | student.csv | +| 0005 | Function on subject, 1 parameter | Tests if a function can be used on a subject | CSV | FALSE | student.csv | +| 0005 | Function on subject, default termType | Tests if the default termType assigned to the output of the function to be correct | | | | +| 0005b | Function on subject, default termType (replaces 0005) | Tests if the default termType assigned to the output of the function to be correct | | | | +| 0006 | Function on object, the output termType is IRI | Tests if the output of the function is assigned the correct termType | | | | +| 0006b | Function on object, the output termType is IRI (replaces 0006) | Tests if the output of the function is assigned the correct termType | | | | +| 0008 | Function on object, 1 template parameter | Tests if a function with a template parameter can be used | CSV | FALSE | student.csv | +| 0009 | Nested function - Test A | Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function) | CSV | FALSE | student.csv | +| 0010 | Function on object, specified return output | Tests if a specific return output can be used | CSV | TRUE | student.csv | diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/README.md new file mode 100644 index 00000000..625a34d4 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/README.md @@ -0,0 +1,59 @@ +## RMLFNMLTC0001-CSV + +**Title**: Function on object, 0 parameters + +**Description**: Tests +(1) if a function without parameters can be used (FnO) +(2) if a function on an object map can be used (Term) +(3) if the output of the function is assigned the correct termType by default + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut + ] + ] . + +<#Execution> + rml:function idlab-fn:random . + +``` + +**Output** +``` + "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl new file mode 100644 index 00000000..5a332b53 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl @@ -0,0 +1,30 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut + ] + ] . + +<#Execution> + rml:function idlab-fn:random . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/output.nq new file mode 100644 index 00000000..1ef0cd69 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/output.nq @@ -0,0 +1 @@ + "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/README.md new file mode 100644 index 00000000..6fee2cde --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/README.md @@ -0,0 +1,65 @@ +## RMLFNMLTC0002-CSV + +**Title**: Function on object, 1 reference parameter + +**Description**: Tests: +(1) if a function with one parameter can be used, (FnO) +(2) a reference parameter can be used (Term) + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . + +``` + +**Output** +``` + "VENUS" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl new file mode 100644 index 00000000..c789f59c --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl @@ -0,0 +1,37 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/output.nq new file mode 100644 index 00000000..b0369690 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/output.nq @@ -0,0 +1 @@ + "VENUS" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/README.md new file mode 100644 index 00000000..14526730 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/README.md @@ -0,0 +1,65 @@ +## RMLFNMLTC0003-CSV + +**Title**: Function on object, 1 reference parameter, the output termType is IRI + +**Description**: Tests if the output of the function is assigned the correct termType + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut ; + rml:termType rml:IRI + ]; + ] . + +<#Execution> + rml:function idlab-fn:toUpperCaseURL ; + rml:input + [ + rml:parameter idlab-fn:str ; + rml:inputValueMap [ + rml:reference "url" + ]; + ] . + +``` + +**Output** +``` + . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl new file mode 100644 index 00000000..ecd4845c --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl @@ -0,0 +1,39 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut ; + rml:termType rml:IRI + ]; + ] . + +<#Execution> + rml:function idlab-fn:toUpperCaseURL ; + rml:input + [ + rml:parameter idlab-fn:str ; + rml:inputValueMap [ + rml:reference "url" + ]; + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/output.nq new file mode 100644 index 00000000..5556ec5d --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/output.nq @@ -0,0 +1 @@ + . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/student.csv new file mode 100644 index 00000000..5c20b3cd --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/README.md new file mode 100644 index 00000000..8c70fae8 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/README.md @@ -0,0 +1,64 @@ +## RMLFNMLTC0004-CSV + +**Title**: Function on object, the output termType is Literal + +**Description**: Tests if the output of the function is assigned the correct termType + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:length ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" + ]; + ] . + +``` + +**Output** +``` + "5"^^ . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/mapping.ttl new file mode 100644 index 00000000..c17c9580 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/mapping.ttl @@ -0,0 +1,38 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:length ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" + ]; + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/output.nq new file mode 100644 index 00000000..a0fb12b8 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/output.nq @@ -0,0 +1 @@ + "5"^^ . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/student.csv new file mode 100644 index 00000000..5c20b3cd --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0004-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/README.md new file mode 100644 index 00000000..e82355d0 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/README.md @@ -0,0 +1,63 @@ +## RMLFNMLTC0005-CSV + +**Title**: Function on object, 1 template parameter + +**Description**: Tests if a function with a template parameter can be used + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:template "Name: {Name}" ; + ]; + ] . + +``` + +**Output** +``` + "NAME: VENUS" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl new file mode 100644 index 00000000..9126464c --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl @@ -0,0 +1,37 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:template "Name: {Name}" ; + ]; + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/output.nq new file mode 100644 index 00000000..9020be0f --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/output.nq @@ -0,0 +1 @@ + "NAME: VENUS" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/README.md new file mode 100644 index 00000000..5a62c8c9 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/README.md @@ -0,0 +1,69 @@ +## RMLFNMLTC0007-CSV + +**Title**: Function on object returns empty string + +**Description**: Tests that a triple is generated when the results is an empty string. + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:string_substring ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" + ]; + ] , + [ + a rml:Input ; + rml:parameter grel:p_int_i_from ; + rml:inputValue "5" + ] . + +``` + +**Output** +``` + "" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/mapping.ttl new file mode 100644 index 00000000..bac6b3e3 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/mapping.ttl @@ -0,0 +1,43 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:string_substring ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" + ]; + ] , + [ + a rml:Input ; + rml:parameter grel:p_int_i_from ; + rml:inputValue "5" + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/output.nq new file mode 100644 index 00000000..6629e021 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/output.nq @@ -0,0 +1 @@ + "" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0007-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/README.md new file mode 100644 index 00000000..28181b3e --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/README.md @@ -0,0 +1,68 @@ +## RMLFNMLTC0008-CSV + +**Title**: Function on object returns null + +**Description**: Tests that no triple should be generated when the result is null. + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:string_substring ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" + ]; + ] , + [ + a rml:Input ; + rml:parameter grel:p_int_i_from ; + rml:inputValue "1000" + ] . + +``` + +**Output** +``` + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/mapping.ttl new file mode 100644 index 00000000..b21a92f7 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/mapping.ttl @@ -0,0 +1,43 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:string_substring ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" + ]; + ] , + [ + a rml:Input ; + rml:parameter grel:p_int_i_from ; + rml:inputValue "1000" + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/output.nq new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0008-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/README.md new file mode 100644 index 00000000..bd597668 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/README.md @@ -0,0 +1,64 @@ +## RMLFNMLTC0011-CSV + +**Title**: Function on predicate, 1 parameter + +**Description**: Tests if a function can be used on a predicate + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicateMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut + ]; + rml:object foaf:name; + ] . + +<#Execution> + rml:function idlab-fn:toUpperCaseURL ; + rml:input + [ + rml:parameter idlab-fn:str ; + rml:inputValueMap [ + rml:reference "Name" + ]; + ] . + +``` + +**Output** +``` + . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl new file mode 100644 index 00000000..14959d45 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl @@ -0,0 +1,38 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicateMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut + ]; + rml:object foaf:name; + ] . + +<#Execution> + rml:function idlab-fn:toUpperCaseURL ; + rml:input + [ + rml:parameter idlab-fn:str ; + rml:inputValueMap [ + rml:reference "Name" + ]; + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/output.nq new file mode 100644 index 00000000..4aa4759e --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/output.nq @@ -0,0 +1 @@ + . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/README.md new file mode 100644 index 00000000..044f5c62 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/README.md @@ -0,0 +1,67 @@ +## RMLFNMLTC0021-CSV + +**Title**: Function on object, 1 reference parameter, 1 constant parameter + +**Description**: Tests if a function with multiple parameters can be used + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:escape ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Comment" + ] + ] , + [ + rml:parameter grel:modeParam ; + rml:inputValue "html" + ] . + +``` + +**Output** +``` + "A&B" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl new file mode 100644 index 00000000..3109d708 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl @@ -0,0 +1,41 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:escape ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Comment" + ] + ] , + [ + rml:parameter grel:modeParam ; + rml:inputValue "html" + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/output.nq new file mode 100644 index 00000000..af03220c --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/output.nq @@ -0,0 +1 @@ + "A&B" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/README.md new file mode 100644 index 00000000..a146e871 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/README.md @@ -0,0 +1,64 @@ +## RMLFNMLTC0031-CSV + +**Title**: Function on subject, 1 parameter + +**Description**: Tests if +(1) a function can be used on a subject +(2) Tests if the default termType assigned to the output of the function to be correct + +**Error expected?** No + +**Input** +``` +Id,Name,url +1,Venus,www.example.com + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ rml:reference "Name"] + ] . + +<#Execution> + rml:function idlab-fn:toUpperCaseURL ; + rml:input + [ + rml:parameter idlab-fn:str ; + rml:inputValueMap [ + rml:reference "url" + ]; + ] . + +``` + +**Output** +``` + "Venus" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl new file mode 100644 index 00000000..dc069b98 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl @@ -0,0 +1,36 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ rml:reference "Name"] + ] . + +<#Execution> + rml:function idlab-fn:toUpperCaseURL ; + rml:input + [ + rml:parameter idlab-fn:str ; + rml:inputValueMap [ + rml:reference "url" + ]; + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/output.nq new file mode 100644 index 00000000..80493637 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/output.nq @@ -0,0 +1 @@ + "Venus" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/student.csv new file mode 100644 index 00000000..c33048c8 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,url +1,Venus,www.example.com diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/README.md new file mode 100644 index 00000000..e3fa3297 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/README.md @@ -0,0 +1,65 @@ +## RMLFNMLTC0041-CSV + +**Title**: Function using non-constant shortcut property return + +**Description**: Tests that a non-constant FNML Return map also works + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:returnMap [ + rml:constant grel:stringOut + ] + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . + +``` + +**Output** +``` + "example.com" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl new file mode 100644 index 00000000..99b26995 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl @@ -0,0 +1,39 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:returnMap [ + rml:constant grel:stringOut + ] + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/output.nq new file mode 100644 index 00000000..3c0e8a74 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/output.nq @@ -0,0 +1 @@ + "example.com" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/student.csv new file mode 100644 index 00000000..5c20b3cd --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/README.md new file mode 100644 index 00000000..510edf15 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/README.md @@ -0,0 +1,88 @@ +## RMLFNMLTC0051-CSV + +**Title**: Nested function - Test A + +**Description**: Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function) + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,M Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + +<#Person_Mapping> + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap <#NameMapping> . + +<#NameMapping> + rml:predicate foaf:name ; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ]; . + +<#Execution> a rml:FunctionExecution ; + rml:function grel:toUpperCase ; + rml:input + [ + a rml:Input ; + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:functionExecution <#Execution2> ; + rml:return grel:stringOut + ] + ] . + +<#Execution2> a rml:Execution ; + rml:function grel:string_replace ; + rml:input + [ + a rml:Input ; + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" + ] + ] , + [ + a rml:Input ; + rml:parameter grel:param_find ; + rml:inputValue " " + ] , + [ + a rml:Input ; + rml:parameter grel:param_replace ; + rml:inputValue "-" + ] . + +``` + +**Output** +``` + "M-VENUS" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl new file mode 100644 index 00000000..23d0cf4f --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl @@ -0,0 +1,62 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + +<#Person_Mapping> + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap <#NameMapping> . + +<#NameMapping> + rml:predicate foaf:name ; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ]; . + +<#Execution> a rml:FunctionExecution ; + rml:function grel:toUpperCase ; + rml:input + [ + a rml:Input ; + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:functionExecution <#Execution2> ; + rml:return grel:stringOut + ] + ] . + +<#Execution2> a rml:Execution ; + rml:function grel:string_replace ; + rml:input + [ + a rml:Input ; + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" + ] + ] , + [ + a rml:Input ; + rml:parameter grel:param_find ; + rml:inputValue " " + ] , + [ + a rml:Input ; + rml:parameter grel:param_replace ; + rml:inputValue "-" + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/output.nq new file mode 100644 index 00000000..c8e15963 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/output.nq @@ -0,0 +1 @@ + "M-VENUS" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/student.csv new file mode 100644 index 00000000..e5f249e9 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,M Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/README.md new file mode 100644 index 00000000..d1011901 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/README.md @@ -0,0 +1,69 @@ +## RMLFNMLTC0061-CSV + +**Title**: Function on graph, 1 parameter + +**Description**: Tests if a function can be used on a graph + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" ; + rml:graphMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut + + ] + ]; + + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:reference "Name" + ] + ] . + +<#Execution> + rml:function idlab-fn:toUpperCaseURL ; + rml:input + [ + rml:parameter idlab-fn:str ; + rml:inputValueMap [ + rml:reference "url" ; + ] + ] . + +``` + +**Output** +``` + "Venus" . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/mapping.ttl new file mode 100644 index 00000000..7927ea4a --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/mapping.ttl @@ -0,0 +1,43 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" ; + rml:graphMap [ + rml:functionExecution <#Execution> ; + rml:return idlab-fn:_stringOut + + ] + ]; + + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:reference "Name" + ] + ] . + +<#Execution> + rml:function idlab-fn:toUpperCaseURL ; + rml:input + [ + rml:parameter idlab-fn:str ; + rml:inputValueMap [ + rml:reference "url" ; + ] + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/output.nq new file mode 100644 index 00000000..47140dcf --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/output.nq @@ -0,0 +1 @@ + "Venus" . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/student.csv new file mode 100644 index 00000000..5c20b3cd --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0061-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/README.md new file mode 100644 index 00000000..1922b26f --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/README.md @@ -0,0 +1,58 @@ +## RMLFNMLTC0101-CSV + +**Title**: Function on object, 1 false reference parameter + +**Description**: Tests if a false reference parameters is caught + +**Error expected?** Yes + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "name" ; + ] + ] . + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl new file mode 100644 index 00000000..43dbe427 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl @@ -0,0 +1,38 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . +@prefix idlab-fn: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "name" ; + ] + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/README.md new file mode 100644 index 00000000..f9c01cc5 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/README.md @@ -0,0 +1,62 @@ +## RMLFNMLTC0102-CSV + +**Title**: Function on object, wrong function URI + +**Description**: Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class +1,Venus,A&B,A + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:unknown_func ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . + +``` + +**Output** +``` + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/mapping.ttl new file mode 100644 index 00000000..a5978b6c --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/mapping.ttl @@ -0,0 +1,37 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:unknown_func ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/output.nq new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/student.csv new file mode 100644 index 00000000..052b9915 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0102-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class +1,Venus,A&B,A diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/README.md new file mode 100644 index 00000000..bfe7dd0b --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/README.md @@ -0,0 +1,62 @@ +## RMLFNMLTC0103-CSV + +**Title**: Function on object, wrong parameter + +**Description**: Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:unknownParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . + +``` + +**Output** +``` + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/mapping.ttl new file mode 100644 index 00000000..96cca0c4 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/mapping.ttl @@ -0,0 +1,37 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:stringOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:unknownParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/output.nq new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/student.csv new file mode 100644 index 00000000..5c20b3cd --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0103-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/README.md new file mode 100644 index 00000000..8a02a345 --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/README.md @@ -0,0 +1,62 @@ +## RMLFNMLTC0104-CSV + +**Title**: Function on object, wrong return parameter + +**Description**: Tests that nothing is generated if a function is defined using a return not defined in the FnO description + +**Error expected?** No + +**Input** +``` +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:unknownOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . + +``` + +**Output** +``` + +``` + diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/mapping.ttl new file mode 100644 index 00000000..dd6c647f --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/mapping.ttl @@ -0,0 +1,37 @@ +@prefix foaf: . +@prefix ex: . +@prefix xsd: . +@prefix rml: . +@prefix fno: . +@prefix grel: . + +@base . + + + rml:logicalSource [ + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.csv" + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example.com/{Name}" + ]; + rml:predicateObjectMap [ + rml:predicate foaf:name; + rml:objectMap [ + rml:functionExecution <#Execution> ; + rml:return grel:unknownOut + ] + ] . + +<#Execution> + rml:function grel:toUpperCase ; + rml:input + [ + rml:parameter grel:valueParam ; + rml:inputValueMap [ + rml:reference "Name" ; + ] + ] . diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/output.nq new file mode 100644 index 00000000..e69de29b diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/student.csv new file mode 100644 index 00000000..5c20b3cd --- /dev/null +++ b/src/test/resources/rml-fnml/RMLFNMLTC0104-CSV/student.csv @@ -0,0 +1,2 @@ +Id,Name,Comment,Class,url +1,Venus,A&B,A,http://example.com/venus diff --git a/src/test/resources/rml-fnml/config.js b/src/test/resources/rml-fnml/config.js new file mode 100644 index 00000000..baeb3281 --- /dev/null +++ b/src/test/resources/rml-fnml/config.js @@ -0,0 +1,72 @@ +async function loadTurtle() { + //this is the function you call in 'preProcess', to load the highlighter + const worker = await new Promise(resolve => { + require(["core/worker"], ({ worker }) => resolve(worker)); + }); + const action = "highlight-load-lang"; + const langURL = + "https://cdn.jsdelivr.net/gh/redmer/highlightjs-turtle/src/languages/turtle.js"; + const propName = "hljsDefineTurtle"; // This funtion is defined in the highlighter being loaded + const lang = "turtle"; // this is the class you use to identify the language + worker.postMessage({ action, langURL, propName, lang }); + return new Promise(resolve => { + worker.addEventListener("message", function listener({ data }) { + const { action: responseAction, lang: responseLang } = data; + if (responseAction === action && responseLang === lang) { + worker.removeEventListener("message", listener); + resolve(); + } + }); + }); +} + +var respecConfig = { + // check https://respec.org/docs/ for the meaning of these keys + preProcess: [loadTurtle], + authors: [ + { + name: "Dylan Van Assche", + url: "https://dylanvanassche.be", + company: "IDLab – Ghent University – imec", + orcid: "0000-0002-7195-9935", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + edDraftURI: "https://w3id.org/rml/fnml/test-cases/", + editors: [ + { + name: "Dylan Van Assche", + url: "https://dylanvanassche.be", + company: "IDLab – Ghent University – imec", + orcid: "0000-0002-7195-9935", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + formerEditors: [ + ], + github: "https://github.com/kg-construct/rml-fnml", + license: "w3c-software-doc", + localBiblio: { + "RML-Core": { + title: "RML-Core", + href: "https://w3id.org/rml/core/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "07 August 2024", + }, + "RML-IO": { + title: "RML-IO", + href: "https://w3id.org/rml/io/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "12 March 2024", + }, + }, + otherLinks: [], + shortName: "RML-FNML-Testcases", + specStatus: "CG-DRAFT", + // W3C config + copyrightStart: "2024", + doJsonLd: true, + group: "kg-construct", +}; diff --git a/src/test/resources/rml-fnml/descriptions.csv b/src/test/resources/rml-fnml/descriptions.csv new file mode 100644 index 00000000..0b67120c --- /dev/null +++ b/src/test/resources/rml-fnml/descriptions.csv @@ -0,0 +1,25 @@ +ID,title,description,part of spec,data format,ref. formulation,error expected?,input file 1,input file 2,input file 3,comment +RMLFNMLTC0001-CSV,"Function on object, 0 parameters","Tests +(1) if a function without parameters can be used (FnO) +(2) if a function on an object map can be used (Term) +(3) if the output of the function is assigned the correct termType by default",,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0002-CSV,"Function on object, 1 reference parameter","Tests: +(1) if a function with one parameter can be used, (FnO) +(2) a reference parameter can be used (Term)",,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0003-CSV,"Function on object, 1 reference parameter, the output termType is IRI",Tests if the output of the function is assigned the correct termType,,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0004-CSV,"Function on object, the output termType is Literal",Tests if the output of the function is assigned the correct termType,,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0005-CSV,"Function on object, 1 template parameter",Tests if a function with a template parameter can be used,,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0007-CSV,Function on object returns empty string,Tests that a triple is generated when the results is an empty string.,,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0008-CSV,Function on object returns null,Tests that no triple should be generated when the result is null.,,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0011-CSV,"Function on predicate, 1 parameter",Tests if a function can be used on a predicate,,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0021-CSV,"Function on object, 1 reference parameter, 1 constant parameter",Tests if a function with multiple parameters can be used,,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0031-CSV,"Function on subject, 1 parameter","Tests if +(1) a function can be used on a subject +(2) Tests if the default termType assigned to the output of the function to be correct",,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0041-CSV,Function using non-constant shortcut property return,Tests that a non-constant FNML Return map also works,,CSV,CSV,FALSE,student.csv,,,"does this can be tested with SHACL? If yes, I think this wouldn't be a test-case" +RMLFNMLTC0051-CSV,Nested function - Test A,"Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)",,CSV,CSV,FALSE,student.csv,,, +RMLFNMLTC0061-CSV,"Function on graph, 1 parameter",Tests if a function can be used on a graph,,CSV,CSV,FALSE,student.csv,,,RML example: https://kg-construct.github.io/rml-core/spec/docs/#example-graph-map +RMLFNMLTC0101-CSV,"Function on object, 1 false reference parameter",Tests if a false reference parameters is caught,,CSV,CSV,TRUE,student.csv,,, +RMLFNMLTC0102-CSV,"Function on object, wrong function URI",Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine,,CSV,CSV,TRUE,student.csv,,, +RMLFNMLTC0103-CSV,"Function on object, wrong parameter",Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description,,CSV,CSV,TRUE,student.csv,,, +RMLFNMLTC0104-CSV,"Function on object, wrong return parameter",Tests that nothing is generated if a function is defined using a return not defined in the FnO description,,CSV,CSV,TRUE,student.csv,,, \ No newline at end of file diff --git a/src/test/resources/rml-fnml/dev.html b/src/test/resources/rml-fnml/dev.html new file mode 100644 index 00000000..e1391e96 --- /dev/null +++ b/src/test/resources/rml-fnml/dev.html @@ -0,0 +1,117 @@ + + + + + RML-FNML: Test Cases + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/src/test/resources/rml-fnml/docs/20250130/index.html b/src/test/resources/rml-fnml/docs/20250130/index.html new file mode 100644 index 00000000..f66c763f --- /dev/null +++ b/src/test/resources/rml-fnml/docs/20250130/index.html @@ -0,0 +1,1325 @@ + + + + + + +RML-FNML: Test Cases + + + + + + + + + + + + + + +
+ +

RML-FNML: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-FNML-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/fnml/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-fnml + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-FNML test cases to the determine the RML-FNML specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-FNML test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-FNML specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-FNML test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLFNOTC0000b-CSV

+

Title: Function on object, default termType

+

Description: Tests if the output of the function is assigned the correct termType by default

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix fns: <http://example.com/functions/> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function fns:helloworld .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Hello World!" .
+
+
+

5. RMLFNOTC0000-CSV

+

Title: Function on object, 0 parameters

+

Description: Tests +(1) if a function without parameters can be used (FnO) +(2) if a function on an object map can be used (Term)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function morph-kgc:uuid .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" .
+
+
+

6. RMLFNOTC0001-CSV

+

Title: Function on object, 1 reference parameter

+

Description: Tests: +(1) if a function with one parameter can be used, (FnO) +(2) a reference parameter can be used (Term)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "VENUS" .
+
+
+

7. RMLFNOTC0002-CSV

+

Title: Function using non-constant shortcut property parameter

+

Description: Tests that a non-constant FNML Parameter map also works

+

Error expected? Yes

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "name" ;
+            ]
+        ] .
+
+
+

8. RMLFNOTC0003-CSV

+

Title: Function on object, 1 false reference parameter

+

Description: Tests if a false reference parameters is caught

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:escape ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Comment"
+            ]
+        ] ,
+        [
+            rml:parameter grel:modeParam  ;
+            rml:inputValue "html"
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "A&B" .
+
+
+

9. RMLFNOTC0004b-CSV

+

Title: Function on predicate, 1 parameter

+

Description: Tests if a function can be used on a predicate

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix fns: <http://example.com/functions/> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicateMap [
+            rml:functionExecution <#Execution> ;
+        ];
+        rml:object foaf:name;
+    ] .
+
+<#Execution>
+    rml:function fns:schema ;
+    rml:input
+        [
+            rml:parameter fns:stringParameter ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <https://schema.org/Venus> <http://xmlns.com/foaf/0.1/name> .
+
+
+

10. RMLFNOTC0004-CSV

+

Title: Function on object, 1 reference parameter, 1 constant parameter

+

Description: Tests if a function with multiple parameters can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicateMap [
+            rml:functionExecution <#Execution> ;
+        ];
+        rml:object foaf:name;
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://VENUS> <http://xmlns.com/foaf/0.1/name> .
+
+
+

11. RMLFNOTC0005b-CSV

+

Title: Function on subject, default termType

+

Description: Tests if the default termType assigned to the output of the function to be correct

+

Error expected? No

+

Input

+
Id,Name,url
+1,Venus,www.example.com
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix fns: <http://example.com/functions/> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:functionExecution <#Execution> ;
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [ rml:reference "Name"]
+    ] .
+
+<#Execution>
+    rml:function fns:schema ;
+    rml:input
+        [
+            rml:parameter fns:stringParameter ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
+
+

Output

+
<https://schema.org/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

12. RMLFNOTC0005-CSV

+

Title: Function on subject, 1 parameter

+

Description: Tests if a function can be used on a subject

+

Error expected? No

+

Input

+
Id,Name,url
+1,Venus,www.example.com
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:functionExecution <#Execution> ;
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [ rml:reference "Name"]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://WWW.EXAMPLE.COM> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

13. RMLFNOTC0006b-CSV

+

Title: Function on object, 1 template parameter

+

Description: Tests if a function with a template parameter can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix fns: <http://example.com/functions/> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:termType rml:IRI
+        ];
+    ] .
+
+<#Execution>
+    rml:function fns:schema ;
+    rml:input
+        [
+            rml:parameter fns:stringParameter ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <https://schema.org/Venus> .
+
+
+

14. RMLFNOTC0006-CSV

+

Title: Function on object, the output termType is IRI

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:termType rml:IRI
+        ];
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

15. RMLFNOTC0008-CSV

+

Title: Nested function - Test A

+

Description: Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [ rml:functionExecution <#Execution> ] ;
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:template "Name: {Name}"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "NAME: VENUS" .
+
+
+

16. RMLFNOTC0009-CSV

+

Title: Function on object, 1 constant parameter

+

Description: Tests if a constant parameter can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,M Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<#Person_Mapping>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap <#NameMapping> .
+
+<#NameMapping>
+    rml:predicate foaf:name ;
+    rml:objectMap [
+        rml:functionExecution <#Execution> ;
+    ]; .
+
+<#Execution> a rml:FunctionExecution ;
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:functionExecution <#Execution2> ;
+                rml:return grel:stringOut
+            ]
+        ] .
+
+<#Execution2> a rml:Execution ;
+    rml:function grel:string_replace ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ]
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_find ;
+            rml:inputValue " "
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_replace  ;
+            rml:inputValue "-"
+        ] .
+
+

Output

+
<http://example.com/M%20Venus> <http://xmlns.com/foaf/0.1/name> "M-VENUS" .
+
+
+

17. RMLFNOTC0010-CSV

+

Title: Function on object, wrong type parameter

+

Description: Tests a function with a wrong type parameter cannot be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix fns: <http://example.com/functions/> .
+@prefix morph-kgc: <https://github.com/morph-kgc/morph-kgc/function/built-in.ttl#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <http://example.com/idlab/function/> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:returnMap [
+                rml:constant fns:domainOutput
+            ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function fns:parseURL ;
+    rml:input
+        [
+            rml:parameter fns:stringParameter ;
+            rml:inputValueMap [
+                rml:reference "url" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "example.com" .
+
+
+ + + + + diff --git a/src/test/resources/rml-fnml/docs/20250303/index.html b/src/test/resources/rml-fnml/docs/20250303/index.html new file mode 100644 index 00000000..c5504b93 --- /dev/null +++ b/src/test/resources/rml-fnml/docs/20250303/index.html @@ -0,0 +1,1496 @@ + + + + + + +RML-FNML: Test Cases + + + + + + + + + + + + + + +
+ +

RML-FNML: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-FNML-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/fnml/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-fnml + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-FNML test cases to the determine the RML-FNML specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-FNML test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-FNML specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-FNML test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLFNMLTC0001-CSV

+

Title: Function on object, 0 parameters

+

Description: Tests +(1) if a function without parameters can be used (FnO) +(2) if a function on an object map can be used (Term) +(3) if the output of the function is assigned the correct termType by default

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:random .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" .
+
+
+

5. RMLFNMLTC0002-CSV

+

Title: Function on object, 1 reference parameter

+

Description: Tests: +(1) if a function with one parameter can be used, (FnO) +(2) a reference parameter can be used (Term)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "VENUS" .
+
+
+

6. RMLFNMLTC0003-CSV

+

Title: Function on object, 1 reference parameter, the output termType is IRI

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut ;
+            rml:termType rml:IRI
+        ];
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

7. RMLFNMLTC0004-CSV

+

Title: Function on object, the output termType is Literal

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:length ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "5"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLFNMLTC0005-CSV

+

Title: Function on object, 1 template parameter

+

Description: Tests if a function with a template parameter can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:template "Name: {Name}" ;
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "NAME: VENUS" .
+
+
+

9. RMLFNMLTC0007-CSV

+

Title: Function on object returns empty string

+

Description: Tests that a triple is generated when the results is an empty string.

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "5"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "" .
+
+
+

10. RMLFNMLTC0008-CSV

+

Title: Function on object returns null

+

Description: Tests that no triple should be generated when the result is null.

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "1000"
+        ]  .
+
+

Output

+

+
+
+

11. RMLFNMLTC0011-CSV

+

Title: Function on predicate, 1 parameter

+

Description: Tests if a function can be used on a predicate

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicateMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ];
+        rml:object foaf:name;
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://VENUS> <http://xmlns.com/foaf/0.1/name> .
+
+
+

12. RMLFNMLTC0021-CSV

+

Title: Function on object, 1 reference parameter, 1 constant parameter

+

Description: Tests if a function with multiple parameters can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:escape ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Comment"
+            ]
+        ] ,
+        [
+            rml:parameter grel:modeParam  ;
+            rml:inputValue "html"
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "A&B" .
+
+
+

13. RMLFNMLTC0031-CSV

+

Title: Function on subject, 1 parameter

+

Description: Tests if +(1) a function can be used on a subject +(2) Tests if the default termType assigned to the output of the function to be correct

+

Error expected? No

+

Input

+
Id,Name,url
+1,Venus,www.example.com
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return idlab-fn:_stringOut
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [ rml:reference "Name"]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://WWW.EXAMPLE.COM> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

14. RMLFNMLTC0041-CSV

+

Title: Function using non-constant shortcut property return

+

Description: Tests that a non-constant FNML Return map also works

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:returnMap [
+                rml:constant grel:stringOut
+            ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "example.com" .
+
+
+

15. RMLFNMLTC0051-CSV

+

Title: Nested function - Test A

+

Description: Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,M Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<#Person_Mapping>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap <#NameMapping> .
+
+<#NameMapping>
+    rml:predicate foaf:name ;
+    rml:objectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return grel:stringOut
+    ]; .
+
+<#Execution> a rml:FunctionExecution ;
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:functionExecution <#Execution2> ;
+                rml:return grel:stringOut
+            ]
+        ] .
+
+<#Execution2> a rml:Execution ;
+    rml:function grel:string_replace ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ]
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_find ;
+            rml:inputValue " "
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_replace  ;
+            rml:inputValue "-"
+        ] .
+
+

Output

+
<http://example.com/M%20Venus> <http://xmlns.com/foaf/0.1/name> "M-VENUS" .
+
+
+

16. RMLFNMLTC0061-CSV

+

Title: Function on graph, 1 parameter

+

Description: Tests if a function can be used on a graph

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}" ;
+        rml:graphMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+            
+        ]
+    ];
+
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:reference "Name"
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

17. RMLFNMLTC0101-CSV

+

Title: Function on object, 1 false reference parameter

+

Description: Tests if a false reference parameters is caught

+

Error expected? Yes

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "name" ;
+            ]
+        ] .
+
+
+

18. RMLFNMLTC0102-CSV

+

Title: Function on object, wrong function URI

+

Description: Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:unknown_func ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+

19. RMLFNMLTC0103-CSV

+

Title: Function on object, wrong parameter

+

Description: Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:unknownParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+

20. RMLFNMLTC0104-CSV

+

Title: Function on object, wrong return parameter

+

Description: Tests that nothing is generated if a function is defined using a return not defined in the FnO description

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:unknownOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-fnml/docs/index.html b/src/test/resources/rml-fnml/docs/index.html new file mode 100644 index 00000000..c5504b93 --- /dev/null +++ b/src/test/resources/rml-fnml/docs/index.html @@ -0,0 +1,1496 @@ + + + + + + +RML-FNML: Test Cases + + + + + + + + + + + + + + +
+ +

RML-FNML: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-FNML-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/fnml/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-fnml + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-FNML test cases to the determine the RML-FNML specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-FNML test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-FNML specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-FNML test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLFNMLTC0001-CSV

+

Title: Function on object, 0 parameters

+

Description: Tests +(1) if a function without parameters can be used (FnO) +(2) if a function on an object map can be used (Term) +(3) if the output of the function is assigned the correct termType by default

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:random .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" .
+
+
+

5. RMLFNMLTC0002-CSV

+

Title: Function on object, 1 reference parameter

+

Description: Tests: +(1) if a function with one parameter can be used, (FnO) +(2) a reference parameter can be used (Term)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "VENUS" .
+
+
+

6. RMLFNMLTC0003-CSV

+

Title: Function on object, 1 reference parameter, the output termType is IRI

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut ;
+            rml:termType rml:IRI
+        ];
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

7. RMLFNMLTC0004-CSV

+

Title: Function on object, the output termType is Literal

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:length ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "5"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLFNMLTC0005-CSV

+

Title: Function on object, 1 template parameter

+

Description: Tests if a function with a template parameter can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:template "Name: {Name}" ;
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "NAME: VENUS" .
+
+
+

9. RMLFNMLTC0007-CSV

+

Title: Function on object returns empty string

+

Description: Tests that a triple is generated when the results is an empty string.

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "5"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "" .
+
+
+

10. RMLFNMLTC0008-CSV

+

Title: Function on object returns null

+

Description: Tests that no triple should be generated when the result is null.

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "1000"
+        ]  .
+
+

Output

+

+
+
+

11. RMLFNMLTC0011-CSV

+

Title: Function on predicate, 1 parameter

+

Description: Tests if a function can be used on a predicate

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicateMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ];
+        rml:object foaf:name;
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://VENUS> <http://xmlns.com/foaf/0.1/name> .
+
+
+

12. RMLFNMLTC0021-CSV

+

Title: Function on object, 1 reference parameter, 1 constant parameter

+

Description: Tests if a function with multiple parameters can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:escape ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Comment"
+            ]
+        ] ,
+        [
+            rml:parameter grel:modeParam  ;
+            rml:inputValue "html"
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "A&B" .
+
+
+

13. RMLFNMLTC0031-CSV

+

Title: Function on subject, 1 parameter

+

Description: Tests if +(1) a function can be used on a subject +(2) Tests if the default termType assigned to the output of the function to be correct

+

Error expected? No

+

Input

+
Id,Name,url
+1,Venus,www.example.com
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return idlab-fn:_stringOut
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [ rml:reference "Name"]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://WWW.EXAMPLE.COM> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

14. RMLFNMLTC0041-CSV

+

Title: Function using non-constant shortcut property return

+

Description: Tests that a non-constant FNML Return map also works

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:returnMap [
+                rml:constant grel:stringOut
+            ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "example.com" .
+
+
+

15. RMLFNMLTC0051-CSV

+

Title: Nested function - Test A

+

Description: Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,M Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<#Person_Mapping>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap <#NameMapping> .
+
+<#NameMapping>
+    rml:predicate foaf:name ;
+    rml:objectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return grel:stringOut
+    ]; .
+
+<#Execution> a rml:FunctionExecution ;
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:functionExecution <#Execution2> ;
+                rml:return grel:stringOut
+            ]
+        ] .
+
+<#Execution2> a rml:Execution ;
+    rml:function grel:string_replace ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ]
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_find ;
+            rml:inputValue " "
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_replace  ;
+            rml:inputValue "-"
+        ] .
+
+

Output

+
<http://example.com/M%20Venus> <http://xmlns.com/foaf/0.1/name> "M-VENUS" .
+
+
+

16. RMLFNMLTC0061-CSV

+

Title: Function on graph, 1 parameter

+

Description: Tests if a function can be used on a graph

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}" ;
+        rml:graphMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+            
+        ]
+    ];
+
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:reference "Name"
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

17. RMLFNMLTC0101-CSV

+

Title: Function on object, 1 false reference parameter

+

Description: Tests if a false reference parameters is caught

+

Error expected? Yes

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "name" ;
+            ]
+        ] .
+
+
+

18. RMLFNMLTC0102-CSV

+

Title: Function on object, wrong function URI

+

Description: Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:unknown_func ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+

19. RMLFNMLTC0103-CSV

+

Title: Function on object, wrong parameter

+

Description: Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:unknownParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+

20. RMLFNMLTC0104-CSV

+

Title: Function on object, wrong return parameter

+

Description: Tests that nothing is generated if a function is defined using a return not defined in the FnO description

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:unknownOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-fnml/functions.ttl b/src/test/resources/rml-fnml/functions.ttl new file mode 100644 index 00000000..d3ddd8bb --- /dev/null +++ b/src/test/resources/rml-fnml/functions.ttl @@ -0,0 +1,102 @@ +@prefix dcterms: . +@prefix fno: . +@prefix fns: . +@prefix grel: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + +grel:toUpperCase + a fno:Function ; + fno:name "to Uppercase" ; + rdfs:label "to Uppercase" ; + dcterms:description "Returns the input with all letters in upper case." ; + fno:expects ( grel:valueParam ) ; + fno:returns ( grel:stringOut ) . + +grel:valueParam + a fno:Parameter ; + fno:name "input value" ; + rdfs:label "input value" ; + fno:predicate grel:valueParameter ; + fno:type xsd:string ; + fno:required "true"^^xsd:boolean . + +grel:stringOut + a fno:Output ; + fno:name "output string" ; + rdfs:label "output string" ; + fno:predicate grel:stringOutput ; + fno:type xsd:string . + +grel:string_replace + a fno:Function ; + fno:name "replace" ; + dcterms:description "replace" ; + fno:expects ( grel:valueParam grel:param_find grel:param_replace ) ; + fno:returns ( grel:stringOut ) . + +grel:param_find + a fno:Parameter ; + fno:name "f" ; + rdfs:label "f" ; + fno:predicate grel:p_string_find ; + fno:type xsd:string ; + fno:required "true"^^xsd:boolean . + +grel:param_replace + a fno:Parameter ; + fno:name "r" ; + rdfs:label "r" ; + fno:predicate grel:p_string_replace ; + fno:type xsd:string ; + fno:required "true"^^xsd:boolean . + +fns:helloworld + a fno:Function ; + fno:name "hello world" ; + dcterms:description "The hello world function has no parameters and always returns the string 'Hello World!'" ; + fno:expects ( ) ; + fno:returns ( fns:stringOutput ) . + +fns:stringOutput + a fno:Output ; + fno:name "output string" ; + rdfs:label "output string" ; + fno:predicate fns:hasStringOutput ; + fno:type xsd:string . + +fns:schema + a fno:Function ; + fno:name "schema term generator" ; + dcterms:description "The schema term generator function returns a string of the form 'https://schema.org/{stringParameter}'" ; + fno:expects ( fns:stringParameter ) ; + fno:returns ( fns:stringOutput ) . + +fns:stringParameter + a fno:Parameter ; + fno:name "input string" ; + rdfs:label "input string" ; + fno:predicate fns:hasStringParameter ; + fno:type xsd:string . + +fns:parseURL + a fno:Function ; + fno:name "parse URL" ; + dcterms:description "The parse URL function returns the protocol, domain, and path as strings of a URL of the form '{protocolOutput}://{domainOutput}/{stringOutput}'" ; + fno:expects ( fns:stringParameter ) ; + fno:returns ( fns:protocolOutput fns:domainOutput fns:stringOutput ) . + +fns:protocolOutput + a fno:Output ; + fno:name "protocol output string" ; + rdfs:label "protocol output string" ; + fno:predicate fns:hasProtocolOutput ; + fno:type xsd:string . + +fns:domainOutput + a fno:Output ; + fno:name "domain output string" ; + rdfs:label "domain output string" ; + fno:predicate fns:hasDomainOutput ; + fno:type xsd:string . diff --git a/src/test/resources/rml-fnml/list.sh b/src/test/resources/rml-fnml/list.sh new file mode 100644 index 00000000..12c32031 --- /dev/null +++ b/src/test/resources/rml-fnml/list.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for i in RML*; do + echo "
" +done diff --git a/src/test/resources/rml-fnml/make-metadata.py b/src/test/resources/rml-fnml/make-metadata.py new file mode 100644 index 00000000..823918dd --- /dev/null +++ b/src/test/resources/rml-fnml/make-metadata.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python3 + +import os +import sys +import glob +import csv + +def get_title_description(testcase: str): + with open ('descriptions.csv') as csvfile: + reader = csv.reader(csvfile) + for row in reader: + if row[0] == testcase: + return row[1], row[2] + +def main(spec: str): + with open ('metadata.csv', 'w') as csvfile: + writer = csv.writer(csvfile) + writer.writerow(['ID', 'title', 'description', 'specification', + 'mapping', 'input_format1', 'input_format2', + 'input_format3', 'output_format1', 'output_format2', + 'output_format3', 'input1', 'input2', 'input3', + 'output1', 'output2', 'output3', 'error']) + for testcase in glob.glob('RML*'): + print(testcase) + title, description = get_title_description(testcase) + error = 'false' + input1 = '' + input2 = '' + input3 = '' + input_format1 = '' + input_format2 = '' + input_format3 = '' + output1 = '' + output2 = '' + output3 = '' + output_format1 = '' + output_format2 = '' + output_format3 = '' + + # Input file + if os.path.exists(os.path.join(testcase, 'student.csv')): + input1 = 'student.csv' + input_format1 = 'text/csv' + + # Mapping file + if os.path.exists(os.path.join(testcase, 'mapping.ttl')): + mapping_file = 'mapping.ttl' + else: + raise ValueError('Mapping file missing!') + + # Output files + if os.path.exists(os.path.join(testcase, 'default.nq')): + output1 = 'default.nq' + output_format1 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'output.nq')): + output1 = 'output.nq' + output_format1 = 'application/n-quads' + else: + error = 'true' + + writer.writerow([testcase, title, description, spec, mapping_file, + input_format1, input_format2, input_format3, + output_format1, output_format2, output_format3, + input1, input2, input3, output1, output2, + output3, error]) + lines = [] + # Title and description + lines.append(f'## {testcase}\n\n') + lines.append(f'**Title**: {title}\n\n') + lines.append(f'**Description**: {description}\n\n') + if error == 'true': + error_html = 'Yes' + else: + error_html = 'No' + lines.append(f'**Error expected?** {error_html}\n\n') + + # Input + inputCount = '' + + for index, i in enumerate([input1, input2, input3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + input_html = f'**Input{inputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + input_html = f'**Input{inputCount}**\n `{i}`\n\n' + + lines.append(input_html) + inputCount = f' {index + 1}' + + # Mapping + with open(os.path.join(testcase, mapping_file)) as f: + mapping_html = f'**Mapping**\n```\n{f.read()}\n```\n\n' + lines.append(mapping_html) + + # Output + outputCount = '' + if output2 or output3: + outputCount = ' 1' + + for index, i in enumerate([output1, output2, output3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + output_html = f'**Output{outputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + output_html = f'**Output{outputCount}**\n `{i}`\n\n' + + lines.append(output_html) + outputCount = f' {index + 2}' + + + with open(os.path.join(testcase, 'README.md'), 'w') as f: + f.writelines(lines) + + +if __name__ == '__main__': + if len(sys.argv) != 2: + print('Usage: ./make-metadata.py ') + sys.exit(1) + main(sys.argv[1]) diff --git a/src/test/resources/rml-fnml/manifest.rml.ttl b/src/test/resources/rml-fnml/manifest.rml.ttl new file mode 100644 index 00000000..9d7b4281 --- /dev/null +++ b/src/test/resources/rml-fnml/manifest.rml.ttl @@ -0,0 +1,267 @@ +@prefix xsd: . +@prefix dcterms: . +@prefix rml: . +@prefix rmltest: . +@prefix test: . +@base . + +# java -jar .\burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/fnml/test/ + +_:source + rml:source [ + a rml:RelativePathSource ; + rml:path "metadata.csv" ; + rml:null ""; + ]; + rml:referenceFormulation rml:CSV; +. + +<#TriplesMapTestcase> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:reference "ID"; + rml:class test:TestCase; + ]; + + rml:predicateObjectMap [ + rml:predicate dcterms:identifier; + rml:objectMap [ + rml:reference "ID"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:hasError; + rml:objectMap [ + rml:reference "error"; + rml:datatype xsd:boolean; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:mappingDocument; + rml:objectMap [ + rml:reference "mapping"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; +. + +<#TriplesMapInput1> + a rml:TriplesMap; + + rml:logicalSource _:source ; + + rml:subjectMap [ + rml:template "{ID}/input/{input1}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format1"; + ]; + ]; +. + +<#TriplesMapInput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input2}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format2"; + ]; + ]; +. + +<#TriplesMapInput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input3}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format3"; + ]; + ]; +. + +<#TriplesMapOutput1> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output1}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format1"; + ]; + ]; +. + +<#TriplesMapOutput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output2}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format2"; + ]; + ]; +. + +<#TriplesMapOutput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output3}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format3"; + ]; + ]; +. + diff --git a/src/test/resources/rml-fnml/manifest.ttl b/src/test/resources/rml-fnml/manifest.ttl new file mode 100644 index 00000000..ac18894a --- /dev/null +++ b/src/test/resources/rml-fnml/manifest.ttl @@ -0,0 +1,200 @@ + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0005-CSV" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0008-CSV" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0001-CSV" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0004-CSV" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0007-CSV" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0003-CSV" . + . + "student.csv" . + "text/csv" . + . + "output.nq" . + "application/n-quads" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "output.nq" . + "application/n-quads" . + . + "student.csv" . + "text/csv" . + . + "output.nq" . + "application/n-quads" . + . + "student.csv" . + "text/csv" . + . + "output.nq" . + "application/n-quads" . + . + "student.csv" . + "text/csv" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0061-CSV" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0102-CSV" . + . + "student.csv" . + "text/csv" . + . + "output.nq" . + "application/n-quads" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0031-CSV" . + . + "output.nq" . + "application/n-quads" . + . + "true"^^ . + "mapping.ttl" . + . + "RMLFNMLTC0101-CSV" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0104-CSV" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0041-CSV" . + . + "student.csv" . + "text/csv" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0051-CSV" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0103-CSV" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "student.csv" . + "text/csv" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0011-CSV" . + . + "output.nq" . + "application/n-quads" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0021-CSV" . + . + "output.nq" . + "application/n-quads" . + . + "false"^^ . + . + "mapping.ttl" . + . + "RMLFNMLTC0002-CSV" . + . diff --git a/src/test/resources/rml-fnml/metadata.csv b/src/test/resources/rml-fnml/metadata.csv new file mode 100644 index 00000000..f5f3cc13 --- /dev/null +++ b/src/test/resources/rml-fnml/metadata.csv @@ -0,0 +1,25 @@ +ID,title,description,specification,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error +RMLFNMLTC0001-CSV,"Function on object, 0 parameters","Tests +(1) if a function without parameters can be used (FnO) +(2) if a function on an object map can be used (Term) +(3) if the output of the function is assigned the correct termType by default",http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0002-CSV,"Function on object, 1 reference parameter","Tests: +(1) if a function with one parameter can be used, (FnO) +(2) a reference parameter can be used (Term)",http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0003-CSV,"Function on object, 1 reference parameter, the output termType is IRI",Tests if the output of the function is assigned the correct termType,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0004-CSV,"Function on object, the output termType is Literal",Tests if the output of the function is assigned the correct termType,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0005-CSV,"Function on object, 1 template parameter",Tests if a function with a template parameter can be used,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0007-CSV,Function on object returns empty string,Tests that a triple is generated when the results is an empty string.,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0008-CSV,Function on object returns null,Tests that no triple should be generated when the result is null.,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0011-CSV,"Function on predicate, 1 parameter",Tests if a function can be used on a predicate,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0021-CSV,"Function on object, 1 reference parameter, 1 constant parameter",Tests if a function with multiple parameters can be used,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0031-CSV,"Function on subject, 1 parameter","Tests if +(1) a function can be used on a subject +(2) Tests if the default termType assigned to the output of the function to be correct",http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0041-CSV,Function using non-constant shortcut property return,Tests that a non-constant FNML Return map also works,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0051-CSV,Nested function - Test A,"Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)",http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0061-CSV,"Function on graph, 1 parameter",Tests if a function can be used on a graph,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0103-CSV,"Function on object, wrong parameter",Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0104-CSV,"Function on object, wrong return parameter",Tests that nothing is generated if a function is defined using a return not defined in the FnO description,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false +RMLFNMLTC0101-CSV,"Function on object, 1 false reference parameter",Tests if a false reference parameters is caught,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,,,,student.csv,,,,,,true +RMLFNMLTC0102-CSV,"Function on object, wrong function URI",Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine,http://w3id.org/rml/fnml/,mapping.ttl,text/csv,,,application/n-quads,,,student.csv,,,output.nq,,,false diff --git a/src/test/resources/rml-fnml/section/abstract.md b/src/test/resources/rml-fnml/section/abstract.md new file mode 100644 index 00000000..3ef03d68 --- /dev/null +++ b/src/test/resources/rml-fnml/section/abstract.md @@ -0,0 +1 @@ +This document defines the RML-FNML test cases to the determine the RML-FNML specification conformance of tools. diff --git a/src/test/resources/rml-fnml/section/data-model.md b/src/test/resources/rml-fnml/section/data-model.md new file mode 100644 index 00000000..f4c3ad6a --- /dev/null +++ b/src/test/resources/rml-fnml/section/data-model.md @@ -0,0 +1,12 @@ +# Data model + +The test cases are semantically described for re-usability and shareability following the [W3C Test case description](https://www.w3.org/2006/03/test-description). +Each `test:Testcase` as the following properties: + +- `dcterms:identifier`: unique ID of the test case. +- `rmltest:hasError`: if an error of the RML Processor is expected or not. +- `rmltest:input`: One or more input data of the test case. +- `rmltest:output`: One or more output data of the test case. +- `rmltest:inputFormat`: the input data format. +- `rmltest:outputFormat`: the output data format. +- `rmltest:mappingDocument`: the RML mapping rules in Turtle. diff --git a/src/test/resources/rml-fnml/section/introduction.md b/src/test/resources/rml-fnml/section/introduction.md new file mode 100644 index 00000000..e43b97ed --- /dev/null +++ b/src/test/resources/rml-fnml/section/introduction.md @@ -0,0 +1,4 @@ +# Introduction + +This document defines the RML-FNML test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-FNML specification. diff --git a/src/test/resources/rml-fnml/section/test-cases.md b/src/test/resources/rml-fnml/section/test-cases.md new file mode 100644 index 00000000..5ba69b6d --- /dev/null +++ b/src/test/resources/rml-fnml/section/test-cases.md @@ -0,0 +1,10 @@ +# Test cases + +This section describes the RML-FNML test cases. These descriptions are also available as RDF. +The files are available on [GitHub](https://github.com/kg-construct/rml-fnml/tree/main/test-cases) in the folder `test-cases`. +Each test case is contained in a single folder, containing three types of files: + + - Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server. + - One file with the RML rules, called `mapping.ttl`, in the Turtle format. + - Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error. + diff --git a/src/test/resources/rml-lv/RMLLVTC0000a/README.md b/src/test/resources/rml-lv/RMLLVTC0000a/README.md new file mode 100644 index 00000000..6fa5a1e9 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000a/README.md @@ -0,0 +1,82 @@ +## RMLLVTC0000a + +**Title**: Logical view on JSON source + +**Description**: Test a view on a hierarchical source + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name" ; + ] ; + ] . + +``` + +**Output** +``` + "alice" . + "bob" . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0000a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0000a/mapping.ttl new file mode 100644 index 00000000..ac68a610 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000a/mapping.ttl @@ -0,0 +1,31 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0000a/output.nq b/src/test/resources/rml-lv/RMLLVTC0000a/output.nq new file mode 100644 index 00000000..1112907a --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000a/output.nq @@ -0,0 +1,2 @@ + "alice" . + "bob" . diff --git a/src/test/resources/rml-lv/RMLLVTC0000a/people.json b/src/test/resources/rml-lv/RMLLVTC0000a/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000a/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0000b/README.md b/src/test/resources/rml-lv/RMLLVTC0000b/README.md new file mode 100644 index 00000000..f94dd6f3 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000b/README.md @@ -0,0 +1,59 @@ +## RMLLVTC0000b + +**Title**: Logical view on CSV source + +**Description**: Test a view on a tabular source + +**Error expected?** No + +**Input** +``` +name,birthyear +alice,1995 +bob,1999 +tobias,2005 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name" ; + ] ; + ] . + +``` + +**Output** +``` + "alice" . + "bob" . + "tobias" . +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0000b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0000b/mapping.ttl new file mode 100644 index 00000000..75c424e4 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000b/mapping.ttl @@ -0,0 +1,30 @@ +@prefix rml: . +@prefix : . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0000b/output.nq b/src/test/resources/rml-lv/RMLLVTC0000b/output.nq new file mode 100644 index 00000000..f611f1d9 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000b/output.nq @@ -0,0 +1,3 @@ + "alice" . + "bob" . + "tobias" . \ No newline at end of file diff --git a/src/test/resources/rml-lv/RMLLVTC0000b/people.csv b/src/test/resources/rml-lv/RMLLVTC0000b/people.csv new file mode 100644 index 00000000..edc942d0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000b/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +bob,1999 +tobias,2005 diff --git a/src/test/resources/rml-lv/RMLLVTC0000c/README.md b/src/test/resources/rml-lv/RMLLVTC0000c/README.md new file mode 100644 index 00000000..ba0afbb7 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000c/README.md @@ -0,0 +1,90 @@ +## RMLLVTC0000c + +**Title**: Logical View on Logical View + +**Description**: Test a view on a logical view + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:jsonViewOnJsonView a rml:LogicalView ; + rml:viewOn :jsonView ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "newName" ; + rml:reference "name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonViewOnJsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{newName}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "newName" ; + ] ; + ] . + +``` + +**Output** +``` + "alice" . + "bob" . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0000c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0000c/mapping.ttl new file mode 100644 index 00000000..3f5abf02 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000c/mapping.ttl @@ -0,0 +1,39 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:jsonViewOnJsonView a rml:LogicalView ; + rml:viewOn :jsonView ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "newName" ; + rml:reference "name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonViewOnJsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{newName}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "newName" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0000c/output.nq b/src/test/resources/rml-lv/RMLLVTC0000c/output.nq new file mode 100644 index 00000000..1112907a --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000c/output.nq @@ -0,0 +1,2 @@ + "alice" . + "bob" . diff --git a/src/test/resources/rml-lv/RMLLVTC0000c/people.json b/src/test/resources/rml-lv/RMLLVTC0000c/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0000c/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0001a/README.md b/src/test/resources/rml-lv/RMLLVTC0001a/README.md new file mode 100644 index 00000000..ae410248 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001a/README.md @@ -0,0 +1,82 @@ +## RMLLVTC0001a + +**Title**: Expression Field: Reference + +**Description**: Test a reference in an expression field + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name" ; + ] ; + ] . + +``` + +**Output** +``` + "alice" . + "bob" . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0001a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0001a/mapping.ttl new file mode 100644 index 00000000..ac68a610 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001a/mapping.ttl @@ -0,0 +1,31 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0001a/output.nq b/src/test/resources/rml-lv/RMLLVTC0001a/output.nq new file mode 100644 index 00000000..1112907a --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001a/output.nq @@ -0,0 +1,2 @@ + "alice" . + "bob" . diff --git a/src/test/resources/rml-lv/RMLLVTC0001a/people.json b/src/test/resources/rml-lv/RMLLVTC0001a/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001a/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0001b/README.md b/src/test/resources/rml-lv/RMLLVTC0001b/README.md new file mode 100644 index 00000000..3eb3a775 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001b/README.md @@ -0,0 +1,87 @@ +## RMLLVTC0001b + +**Title**: Expression Field: Template + +**Description**: Test a template in an expression field + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "race" ; + rml:constant "human" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasRace ; + rml:objectMap [ + rml:reference "race" ; + ] ; + ] . + +``` + +**Output** +``` + "human" . + "human" . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0001b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0001b/mapping.ttl new file mode 100644 index 00000000..ff5012c6 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001b/mapping.ttl @@ -0,0 +1,36 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "race" ; + rml:constant "human" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasRace ; + rml:objectMap [ + rml:reference "race" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0001b/output.nq b/src/test/resources/rml-lv/RMLLVTC0001b/output.nq new file mode 100644 index 00000000..dcc01ba7 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001b/output.nq @@ -0,0 +1,2 @@ + "human" . + "human" . diff --git a/src/test/resources/rml-lv/RMLLVTC0001b/people.json b/src/test/resources/rml-lv/RMLLVTC0001b/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001b/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0001c/README.md b/src/test/resources/rml-lv/RMLLVTC0001c/README.md new file mode 100644 index 00000000..d393dd62 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001c/README.md @@ -0,0 +1,89 @@ +## RMLLVTC0001c + +**Title**: Expression Field: Constant + +**Description**: Test a constant expression in an expression field + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "lastName": "smith", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "lastName": "jones", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "fullName" ; + rml:template "{name} {lastName}" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasFullName ; + rml:objectMap [ + rml:reference "fullName" ; + ] ; + ] . + +``` + +**Output** +``` + "alice smith" . + "bob jones" . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0001c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0001c/mapping.ttl new file mode 100644 index 00000000..14291044 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001c/mapping.ttl @@ -0,0 +1,36 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "fullName" ; + rml:template "{name} {lastName}" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasFullName ; + rml:objectMap [ + rml:reference "fullName" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0001c/output.nq b/src/test/resources/rml-lv/RMLLVTC0001c/output.nq new file mode 100644 index 00000000..69788f73 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001c/output.nq @@ -0,0 +1,2 @@ + "alice smith" . + "bob jones" . diff --git a/src/test/resources/rml-lv/RMLLVTC0001c/people.json b/src/test/resources/rml-lv/RMLLVTC0001c/people.json new file mode 100644 index 00000000..49969657 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001c/people.json @@ -0,0 +1,28 @@ +{ + "people": [ + { + "name": "alice", + "lastName": "smith", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "lastName": "jones", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0001d/README.md b/src/test/resources/rml-lv/RMLLVTC0001d/README.md new file mode 100644 index 00000000..325b3a8e --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001d/README.md @@ -0,0 +1,90 @@ +## RMLLVTC0001d + +**Title**: Expression Field Siblings + +**Description**: Test multiple expression fields with the same parent + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "lastName": "smith", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "lastName": "jones", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "lastName" ; + rml:reference "$.lastName" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasFullName ; + rml:objectMap [ + rml:template "{name} {lastName}" ; + rml:termType rml:Literal ; + ] ; + ] . + +``` + +**Output** +``` + "alice smith" . + "bob jones" . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0001d/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0001d/mapping.ttl new file mode 100644 index 00000000..a380b398 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001d/mapping.ttl @@ -0,0 +1,37 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "lastName" ; + rml:reference "$.lastName" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasFullName ; + rml:objectMap [ + rml:template "{name} {lastName}" ; + rml:termType rml:Literal ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0001d/output.nq b/src/test/resources/rml-lv/RMLLVTC0001d/output.nq new file mode 100644 index 00000000..69788f73 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001d/output.nq @@ -0,0 +1,2 @@ + "alice smith" . + "bob jones" . diff --git a/src/test/resources/rml-lv/RMLLVTC0001d/people.json b/src/test/resources/rml-lv/RMLLVTC0001d/people.json new file mode 100644 index 00000000..49969657 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0001d/people.json @@ -0,0 +1,28 @@ +{ + "people": [ + { + "name": "alice", + "lastName": "smith", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "lastName": "jones", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0002a/README.md b/src/test/resources/rml-lv/RMLLVTC0002a/README.md new file mode 100644 index 00000000..b3b38af6 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002a/README.md @@ -0,0 +1,94 @@ +## RMLLVTC0002a + +**Title**: Iterable Field + +**Description**: Test a nested field construction: iterable field with expression field as child + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/item/{item.type}" ; + ] ; + ] . + +``` + +**Output** +``` + . + . + . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0002a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0002a/mapping.ttl new file mode 100644 index 00000000..34c964e3 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002a/mapping.ttl @@ -0,0 +1,42 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/item/{item.type}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0002a/output.nq b/src/test/resources/rml-lv/RMLLVTC0002a/output.nq new file mode 100644 index 00000000..c4b95144 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002a/output.nq @@ -0,0 +1,3 @@ + . + . + . diff --git a/src/test/resources/rml-lv/RMLLVTC0002a/people.json b/src/test/resources/rml-lv/RMLLVTC0002a/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002a/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0002b/README.md b/src/test/resources/rml-lv/RMLLVTC0002b/README.md new file mode 100644 index 00000000..658f01ec --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002b/README.md @@ -0,0 +1,109 @@ +## RMLLVTC0002b + +**Title**: Iterable Field with Multiple Children + +**Description**: Test a nested field construction: iterable field with mulitple expression fields as children + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "weight" ; + rml:reference "$.weight" ; + ] ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.type}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "item.type" ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "item.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . + +``` + +**Output** +``` + "sword" . + "1500"^^ . + "shield" . + "2500"^^ . + "flower" . + "15"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0002b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0002b/mapping.ttl new file mode 100644 index 00000000..d7ad0c71 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002b/mapping.ttl @@ -0,0 +1,54 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "weight" ; + rml:reference "$.weight" ; + ] ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.type}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "item.type" ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "item.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0002b/output.nq b/src/test/resources/rml-lv/RMLLVTC0002b/output.nq new file mode 100644 index 00000000..83d339e1 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002b/output.nq @@ -0,0 +1,6 @@ + "sword" . + "1500"^^ . + "shield" . + "2500"^^ . + "flower" . + "15"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0002b/people.json b/src/test/resources/rml-lv/RMLLVTC0002b/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002b/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0002c/README.md b/src/test/resources/rml-lv/RMLLVTC0002c/README.md new file mode 100644 index 00000000..f20e85bc --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002c/README.md @@ -0,0 +1,117 @@ +## RMLLVTC0002c + +**Title**: Nested Iterable Fields + +**Description**: Test a nested field construction: iterable field with an iterable field as child + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "measures": { + "weight": 1500, + "length": 30 + } + }, + { + "type": "shield", + "measures": { + "weight": 2500 + } + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "measures" : { + "weight": 15, + "length" : 15 + } + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "measures"; + rml:iterator "$.measures"; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "weight" ; + rml:reference "$.weight" ; + ]; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "length" ; + rml:reference "$.length" ; + ] + ] ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.type}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "item.measures.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . + +``` + +**Output** +``` + "1500"^^ . + "2500"^^ . + "15"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0002c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0002c/mapping.ttl new file mode 100644 index 00000000..b77d1efc --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002c/mapping.ttl @@ -0,0 +1,57 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "measures"; + rml:iterator "$.measures"; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "weight" ; + rml:reference "$.weight" ; + ]; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "length" ; + rml:reference "$.length" ; + ] + ] ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.type}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "item.measures.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0002c/output.nq b/src/test/resources/rml-lv/RMLLVTC0002c/output.nq new file mode 100644 index 00000000..21ccc919 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002c/output.nq @@ -0,0 +1,3 @@ + "1500"^^ . + "2500"^^ . + "15"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0002c/people.json b/src/test/resources/rml-lv/RMLLVTC0002c/people.json new file mode 100644 index 00000000..485614f6 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0002c/people.json @@ -0,0 +1,34 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "measures": { + "weight": 1500, + "length": 30 + } + }, + { + "type": "shield", + "measures": { + "weight": 2500 + } + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "measures" : { + "weight": 15, + "length" : 15 + } + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0003a/README.md b/src/test/resources/rml-lv/RMLLVTC0003a/README.md new file mode 100644 index 00000000..d91733b0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003a/README.md @@ -0,0 +1,84 @@ +## RMLLVTC0003a + +**Title**: Index Key: # + +**Description**: Test a reference to the index key # + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasSequenceNumber ; + rml:objectMap [ + rml:reference "#" ; + rml:datatype xsd:integer ; + ] ; + ] . + +``` + +**Output** +``` + "0"^^ . + "1"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0003a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0003a/mapping.ttl new file mode 100644 index 00000000..bd016a26 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003a/mapping.ttl @@ -0,0 +1,33 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasSequenceNumber ; + rml:objectMap [ + rml:reference "#" ; + rml:datatype xsd:integer ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0003a/output.nq b/src/test/resources/rml-lv/RMLLVTC0003a/output.nq new file mode 100644 index 00000000..39629980 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003a/output.nq @@ -0,0 +1,2 @@ + "0"^^ . + "1"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0003a/people.json b/src/test/resources/rml-lv/RMLLVTC0003a/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003a/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0003b/README.md b/src/test/resources/rml-lv/RMLLVTC0003b/README.md new file mode 100644 index 00000000..b968da6d --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003b/README.md @@ -0,0 +1,94 @@ +## RMLLVTC0003b + +**Title**: Index Key: Iterable Field + +**Description**: Test a reference to the index key of an iterable field + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "item.type" ; + ] ; + ] . + +``` + +**Output** +``` + "sword" . + "shield" . + "flower" . + + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0003b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0003b/mapping.ttl new file mode 100644 index 00000000..a1f81288 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003b/mapping.ttl @@ -0,0 +1,41 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "item.type" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0003b/output.nq b/src/test/resources/rml-lv/RMLLVTC0003b/output.nq new file mode 100644 index 00000000..7a701645 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003b/output.nq @@ -0,0 +1,4 @@ + "sword" . + "shield" . + "flower" . + diff --git a/src/test/resources/rml-lv/RMLLVTC0003b/people.json b/src/test/resources/rml-lv/RMLLVTC0003b/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003b/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0003c/README.md b/src/test/resources/rml-lv/RMLLVTC0003c/README.md new file mode 100644 index 00000000..2db9a5fe --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003c/README.md @@ -0,0 +1,80 @@ +## RMLLVTC0003c + +**Title**: Index Key: Expression field + +**Description**: Test a reference to the index key of an expression field + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "item" ; + ] ; + ] . + +``` + +**Output** +``` + "sword" . + "shield" . + "flower" . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0003c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0003c/mapping.ttl new file mode 100644 index 00000000..56ec415c --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003c/mapping.ttl @@ -0,0 +1,37 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "item" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0003c/output.nq b/src/test/resources/rml-lv/RMLLVTC0003c/output.nq new file mode 100644 index 00000000..55e161ec --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003c/output.nq @@ -0,0 +1,3 @@ + "sword" . + "shield" . + "flower" . diff --git a/src/test/resources/rml-lv/RMLLVTC0003c/people.json b/src/test/resources/rml-lv/RMLLVTC0003c/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0003c/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0004a/README.md b/src/test/resources/rml-lv/RMLLVTC0004a/README.md new file mode 100644 index 00000000..63999a1a --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004a/README.md @@ -0,0 +1,82 @@ +## RMLLVTC0004a + +**Title**: Natural Datatype: Index # + +**Description**: Test the natural datatype mapping for the index # + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasSequenceNumber ; + rml:objectMap [ + rml:reference "#" ; + ] ; + ] . + +``` + +**Output** +``` + "0"^^ . + "1"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0004a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0004a/mapping.ttl new file mode 100644 index 00000000..12e315bd --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004a/mapping.ttl @@ -0,0 +1,31 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasSequenceNumber ; + rml:objectMap [ + rml:reference "#" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0004a/output.nq b/src/test/resources/rml-lv/RMLLVTC0004a/output.nq new file mode 100644 index 00000000..39629980 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004a/output.nq @@ -0,0 +1,2 @@ + "0"^^ . + "1"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0004a/people.json b/src/test/resources/rml-lv/RMLLVTC0004a/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004a/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0004b/README.md b/src/test/resources/rml-lv/RMLLVTC0004b/README.md new file mode 100644 index 00000000..d598e0ef --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004b/README.md @@ -0,0 +1,93 @@ +## RMLLVTC0004b + +**Title**: Natural Datatype: Index Expression Field + +**Description**: Test the natural datatype mapping for the index of an expression field + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.type}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasSequenceNumber ; + rml:objectMap [ + rml:reference "item.#" ; + ] ; + ] . + +``` + +**Output** +``` + "0"^^ . + "1"^^ . + "0"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0004b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0004b/mapping.ttl new file mode 100644 index 00000000..95dc2d43 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004b/mapping.ttl @@ -0,0 +1,41 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item.type}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasSequenceNumber ; + rml:objectMap [ + rml:reference "item.#" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0004b/output.nq b/src/test/resources/rml-lv/RMLLVTC0004b/output.nq new file mode 100644 index 00000000..ad329751 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004b/output.nq @@ -0,0 +1,3 @@ + "0"^^ . + "1"^^ . + "0"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0004b/people.json b/src/test/resources/rml-lv/RMLLVTC0004b/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004b/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0004c/README.md b/src/test/resources/rml-lv/RMLLVTC0004c/README.md new file mode 100644 index 00000000..8ab10b2d --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004c/README.md @@ -0,0 +1,80 @@ +## RMLLVTC0004c + +**Title**: Natural Datatype: Index Iterable Field + +**Description**: Test the natural datatype mapping for the index of an iterable field + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasSequenceNumber ; + rml:objectMap [ + rml:reference "item.#" ; + ] ; + ] . + +``` + +**Output** +``` + "0"^^ . + "1"^^ . + "0"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0004c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0004c/mapping.ttl new file mode 100644 index 00000000..5d4e57d7 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004c/mapping.ttl @@ -0,0 +1,37 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}/item/{item}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasSequenceNumber ; + rml:objectMap [ + rml:reference "item.#" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0004c/output.nq b/src/test/resources/rml-lv/RMLLVTC0004c/output.nq new file mode 100644 index 00000000..ad329751 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004c/output.nq @@ -0,0 +1,3 @@ + "0"^^ . + "1"^^ . + "0"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0004c/people.json b/src/test/resources/rml-lv/RMLLVTC0004c/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004c/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0004d/README.md b/src/test/resources/rml-lv/RMLLVTC0004d/README.md new file mode 100644 index 00000000..66c92b6c --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004d/README.md @@ -0,0 +1,74 @@ +## RMLLVTC0004d + +**Title**: Natural Datatype: Record Expression Field + +**Description**: Test the natural datatype mapping for a record of an expression field + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "birth_year": 1995 + }, + { + "name": "bob", + "birth_year": 1999 + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "$.birth_year" ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + ] ; + ] . + +``` + +**Output** +``` + "1995"^^ . + "1999"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0004d/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0004d/mapping.ttl new file mode 100644 index 00000000..f7a7b45d --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004d/mapping.ttl @@ -0,0 +1,37 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "$.birth_year" ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0004d/output.nq b/src/test/resources/rml-lv/RMLLVTC0004d/output.nq new file mode 100644 index 00000000..3eda03ce --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004d/output.nq @@ -0,0 +1,2 @@ + "1995"^^ . + "1999"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0004d/people.json b/src/test/resources/rml-lv/RMLLVTC0004d/people.json new file mode 100644 index 00000000..8ed0174c --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0004d/people.json @@ -0,0 +1,12 @@ +{ + "people": [ + { + "name": "alice", + "birth_year": 1995 + }, + { + "name": "bob", + "birth_year": 1999 + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0005a/README.md b/src/test/resources/rml-lv/RMLLVTC0005a/README.md new file mode 100644 index 00000000..915c20b9 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005a/README.md @@ -0,0 +1,75 @@ +## RMLLVTC0005a + +**Title**: Referencing a Non-Existing Key + +**Description**: Test a reference to a non-existing key + +**Error expected?** Yes + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{Name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "Name" ; + ] ; + ] . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0005a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0005a/mapping.ttl new file mode 100644 index 00000000..c5ff6f41 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005a/mapping.ttl @@ -0,0 +1,31 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{Name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "Name" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0005a/people.json b/src/test/resources/rml-lv/RMLLVTC0005a/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005a/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0005b/README.md b/src/test/resources/rml-lv/RMLLVTC0005b/README.md new file mode 100644 index 00000000..d56b87eb --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005b/README.md @@ -0,0 +1,75 @@ +## RMLLVTC0005b + +**Title**: Referencing the Record Key + +**Description**: Test a reference to the record key + +**Error expected?** Yes + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :isDerivedFrom ; + rml:objectMap [ + rml:reference "" ; + ] ; + ] . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0005b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0005b/mapping.ttl new file mode 100644 index 00000000..3e9544bd --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005b/mapping.ttl @@ -0,0 +1,31 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :isDerivedFrom ; + rml:objectMap [ + rml:reference "" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0005b/people.json b/src/test/resources/rml-lv/RMLLVTC0005b/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005b/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0005c/README.md b/src/test/resources/rml-lv/RMLLVTC0005c/README.md new file mode 100644 index 00000000..5881d48f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005c/README.md @@ -0,0 +1,86 @@ +## RMLLVTC0005c + +**Title**: Referencing the Record Key of an Iterable Field + +**Description**: Test a reference to the record key of an iterable field + +**Error expected?** Yes + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/{item}" ; + ] ; + ] . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0005c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0005c/mapping.ttl new file mode 100644 index 00000000..52490995 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005c/mapping.ttl @@ -0,0 +1,42 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:IterableField ; + rml:fieldName "item" ; + rml:iterator "$.items[*]" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/{item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0005c/people.json b/src/test/resources/rml-lv/RMLLVTC0005c/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0005c/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0006a/README.md b/src/test/resources/rml-lv/RMLLVTC0006a/README.md new file mode 100644 index 00000000..6b61668e --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006a/README.md @@ -0,0 +1,133 @@ +## RMLLVTC0006a + +**Title**: Left Join + +**Description**: Test a left join + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,birthyear +alice,1995 +bob,1999 +tobias,2005 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/item/{json_item}" ; + ] ; + ] . + +``` + +**Output** +``` + "1995"^^ . + . + . + "1999"^^ . + . + "2005"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0006a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0006a/mapping.ttl new file mode 100644 index 00000000..57e71072 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006a/mapping.ttl @@ -0,0 +1,78 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/item/{json_item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0006a/output.nq b/src/test/resources/rml-lv/RMLLVTC0006a/output.nq new file mode 100644 index 00000000..f9fd2a83 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006a/output.nq @@ -0,0 +1,6 @@ + "1995"^^ . + . + . + "1999"^^ . + . + "2005"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0006a/people.csv b/src/test/resources/rml-lv/RMLLVTC0006a/people.csv new file mode 100644 index 00000000..edc942d0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006a/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +bob,1999 +tobias,2005 diff --git a/src/test/resources/rml-lv/RMLLVTC0006a/people.json b/src/test/resources/rml-lv/RMLLVTC0006a/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006a/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0006b/README.md b/src/test/resources/rml-lv/RMLLVTC0006b/README.md new file mode 100644 index 00000000..b4704924 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006b/README.md @@ -0,0 +1,132 @@ +## RMLLVTC0006b + +**Title**: Inner Join + +**Description**: Test an inner join + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,birthyear +alice,1995 +bob,1999 +tobias,2005 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/item/{json_item}" ; + ] ; + ] . + +``` + +**Output** +``` + "1995"^^ . + . + . + "1999"^^ . + . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0006b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0006b/mapping.ttl new file mode 100644 index 00000000..ee5f0a23 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006b/mapping.ttl @@ -0,0 +1,78 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/item/{json_item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0006b/output.nq b/src/test/resources/rml-lv/RMLLVTC0006b/output.nq new file mode 100644 index 00000000..24fec8f3 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006b/output.nq @@ -0,0 +1,5 @@ + "1995"^^ . + . + . + "1999"^^ . + . diff --git a/src/test/resources/rml-lv/RMLLVTC0006b/people.csv b/src/test/resources/rml-lv/RMLLVTC0006b/people.csv new file mode 100644 index 00000000..edc942d0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006b/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +bob,1999 +tobias,2005 diff --git a/src/test/resources/rml-lv/RMLLVTC0006b/people.json b/src/test/resources/rml-lv/RMLLVTC0006b/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006b/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0006c/README.md b/src/test/resources/rml-lv/RMLLVTC0006c/README.md new file mode 100644 index 00000000..34ac3709 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006c/README.md @@ -0,0 +1,176 @@ +## RMLLVTC0006c + +**Title**: Two Left Joins + +**Description**: Test two left joins in one logical view + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,birthyear +alice,1995 +bob,1999 +tobias,2005 + +``` + +**Input 2** +``` +name,id +alice,123 +bob,456 +tobias,789 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:additionalCsvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people2.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:additionalCsvView a rml:LogicalView ; + rml:viewOn :additionalCsvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "id" ; + rml:reference "id" ; + ] ; +. + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :additionalCsvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csv2_id" ; + rml:reference "id" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{csv2_id}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ; + ] ; + ] . + +``` + +**Output** +``` + "1995"^^ . + . + . + "1999"^^ . + . + "2005"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0006c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0006c/mapping.ttl new file mode 100644 index 00000000..cdcc7ec4 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006c/mapping.ttl @@ -0,0 +1,112 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:additionalCsvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people2.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:additionalCsvView a rml:LogicalView ; + rml:viewOn :additionalCsvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "id" ; + rml:reference "id" ; + ] ; +. + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :additionalCsvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csv2_id" ; + rml:reference "id" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{csv2_id}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0006c/output.nq b/src/test/resources/rml-lv/RMLLVTC0006c/output.nq new file mode 100644 index 00000000..43c6b6d9 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006c/output.nq @@ -0,0 +1,6 @@ + "1995"^^ . + . + . + "1999"^^ . + . + "2005"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0006c/people.csv b/src/test/resources/rml-lv/RMLLVTC0006c/people.csv new file mode 100644 index 00000000..edc942d0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006c/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +bob,1999 +tobias,2005 diff --git a/src/test/resources/rml-lv/RMLLVTC0006c/people.json b/src/test/resources/rml-lv/RMLLVTC0006c/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006c/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0006c/people2.csv b/src/test/resources/rml-lv/RMLLVTC0006c/people2.csv new file mode 100644 index 00000000..103cc9b0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006c/people2.csv @@ -0,0 +1,4 @@ +name,id +alice,123 +bob,456 +tobias,789 diff --git a/src/test/resources/rml-lv/RMLLVTC0006d/README.md b/src/test/resources/rml-lv/RMLLVTC0006d/README.md new file mode 100644 index 00000000..203731c8 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006d/README.md @@ -0,0 +1,175 @@ +## RMLLVTC0006d + +**Title**: Inner Join and Left Join + +**Description**: Test an inner join and a left join in one logical view + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,birthyear +alice,1995 +bob,1999 +tobias,2005 + +``` + +**Input 2** +``` +name,id +alice,123 +bob,456 +tobias,789 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:additionalCsvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people2.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:additionalCsvView a rml:LogicalView ; + rml:viewOn :additionalCsvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "id" ; + rml:reference "id" ; + ] ; +. + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :additionalCsvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csv2_id" ; + rml:reference "id" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{csv2_id}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ; + ] ; + ] . + +``` + +**Output** +``` + "1995"^^ . + . + . + "1999"^^ . + . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0006d/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0006d/mapping.ttl new file mode 100644 index 00000000..84508df4 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006d/mapping.ttl @@ -0,0 +1,112 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:additionalCsvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people2.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:additionalCsvView a rml:LogicalView ; + rml:viewOn :additionalCsvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "id" ; + rml:reference "id" ; + ] ; +. + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :additionalCsvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csv2_id" ; + rml:reference "id" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{csv2_id}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0006d/output.nq b/src/test/resources/rml-lv/RMLLVTC0006d/output.nq new file mode 100644 index 00000000..dffa206c --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006d/output.nq @@ -0,0 +1,5 @@ + "1995"^^ . + . + . + "1999"^^ . + . diff --git a/src/test/resources/rml-lv/RMLLVTC0006d/people.csv b/src/test/resources/rml-lv/RMLLVTC0006d/people.csv new file mode 100644 index 00000000..edc942d0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006d/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +bob,1999 +tobias,2005 diff --git a/src/test/resources/rml-lv/RMLLVTC0006d/people.json b/src/test/resources/rml-lv/RMLLVTC0006d/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006d/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0006d/people2.csv b/src/test/resources/rml-lv/RMLLVTC0006d/people2.csv new file mode 100644 index 00000000..103cc9b0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006d/people2.csv @@ -0,0 +1,4 @@ +name,id +alice,123 +bob,456 +tobias,789 diff --git a/src/test/resources/rml-lv/RMLLVTC0006e/README.md b/src/test/resources/rml-lv/RMLLVTC0006e/README.md new file mode 100644 index 00000000..2e9ac2e9 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006e/README.md @@ -0,0 +1,171 @@ +## RMLLVTC0006e + +**Title**: Two Inner Joins + +**Description**: Test two left joins in one logical view + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,birthyear +alice,1995 +bob,1999 +tobias,2005 + +``` + +**Input 2** +``` +name,id +alice,123 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:additionalCsvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people2.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:additionalCsvView a rml:LogicalView ; + rml:viewOn :additionalCsvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "id" ; + rml:reference "id" ; + ] ; +. + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :additionalCsvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csv2_id" ; + rml:reference "id" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{csv2_id}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ; + ] ; + ] . + +``` + +**Output** +``` + "1995"^^ . + . + . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0006e/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0006e/mapping.ttl new file mode 100644 index 00000000..8cad87cd --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006e/mapping.ttl @@ -0,0 +1,112 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:additionalCsvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people2.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:additionalCsvView a rml:LogicalView ; + rml:viewOn :additionalCsvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "id" ; + rml:reference "id" ; + ] ; +. + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :additionalCsvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csv2_id" ; + rml:reference "id" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{csv2_id}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0006e/output.nq b/src/test/resources/rml-lv/RMLLVTC0006e/output.nq new file mode 100644 index 00000000..2449c7d3 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006e/output.nq @@ -0,0 +1,3 @@ + "1995"^^ . + . + . diff --git a/src/test/resources/rml-lv/RMLLVTC0006e/people.csv b/src/test/resources/rml-lv/RMLLVTC0006e/people.csv new file mode 100644 index 00000000..edc942d0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006e/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +bob,1999 +tobias,2005 diff --git a/src/test/resources/rml-lv/RMLLVTC0006e/people.json b/src/test/resources/rml-lv/RMLLVTC0006e/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006e/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0006e/people2.csv b/src/test/resources/rml-lv/RMLLVTC0006e/people2.csv new file mode 100644 index 00000000..526c93c7 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006e/people2.csv @@ -0,0 +1,2 @@ +name,id +alice,123 diff --git a/src/test/resources/rml-lv/RMLLVTC0006f/README.md b/src/test/resources/rml-lv/RMLLVTC0006f/README.md new file mode 100644 index 00000000..009bccba --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006f/README.md @@ -0,0 +1,133 @@ +## RMLLVTC0006f + +**Title**: Index Key of Field in Join + +**Description**: Test references to indexes of fields from a join + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,birthyear +alice,1995 +tobias,2005 +bob,1999 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{#}/item/{json_item.#}/{json_item}" ; + ] ; + ] . + +``` + +**Output** +``` + "1995"^^ . + . + . + "1999"^^ . + . + + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0006f/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0006f/mapping.ttl new file mode 100644 index 00000000..3b109d96 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006f/mapping.ttl @@ -0,0 +1,78 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:innerJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{#}/item/{json_item.#}/{json_item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0006f/output.nq b/src/test/resources/rml-lv/RMLLVTC0006f/output.nq new file mode 100644 index 00000000..5a125374 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006f/output.nq @@ -0,0 +1,6 @@ + "1995"^^ . + . + . + "1999"^^ . + . + diff --git a/src/test/resources/rml-lv/RMLLVTC0006f/people.csv b/src/test/resources/rml-lv/RMLLVTC0006f/people.csv new file mode 100644 index 00000000..0bf782c4 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006f/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +tobias,2005 +bob,1999 diff --git a/src/test/resources/rml-lv/RMLLVTC0006f/people.json b/src/test/resources/rml-lv/RMLLVTC0006f/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0006f/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0007a/README.md b/src/test/resources/rml-lv/RMLLVTC0007a/README.md new file mode 100644 index 00000000..3d2571d1 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007a/README.md @@ -0,0 +1,91 @@ +## RMLLVTC0007a + +**Title**: Change Reference Formulations: CSV including JSON array + +**Description**: Test a change of reference formulations: csv source including json array + +**Error expected?** No + +**Input** +``` +name,items +alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]" +bob,"[{""type"":""flower"",""weight"":15}]" + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:mixedCSVSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:mixedCSVView a rml:LogicalView ; + rml:viewOn :mixedCSVSource ; + rml:field [ + a rml:ExpressionField; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "items" ; + rml:reference "items" ; + rml:field [ + a rml:IterableField ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]" ; + rml:fieldName "item" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "weight" ; + rml:reference "$.weight" ; + ] ; + ] ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :mixedCSVView ; + rml:subjectMap [ + rml:template "http://example.org/item_{#}_{items.item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "items.item.type" ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "items.item.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . + +``` + +**Output** +``` + "sword" . + "1500"^^ . + "shield" . + "2500"^^ . + "flower" . + "15"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0007a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0007a/mapping.ttl new file mode 100644 index 00000000..6f8c6f12 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007a/mapping.ttl @@ -0,0 +1,59 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:mixedCSVSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:mixedCSVView a rml:LogicalView ; + rml:viewOn :mixedCSVSource ; + rml:field [ + a rml:ExpressionField; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "items" ; + rml:reference "items" ; + rml:field [ + a rml:IterableField ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]" ; + rml:fieldName "item" ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "weight" ; + rml:reference "$.weight" ; + ] ; + ] ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :mixedCSVView ; + rml:subjectMap [ + rml:template "http://example.org/item_{#}_{items.item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "items.item.type" ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "items.item.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0007a/output.nq b/src/test/resources/rml-lv/RMLLVTC0007a/output.nq new file mode 100644 index 00000000..da66633b --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007a/output.nq @@ -0,0 +1,6 @@ + "sword" . + "1500"^^ . + "shield" . + "2500"^^ . + "flower" . + "15"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0007a/people.csv b/src/test/resources/rml-lv/RMLLVTC0007a/people.csv new file mode 100644 index 00000000..cec6cb6b --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007a/people.csv @@ -0,0 +1,3 @@ +name,items +alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]" +bob,"[{""type"":""flower"",""weight"":15}]" diff --git a/src/test/resources/rml-lv/RMLLVTC0007b/README.md b/src/test/resources/rml-lv/RMLLVTC0007b/README.md new file mode 100644 index 00000000..095a1138 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007b/README.md @@ -0,0 +1,91 @@ +## RMLLVTC0007b + +**Title**: Change Reference Formulations: CSV including JSON object + +**Description**: Test a change of reference formulations: csv source including json object + +**Error expected?** No + +**Input** +``` +name,item +alice,"{""type"":""sword"",""weight"":1500}" +alice,"{""type"":""shield"",""weight"":2500}" +bob,"{""type"":""flower"",""weight"":15}" + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:mixedCSVSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:mixedCSVView a rml:LogicalView ; + rml:viewOn :mixedCSVSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "item" ; + rml:field [ + a rml:IterableField ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]" ; + rml:fieldName "itemJson" ; + rml:field [ + a rml:ExpressionField; + rml:fieldName "type" ; + rml:reference "$.type" ; ] ; + rml:field [ + a rml:ExpressionField; + rml:fieldName "weight" ; + rml:reference "$.weight" ; + ] ; + ] ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :mixedCSVView ; + rml:subjectMap [ + rml:template "http://example.org/item_{#}_{item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "item.itemJson.type" ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "item.itemJson.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . + +``` + +**Output** +``` + "sword" . + "1500"^^ . + "shield" . + "2500"^^ . + "flower" . + "15"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0007b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0007b/mapping.ttl new file mode 100644 index 00000000..16ced6c7 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007b/mapping.ttl @@ -0,0 +1,58 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:mixedCSVSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:mixedCSVView a rml:LogicalView ; + rml:viewOn :mixedCSVSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "item" ; + rml:field [ + a rml:IterableField ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]" ; + rml:fieldName "itemJson" ; + rml:field [ + a rml:ExpressionField; + rml:fieldName "type" ; + rml:reference "$.type" ; ] ; + rml:field [ + a rml:ExpressionField; + rml:fieldName "weight" ; + rml:reference "$.weight" ; + ] ; + ] ; + ] . + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :mixedCSVView ; + rml:subjectMap [ + rml:template "http://example.org/item_{#}_{item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "item.itemJson.type" ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "item.itemJson.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0007b/output.nq b/src/test/resources/rml-lv/RMLLVTC0007b/output.nq new file mode 100644 index 00000000..e52543f1 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007b/output.nq @@ -0,0 +1,6 @@ + "sword" . + "1500"^^ . + "shield" . + "2500"^^ . + "flower" . + "15"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0007b/people.csv b/src/test/resources/rml-lv/RMLLVTC0007b/people.csv new file mode 100644 index 00000000..eda1eb05 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007b/people.csv @@ -0,0 +1,4 @@ +name,item +alice,"{""type"":""sword"",""weight"":1500}" +alice,"{""type"":""shield"",""weight"":2500}" +bob,"{""type"":""flower"",""weight"":15}" diff --git a/src/test/resources/rml-lv/RMLLVTC0007c/README.md b/src/test/resources/rml-lv/RMLLVTC0007c/README.md new file mode 100644 index 00000000..1dbd0667 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007c/README.md @@ -0,0 +1,100 @@ +## RMLLVTC0007c + +**Title**: Change Reference Formulations: JSON including CSV + +**Description**: Test a change of reference formulations: json source including csv data + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": "type,weight\nsword,1500\nshield,2500" + }, + { + "name": "bob", + "items": "type,weight\nflower,15" + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:mixedJSONSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:mixedJSONView a rml:LogicalView ; + rml:viewOn :mixedJSONSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "items" ; + rml:reference "$.items" ; + rml:field [ + a rml:IterableField ; + rml:referenceFormulation rml:CSV ; + rml:fieldName "item"; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "type" ; + ] ; + rml:field [ + a rml:expressionField ; + rml:fieldName "weight" ; + rml:reference "weight" ; + ] ; + ] ; + ]. + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :mixedJSONView ; + rml:subjectMap [ + rml:template "http://example.org/item_{#}_{items.item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "items.item.type" ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "items.item.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . + +``` + +**Output** +``` + "sword" . + "1500"^^ . + "shield" . + "2500"^^ . + "flower" . + "15"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0007c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0007c/mapping.ttl new file mode 100644 index 00000000..0bec70b8 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007c/mapping.ttl @@ -0,0 +1,59 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:mixedJSONSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:mixedJSONView a rml:LogicalView ; + rml:viewOn :mixedJSONSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "items" ; + rml:reference "$.items" ; + rml:field [ + a rml:IterableField ; + rml:referenceFormulation rml:CSV ; + rml:fieldName "item"; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "type" ; + ] ; + rml:field [ + a rml:expressionField ; + rml:fieldName "weight" ; + rml:reference "weight" ; + ] ; + ] ; + ]. + +:triplesMapItem a rml:TriplesMap ; + rml:logicalSource :mixedJSONView ; + rml:subjectMap [ + rml:template "http://example.org/item_{#}_{items.item.#}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasType ; + rml:objectMap [ + rml:reference "items.item.type" ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasWeight ; + rml:objectMap [ + rml:reference "items.item.weight" ; + rml:datatype xsd:integer ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0007c/output.nq b/src/test/resources/rml-lv/RMLLVTC0007c/output.nq new file mode 100644 index 00000000..da66633b --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007c/output.nq @@ -0,0 +1,6 @@ + "sword" . + "1500"^^ . + "shield" . + "2500"^^ . + "flower" . + "15"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0007c/people.json b/src/test/resources/rml-lv/RMLLVTC0007c/people.json new file mode 100644 index 00000000..af0dd764 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0007c/people.json @@ -0,0 +1,12 @@ +{ + "people": [ + { + "name": "alice", + "items": "type,weight\nsword,1500\nshield,2500" + }, + { + "name": "bob", + "items": "type,weight\nflower,15" + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0008a/README.md b/src/test/resources/rml-lv/RMLLVTC0008a/README.md new file mode 100644 index 00000000..8dab0871 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008a/README.md @@ -0,0 +1,43 @@ +## RMLLVTC0008a + +**Title**: Cycle: Abstract Logical Source + +**Description**: Test a cycle in the abstract logical source of a logical view + +**Error expected?** Yes + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:view1 a rml:LogicalView ; + rml:viewOn :view2 ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name1" ; + rml:reference "name2" ; + ] . + +:view2 a rml:LogicalView ; + rml:viewOn :view1 ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name2" ; + rml:reference "name1" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :view2 ; + rml:subjectMap [ + rml:template "http://example.org/person/{name2}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name2" ; + ] ; + ] . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0008a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0008a/mapping.ttl new file mode 100644 index 00000000..8295ade6 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008a/mapping.ttl @@ -0,0 +1,30 @@ +@prefix rml: . +@prefix : . + +:view1 a rml:LogicalView ; + rml:viewOn :view2 ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name1" ; + rml:reference "name2" ; + ] . + +:view2 a rml:LogicalView ; + rml:viewOn :view1 ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name2" ; + rml:reference "name1" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :view2 ; + rml:subjectMap [ + rml:template "http://example.org/person/{name2}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name2" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0008b/README.md b/src/test/resources/rml-lv/RMLLVTC0008b/README.md new file mode 100644 index 00000000..6eb24bea --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008b/README.md @@ -0,0 +1,145 @@ +## RMLLVTC0008b + +**Title**: Cycle: Joins + +**Description**: Test a cycle in two joins of two logical views + +**Error expected?** No + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,birthyear +alice,1995 +bob,1999 +tobias,2005 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :csvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csv_birthyear" ; + rml:reference "birthyear" ; + ] ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/item/{json_item}" ; + ] ; + ] . + +``` + +**Output** +``` + "1995"^^ . + . + . + "1999"^^ . + . + "2005"^^ . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0008b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0008b/mapping.ttl new file mode 100644 index 00000000..fed9db6c --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008b/mapping.ttl @@ -0,0 +1,90 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "$.items[*]" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :csvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csv_birthyear" ; + rml:reference "birthyear" ; + ] ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "json_item" ; + rml:reference "item" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{name}/item/{json_item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0008b/output.nq b/src/test/resources/rml-lv/RMLLVTC0008b/output.nq new file mode 100644 index 00000000..f9fd2a83 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008b/output.nq @@ -0,0 +1,6 @@ + "1995"^^ . + . + . + "1999"^^ . + . + "2005"^^ . diff --git a/src/test/resources/rml-lv/RMLLVTC0008b/people.csv b/src/test/resources/rml-lv/RMLLVTC0008b/people.csv new file mode 100644 index 00000000..edc942d0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008b/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +bob,1999 +tobias,2005 diff --git a/src/test/resources/rml-lv/RMLLVTC0008b/people.json b/src/test/resources/rml-lv/RMLLVTC0008b/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008b/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0008c/README.md b/src/test/resources/rml-lv/RMLLVTC0008c/README.md new file mode 100644 index 00000000..2a3de1b6 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008c/README.md @@ -0,0 +1,87 @@ +## RMLLVTC0008c + +**Title**: Cycle: Self-Join + +**Description**: Test a cycle in a join of a logical view: self-join + +**Error expected?** Yes + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "newName" ; + rml:reference "name" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{newName}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "newName" ; + ] ; + ] . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0008c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0008c/mapping.ttl new file mode 100644 index 00000000..b238c10f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008c/mapping.ttl @@ -0,0 +1,43 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "newName" ; + rml:reference "name" ; + ] ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{newName}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "newName" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0008c/people.json b/src/test/resources/rml-lv/RMLLVTC0008c/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008c/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/config.js b/src/test/resources/rml-lv/config.js new file mode 100644 index 00000000..943d434e --- /dev/null +++ b/src/test/resources/rml-lv/config.js @@ -0,0 +1,86 @@ +async function loadTurtle() { + //this is the function you call in 'preProcess', to load the highlighter + const worker = await new Promise(resolve => { + require(["core/worker"], ({ worker }) => resolve(worker)); + }); + const action = "highlight-load-lang"; + const langURL = + "https://cdn.jsdelivr.net/gh/redmer/highlightjs-turtle/src/languages/turtle.js"; + const propName = "hljsDefineTurtle"; // This funtion is defined in the highlighter being loaded + const lang = "turtle"; // this is the class you use to identify the language + worker.postMessage({ action, langURL, propName, lang }); + return new Promise(resolve => { + worker.addEventListener("message", function listener({ data }) { + const { action: responseAction, lang: responseLang } = data; + if (responseAction === action && responseLang === lang) { + worker.removeEventListener("message", listener); + resolve(); + } + }); + }); +} + +var respecConfig = { + // check https://respec.org/docs/ for the meaning of these keys + preProcess: [loadTurtle], + authors: [ + { + name: "Pano Maria", + mailto: "pano@skemu.com", + url: "https://panomaria.com", + company: "Skemu", + companyURL: "https://skemu.com" + }, + { + name: "Els de Vleeschauwer", + mailto: "els.devleeschauwer@ugent.be", + company: "Ghent University – imec – IDLab", + orcidid: "0000-0002-8630-3947", + companyURL: "https://idlab.technology/" + } + ], + edDraftURI: "https://w3id.org/rml/lv/test-cases/", + editors: [ + { + name: "Pano Maria", + mailto: "pano@skemu.com", + url: "https://panomaria.com", + company: "Skemu", + companyURL: "https://skemu.com" + }, + { + name: "Els de Vleeschauwer", + mailto: "els.devleeschauwer@ugent.be", + company: "Ghent University – imec – IDLab", + orcidid: "0000-0002-8630-3947", + companyURL: "https://idlab.technology/" + } + ], + formerEditors: [ + ], + github: "https://github.com/kg-construct/rml-lv", + license: "w3c-software-doc", + localBiblio: { + "RML-Core": { + title: "RML-Core", + href: "https://w3id.org/rml/core/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "07 August 2024", + }, + "RML-IO": { + title: "RML-IO", + href: "https://w3id.org/rml/io/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "12 March 2024", + }, + }, + otherLinks: [], + shortName: "RML-LV-Testcases", + specStatus: "CG-DRAFT", + // W3C config + copyrightStart: "2024", + doJsonLd: true, + group: "kg-construct", +}; diff --git a/src/test/resources/rml-lv/descriptions.csv b/src/test/resources/rml-lv/descriptions.csv new file mode 100644 index 00000000..b7c64242 --- /dev/null +++ b/src/test/resources/rml-lv/descriptions.csv @@ -0,0 +1,41 @@ +RML ID,Title,Purpose,"Error +expected?","Input +1","Input +2","Input +3","Output +default","Output +1","Output +2","Output +3",Comment +RMLLVTC0000a,Logical view on JSON source,Test a view on a hierarchical source,no,people.json,,,output.nq,,,, +RMLLVTC0000b,Logical view on CSV source,Test a view on a tabular source,no,people.csv,,,output.nq,,,, +RMLLVTC0000c,Logical View on Logical View,Test a view on a logical view,no,people.json,,,output.nq,,,, +RMLLVTC0001a,Expression Field: Reference,Test a reference in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001b,Expression Field: Template,Test a template in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001c,Expression Field: Constant,Test a constant expression in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001d,Expression Field Siblings,Test multiple expression fields with the same parent,no,people.json,,,output.nq,,,, +RMLLVTC0002a,Iterable Field,Test a nested field construction: iterable field with expression field as child,no,people.json,,,output.nq,,,, +RMLLVTC0002b,Iterable Field with Multiple Children,Test a nested field construction: iterable field with mulitple expression fields as children,no,people.json,,,output.nq,,,, +RMLLVTC0002c,Nested Iterable Fields,Test a nested field construction: iterable field with an iterable field as child,no,people.json,,,output.nq,,,, +RMLLVTC0003a,Index Key: #,Test a reference to the index key #,no,people.json,,,output.nq,,,, +RMLLVTC0003b,Index Key: Iterable Field,Test a reference to the index key of an iterable field,no,people.json,,,output.nq,,,, +RMLLVTC0003c,Index Key: Expression field,Test a reference to the index key of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0004a,Natural Datatype: Index #,Test the natural datatype mapping for the index #,no,people.json,,,output.nq,,,, +RMLLVTC0004b,Natural Datatype: Index Expression Field,Test the natural datatype mapping for the index of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0004c,Natural Datatype: Index Iterable Field,Test the natural datatype mapping for the index of an iterable field,no,people.json,,,output.nq,,,, +RMLLVTC0004d,Natural Datatype: Record Expression Field,Test the natural datatype mapping for a record of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0005a,Referencing a Non-Existing Key,Test a reference to a non-existing key,yes,people.json,,,,,,, +RMLLVTC0005b,Referencing the Record Key ,Test a reference to the record key ,yes,people.json,,,,,,, +RMLLVTC0005c,Referencing the Record Key of an Iterable Field,Test a reference to the record key of an iterable field,yes,people.json,,,,,,, +RMLLVTC0006a,Left Join,Test a left join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0006b,Inner Join,Test an inner join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0006c,Two Left Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006d,Inner Join and Left Join,Test an inner join and a left join in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006e,Two Inner Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006f,Index Key of Field in Join,Test references to indexes of fields from a join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0007a,Change Reference Formulations: CSV including JSON array,Test a change of reference formulations: csv source including json array,no,people.csv,,,output.nq,,,, +RMLLVTC0007b,Change Reference Formulations: CSV including JSON object,Test a change of reference formulations: csv source including json object,no,people.csv,,,output.nq,,,, +RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of reference formulations: json source including csv data,no,people.json,,,output.nq,,,, +RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,yes,,,,,,,, +RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,yes,people.json,,,,,,, +RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,yes,people.json,people.csv,,,,,, \ No newline at end of file diff --git a/src/test/resources/rml-lv/dev.html b/src/test/resources/rml-lv/dev.html new file mode 100644 index 00000000..cb4a38a8 --- /dev/null +++ b/src/test/resources/rml-lv/dev.html @@ -0,0 +1,132 @@ + + + + + RML-LV: Test Cases + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/src/test/resources/rml-lv/docs/20250130/index.html b/src/test/resources/rml-lv/docs/20250130/index.html new file mode 100644 index 00000000..ac943f89 --- /dev/null +++ b/src/test/resources/rml-lv/docs/20250130/index.html @@ -0,0 +1,1742 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0001

+

Title: Expression Field

+

Description: Test expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/people/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/people/alice> <http://example.org/hasName> "alice" .
+<http://example.org/people/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0002

+

Title: Iterable Field

+

Description: Test nested expression field, with iterable field as parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

6. RMLLVTC0003

+

Title: Left Join

+

Description: Test left join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_type" ;
+      rml:reference "item.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_weight" ;
+      rml:reference "item.weight" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthyear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item_type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item_type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item_weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/alice> <http://example.org/hasBirthyear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/alice/item/sword> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasType> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/bob> <http://example.org/hasBirthyear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasType> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+<http://example.org/person/tobias> <http://example.org/hasBirthyear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

7. RMLLVTC0004

+

Title: Inner Join

+

Description: Test inner join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [ a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_type" ;
+      rml:reference "item.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_weight" ;
+      rml:reference "item.weight" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthyear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item_type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item_type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item_weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/alice> <http://example.org/hasBirthyear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/alice/item/sword> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasType> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/bob> <http://example.org/hasBirthyear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasType> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLLVTC0005

+

Title: Index

+

Description: Test references to index keys, including joins

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_type" ;
+      rml:reference "item.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_weight" ;
+      rml:reference "item.weight" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/people/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthyear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "item_{#}_{item_type.#}" ;
+    rml:termType rml:BlankNode ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item_type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item_weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/people/alice> <http://example.org/hasName> "alice" .
+<http://example.org/people/alice> <http://example.org/hasBirthyear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/people/alice> <http://example.org/hasItem> _:item_0_0 .
+<http://example.org/people/alice> <http://example.org/hasItem> _:item_0_1 .
+_:item_0_0 <http://example.org/hasType> "sword" .
+_:item_0_0 <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:item_0_1 <http://example.org/hasType> "shield" .
+_:item_0_1 <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/people/bob> <http://example.org/hasName> "bob" .
+<http://example.org/people/bob> <http://example.org/hasBirthyear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/people/bob> <http://example.org/hasItem> _:item_1_0 .
+_:item_1_0 <http://example.org/hasType> "flower" .
+_:item_1_0 <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

9. RMLLVTC0006

+

Title: Change Reference Formulations: CSV, including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

10. RMLLVTC0007

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

11. RMLLVTC0008

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

12. RMLLVTC0009

+

Title: Two Left Joins

+

Description: Test two left joins

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [ a
+    rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+  :additionalCsvSource a rml:LogicalSource ;
+    rml:source [
+      a rml:RelativePathSource , rml:Source ;
+      rml:root rml:MappingDirectory ;
+      rml:path "people2.csv" ;
+    ] ;
+    rml:referenceFormulation rml:CSV .
+
+  :additionalCsvView a rml:LogicalView ;
+    rml:viewOn :additionalCsvSource ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "name" ;
+      rml:reference "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "id" ;
+      rml:reference "id" ;
+    ] ;
+    .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_type" ;
+      rml:reference "item.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_weight" ;
+      rml:reference "item.weight" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/people/{id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthyear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item_type.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item_type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item_weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/people/123> <http://example.org/hasName> "alice" .
+<http://example.org/people/123> <http://example.org/hasBirthyear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/people/123> <http://example.org/hasItem> <http://example.org/item_0_0> .
+<http://example.org/people/123> <http://example.org/hasItem> <http://example.org/item_0_1> .
+<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/people/456> <http://example.org/hasName> "bob" .
+<http://example.org/people/456> <http://example.org/hasBirthyear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/people/456> <http://example.org/hasItem> <http://example.org/item_1_0> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/people/789> <http://example.org/hasName> "tobias" .
+<http://example.org/people/789> <http://example.org/hasBirthyear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/docs/20250204/index.html b/src/test/resources/rml-lv/docs/20250204/index.html new file mode 100644 index 00000000..8fa4666e --- /dev/null +++ b/src/test/resources/rml-lv/docs/20250204/index.html @@ -0,0 +1,1742 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-lv + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0001

+

Title: Expression Field

+

Description: Test expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/people/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/people/alice> <http://example.org/hasName> "alice" .
+<http://example.org/people/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0002

+

Title: Iterable Field

+

Description: Test nested expression field, with iterable field as parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

6. RMLLVTC0003

+

Title: Left Join

+

Description: Test left join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_type" ;
+      rml:reference "item.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_weight" ;
+      rml:reference "item.weight" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthyear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item_type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item_type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item_weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/alice> <http://example.org/hasBirthyear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/alice/item/sword> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasType> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/bob> <http://example.org/hasBirthyear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasType> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+<http://example.org/person/tobias> <http://example.org/hasBirthyear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

7. RMLLVTC0004

+

Title: Inner Join

+

Description: Test inner join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [ a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_type" ;
+      rml:reference "item.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_weight" ;
+      rml:reference "item.weight" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthyear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item_type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item_type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item_weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/alice> <http://example.org/hasBirthyear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/alice/item/sword> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasType> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/bob> <http://example.org/hasBirthyear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasType> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLLVTC0005

+

Title: Index

+

Description: Test references to index keys, including joins

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_type" ;
+      rml:reference "item.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_weight" ;
+      rml:reference "item.weight" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/people/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthyear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "item_{#}_{item_type.#}" ;
+    rml:termType rml:BlankNode ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item_type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item_weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/people/alice> <http://example.org/hasName> "alice" .
+<http://example.org/people/alice> <http://example.org/hasBirthyear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/people/alice> <http://example.org/hasItem> _:item_0_0 .
+<http://example.org/people/alice> <http://example.org/hasItem> _:item_0_1 .
+_:item_0_0 <http://example.org/hasType> "sword" .
+_:item_0_0 <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:item_0_1 <http://example.org/hasType> "shield" .
+_:item_0_1 <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/people/bob> <http://example.org/hasName> "bob" .
+<http://example.org/people/bob> <http://example.org/hasBirthyear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/people/bob> <http://example.org/hasItem> _:item_1_0 .
+_:item_1_0 <http://example.org/hasType> "flower" .
+_:item_1_0 <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

9. RMLLVTC0006

+

Title: Change Reference Formulations: CSV, including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

10. RMLLVTC0007

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

11. RMLLVTC0008

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

12. RMLLVTC0009

+

Title: Two Left Joins

+

Description: Test two left joins

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [ a
+    rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+  :additionalCsvSource a rml:LogicalSource ;
+    rml:source [
+      a rml:RelativePathSource , rml:Source ;
+      rml:root rml:MappingDirectory ;
+      rml:path "people2.csv" ;
+    ] ;
+    rml:referenceFormulation rml:CSV .
+
+  :additionalCsvView a rml:LogicalView ;
+    rml:viewOn :additionalCsvSource ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "name" ;
+      rml:reference "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "id" ;
+      rml:reference "id" ;
+    ] ;
+    .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_type" ;
+      rml:reference "item.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item_weight" ;
+      rml:reference "item.weight" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/people/{id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthyear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:parentTriplesMap :triplesMapItem ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item_type.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item_type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item_weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/people/123> <http://example.org/hasName> "alice" .
+<http://example.org/people/123> <http://example.org/hasBirthyear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/people/123> <http://example.org/hasItem> <http://example.org/item_0_0> .
+<http://example.org/people/123> <http://example.org/hasItem> <http://example.org/item_0_1> .
+<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/people/456> <http://example.org/hasName> "bob" .
+<http://example.org/people/456> <http://example.org/hasBirthyear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/people/456> <http://example.org/hasItem> <http://example.org/item_1_0> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/people/789> <http://example.org/hasName> "tobias" .
+<http://example.org/people/789> <http://example.org/hasBirthyear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/docs/20250216/index.html b/src/test/resources/rml-lv/docs/20250216/index.html new file mode 100644 index 00000000..3588dcc1 --- /dev/null +++ b/src/test/resources/rml-lv/docs/20250216/index.html @@ -0,0 +1,2142 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+ +
Authors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+
Feedback:
+ GitHub kg-construct/rml-lv + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0000a

+

Title: Logical view on JSON source

+

Description: Test a view on a hierarchical source

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0000b

+

Title: Logical view on CSV source

+

Description: Test a view on a tabular source

+

Error expected? No

+

Input

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+
+
+

6. RMLLVTC0000c

+

Title: Logical View on Logical View

+

Description: Test a view on a logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:jsonViewOnJsonView a rml:LogicalView ;
+  rml:viewOn :jsonView ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "newName" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonViewOnJsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

7. RMLLVTC0001a

+

Title: Expression Field: Reference

+

Description: Test a reference in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

8. RMLLVTC0001b

+

Title: Expression Field: Template

+

Description: Test a template in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "race" ;
+    rml:constant "human" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasRace ;
+    rml:objectMap [
+      rml:reference "race" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasRace> "human" .
+<http://example.org/person/bob> <http://example.org/hasRace> "human" .
+
+
+

9. RMLLVTC0001c

+

Title: Expression Field: Constant

+

Description: Test a constant expression in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "fullName" ;
+    rml:template "{name} {lastName}" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:reference "fullName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

10. RMLLVTC0001d

+

Title: Expression Field Siblings

+

Description: Test multiple expression fields with the same parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "lastName" ;
+    rml:reference "$.lastName" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:template "{name} {lastName}" ;
+      rml:termType rml:Literal ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

11. RMLLVTC0002a

+

Title: Iterable Field

+

Description: Test a nested field construction: iterable field with expression field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{item.type}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

12. RMLLVTC0002b

+

Title: Iterable Field with Multiple Children

+

Description: Test a nested field construction: iterable field with mulitple expression fields as children

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

13. RMLLVTC0002c

+

Title: Nested Iterable Fields

+

Description: Test a nested field construction: iterable field with an iterable field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "measures": {
+            "weight": 1500,
+            "length": 30
+          }
+        },
+        {
+          "type": "shield",
+          "measures": {
+            "weight": 2500
+          }
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "measures" : {
+            "weight": 15,
+            "length" : 15
+          }
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:IterableField ;
+      rml:fieldName "measures";
+      rml:iterator "$.measures";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+        ];
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "length" ;
+        rml:reference "$.length" ;
+      ]
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.measures.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

14. RMLLVTC0003a

+

Title: Index Key: #

+

Description: Test a reference to the index key #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

15. RMLLVTC0003b

+

Title: Index Key: Iterable Field

+

Description: Test a reference to the index key of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+
+

16. RMLLVTC0003c

+

Title: Index Key: Expression field

+

Description: Test a reference to the index key of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+

17. RMLLVTC0004a

+

Title: Natural Datatype: Index #

+

Description: Test the natural datatype mapping for the index #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

18. RMLLVTC0007a

+

Title: Change Reference Formulations: CSV including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Input

+
name,items
+alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]"
+bob,"[{""type"":""flower"",""weight"":15}]"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

19. RMLLVTC0007b

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Input

+
name,item
+alice,"{""type"":""sword"",""weight"":1500}"
+alice,"{""type"":""shield"",""weight"":2500}"
+bob,"{""type"":""flower"",""weight"":15}"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

20. RMLLVTC0007c

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

21. RMLLVTC0008a

+

Title: Cycle: Abstract Logical Source

+

Description: Test a cycle in the abstract logical source of a logical view

+

Error expected? Yes

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:view1 a rml:LogicalView ;
+  rml:viewOn :view2 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name1" ;
+    rml:reference "name2" ;
+  ] .
+
+:view2 a rml:LogicalView ;
+  rml:viewOn :view1 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name2" ;
+    rml:reference "name1" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :view2 ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name2}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name2" ;
+    ] ;
+  ] .
+
+
+

22. RMLLVTC0008b

+

Title: Cycle: Joins

+

Description: Test a cycle in two joins of two logical views

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :csvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv_birthyear" ;
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

23. RMLLVTC0008c

+

Title: Cycle: Self-Join

+

Description: Test a cycle in a join of a logical view: self-join

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "newName" ;
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/docs/20250228/index.html b/src/test/resources/rml-lv/docs/20250228/index.html new file mode 100644 index 00000000..f95999f8 --- /dev/null +++ b/src/test/resources/rml-lv/docs/20250228/index.html @@ -0,0 +1,3383 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+ +
Authors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+
Feedback:
+ GitHub kg-construct/rml-lv + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0000a

+

Title: Logical view on JSON source

+

Description: Test a view on a hierarchical source

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0000b

+

Title: Logical view on CSV source

+

Description: Test a view on a tabular source

+

Error expected? No

+

Input

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+
+
+

6. RMLLVTC0000c

+

Title: Logical View on Logical View

+

Description: Test a view on a logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:jsonViewOnJsonView a rml:LogicalView ;
+  rml:viewOn :jsonView ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "newName" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonViewOnJsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

7. RMLLVTC0001a

+

Title: Expression Field: Reference

+

Description: Test a reference in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

8. RMLLVTC0001b

+

Title: Expression Field: Template

+

Description: Test a template in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "race" ;
+    rml:constant "human" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasRace ;
+    rml:objectMap [
+      rml:reference "race" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasRace> "human" .
+<http://example.org/person/bob> <http://example.org/hasRace> "human" .
+
+
+

9. RMLLVTC0001c

+

Title: Expression Field: Constant

+

Description: Test a constant expression in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "fullName" ;
+    rml:template "{name} {lastName}" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:reference "fullName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

10. RMLLVTC0001d

+

Title: Expression Field Siblings

+

Description: Test multiple expression fields with the same parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "lastName" ;
+    rml:reference "$.lastName" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:template "{name} {lastName}" ;
+      rml:termType rml:Literal ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

11. RMLLVTC0002a

+

Title: Iterable Field

+

Description: Test a nested field construction: iterable field with expression field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{item.type}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

12. RMLLVTC0002b

+

Title: Iterable Field with Multiple Children

+

Description: Test a nested field construction: iterable field with mulitple expression fields as children

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

13. RMLLVTC0002c

+

Title: Nested Iterable Fields

+

Description: Test a nested field construction: iterable field with an iterable field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "measures": {
+            "weight": 1500,
+            "length": 30
+          }
+        },
+        {
+          "type": "shield",
+          "measures": {
+            "weight": 2500
+          }
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "measures" : {
+            "weight": 15,
+            "length" : 15
+          }
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:IterableField ;
+      rml:fieldName "measures";
+      rml:iterator "$.measures";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+        ];
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "length" ;
+        rml:reference "$.length" ;
+      ]
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.measures.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

14. RMLLVTC0003a

+

Title: Index Key: #

+

Description: Test a reference to the index key #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

15. RMLLVTC0003b

+

Title: Index Key: Iterable Field

+

Description: Test a reference to the index key of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+
+

16. RMLLVTC0003c

+

Title: Index Key: Expression field

+

Description: Test a reference to the index key of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+

17. RMLLVTC0004a

+

Title: Natural Datatype: Index #

+

Description: Test the natural datatype mapping for the index #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

18. RMLLVTC0004b

+

Title: Natural Datatype: Index Expression Field

+

Description: Test the natural datatype mapping for the index of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

19. RMLLVTC0004c

+

Title: Natural Datatype: Index Iterable Field

+

Description: Test the natural datatype mapping for the index of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

20. RMLLVTC0004d

+

Title: Natural Datatype: Record Expression Field

+

Description: Test the natural datatype mapping for a record of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "birth_year": 1995
+    },
+    {
+      "name": "bob",
+      "birth_year": 1999
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "$.birth_year" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

21. RMLLVTC0005a

+

Title: Referencing a Non-Existing Key

+

Description: Test a reference to a non-existing key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{Name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "Name" ;
+    ] ;
+  ] .
+
+
+

22. RMLLVTC0005b

+

Title: Referencing the Record Key

+

Description: Test a reference to the record key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :isDerivedFrom ;
+    rml:objectMap [
+      rml:reference "<it>" ;
+    ] ;
+  ] .
+
+
+

23. RMLLVTC0005c

+

Title: Referencing the Record Key of an Iterable Field

+

Description: Test a reference to the record key of an iterable field

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/{item}" ;
+    ] ;
+  ] .
+
+
+

24. RMLLVTC0006a

+

Title: Left Join

+

Description: Test a left join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

25. RMLLVTC0006b

+

Title: Inner Join

+

Description: Test an inner join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

26. RMLLVTC0006c

+

Title: Two Left Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+<http://example.org/person/789> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

27. RMLLVTC0006d

+

Title: Inner Join and Left Join

+

Description: Test an inner join and a left join in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+
+
+

28. RMLLVTC0006e

+

Title: Two Inner Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+
+
+

29. RMLLVTC0006f

+

Title: Index Key of Field in Join

+

Description: Test references to indexes of fields from a join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+tobias,2005
+bob,1999
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{#}/item/{json_item.#}/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/0> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/0/sword> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/1/shield> .
+<http://example.org/person/2> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/2> <http://example.org/hasItem> <http://example.org/person/2/item/0/flower> .
+
+
+
+

30. RMLLVTC0007a

+

Title: Change Reference Formulations: CSV including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Input

+
name,items
+alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]"
+bob,"[{""type"":""flower"",""weight"":15}]"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

31. RMLLVTC0007b

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Input

+
name,item
+alice,"{""type"":""sword"",""weight"":1500}"
+alice,"{""type"":""shield"",""weight"":2500}"
+bob,"{""type"":""flower"",""weight"":15}"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

32. RMLLVTC0007c

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

33. RMLLVTC0008a

+

Title: Cycle: Abstract Logical Source

+

Description: Test a cycle in the abstract logical source of a logical view

+

Error expected? Yes

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:view1 a rml:LogicalView ;
+  rml:viewOn :view2 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name1" ;
+    rml:reference "name2" ;
+  ] .
+
+:view2 a rml:LogicalView ;
+  rml:viewOn :view1 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name2" ;
+    rml:reference "name1" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :view2 ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name2}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name2" ;
+    ] ;
+  ] .
+
+
+

34. RMLLVTC0008b

+

Title: Cycle: Joins

+

Description: Test a cycle in two joins of two logical views

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :csvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv_birthyear" ;
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

35. RMLLVTC0008c

+

Title: Cycle: Self-Join

+

Description: Test a cycle in a join of a logical view: self-join

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "newName" ;
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/docs/index.html b/src/test/resources/rml-lv/docs/index.html new file mode 100644 index 00000000..f95999f8 --- /dev/null +++ b/src/test/resources/rml-lv/docs/index.html @@ -0,0 +1,3383 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+ +
Authors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+
Feedback:
+ GitHub kg-construct/rml-lv + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0000a

+

Title: Logical view on JSON source

+

Description: Test a view on a hierarchical source

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0000b

+

Title: Logical view on CSV source

+

Description: Test a view on a tabular source

+

Error expected? No

+

Input

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+
+
+

6. RMLLVTC0000c

+

Title: Logical View on Logical View

+

Description: Test a view on a logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:jsonViewOnJsonView a rml:LogicalView ;
+  rml:viewOn :jsonView ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "newName" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonViewOnJsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

7. RMLLVTC0001a

+

Title: Expression Field: Reference

+

Description: Test a reference in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

8. RMLLVTC0001b

+

Title: Expression Field: Template

+

Description: Test a template in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "race" ;
+    rml:constant "human" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasRace ;
+    rml:objectMap [
+      rml:reference "race" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasRace> "human" .
+<http://example.org/person/bob> <http://example.org/hasRace> "human" .
+
+
+

9. RMLLVTC0001c

+

Title: Expression Field: Constant

+

Description: Test a constant expression in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "fullName" ;
+    rml:template "{name} {lastName}" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:reference "fullName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

10. RMLLVTC0001d

+

Title: Expression Field Siblings

+

Description: Test multiple expression fields with the same parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "lastName" ;
+    rml:reference "$.lastName" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:template "{name} {lastName}" ;
+      rml:termType rml:Literal ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

11. RMLLVTC0002a

+

Title: Iterable Field

+

Description: Test a nested field construction: iterable field with expression field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{item.type}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

12. RMLLVTC0002b

+

Title: Iterable Field with Multiple Children

+

Description: Test a nested field construction: iterable field with mulitple expression fields as children

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

13. RMLLVTC0002c

+

Title: Nested Iterable Fields

+

Description: Test a nested field construction: iterable field with an iterable field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "measures": {
+            "weight": 1500,
+            "length": 30
+          }
+        },
+        {
+          "type": "shield",
+          "measures": {
+            "weight": 2500
+          }
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "measures" : {
+            "weight": 15,
+            "length" : 15
+          }
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:IterableField ;
+      rml:fieldName "measures";
+      rml:iterator "$.measures";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+        ];
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "length" ;
+        rml:reference "$.length" ;
+      ]
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.measures.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

14. RMLLVTC0003a

+

Title: Index Key: #

+

Description: Test a reference to the index key #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

15. RMLLVTC0003b

+

Title: Index Key: Iterable Field

+

Description: Test a reference to the index key of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+
+

16. RMLLVTC0003c

+

Title: Index Key: Expression field

+

Description: Test a reference to the index key of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+

17. RMLLVTC0004a

+

Title: Natural Datatype: Index #

+

Description: Test the natural datatype mapping for the index #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

18. RMLLVTC0004b

+

Title: Natural Datatype: Index Expression Field

+

Description: Test the natural datatype mapping for the index of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

19. RMLLVTC0004c

+

Title: Natural Datatype: Index Iterable Field

+

Description: Test the natural datatype mapping for the index of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

20. RMLLVTC0004d

+

Title: Natural Datatype: Record Expression Field

+

Description: Test the natural datatype mapping for a record of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "birth_year": 1995
+    },
+    {
+      "name": "bob",
+      "birth_year": 1999
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "$.birth_year" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

21. RMLLVTC0005a

+

Title: Referencing a Non-Existing Key

+

Description: Test a reference to a non-existing key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{Name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "Name" ;
+    ] ;
+  ] .
+
+
+

22. RMLLVTC0005b

+

Title: Referencing the Record Key

+

Description: Test a reference to the record key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :isDerivedFrom ;
+    rml:objectMap [
+      rml:reference "<it>" ;
+    ] ;
+  ] .
+
+
+

23. RMLLVTC0005c

+

Title: Referencing the Record Key of an Iterable Field

+

Description: Test a reference to the record key of an iterable field

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/{item}" ;
+    ] ;
+  ] .
+
+
+

24. RMLLVTC0006a

+

Title: Left Join

+

Description: Test a left join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

25. RMLLVTC0006b

+

Title: Inner Join

+

Description: Test an inner join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

26. RMLLVTC0006c

+

Title: Two Left Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+<http://example.org/person/789> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

27. RMLLVTC0006d

+

Title: Inner Join and Left Join

+

Description: Test an inner join and a left join in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+
+
+

28. RMLLVTC0006e

+

Title: Two Inner Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+
+
+

29. RMLLVTC0006f

+

Title: Index Key of Field in Join

+

Description: Test references to indexes of fields from a join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+tobias,2005
+bob,1999
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{#}/item/{json_item.#}/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/0> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/0/sword> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/1/shield> .
+<http://example.org/person/2> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/2> <http://example.org/hasItem> <http://example.org/person/2/item/0/flower> .
+
+
+
+

30. RMLLVTC0007a

+

Title: Change Reference Formulations: CSV including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Input

+
name,items
+alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]"
+bob,"[{""type"":""flower"",""weight"":15}]"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

31. RMLLVTC0007b

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Input

+
name,item
+alice,"{""type"":""sword"",""weight"":1500}"
+alice,"{""type"":""shield"",""weight"":2500}"
+bob,"{""type"":""flower"",""weight"":15}"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

32. RMLLVTC0007c

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

33. RMLLVTC0008a

+

Title: Cycle: Abstract Logical Source

+

Description: Test a cycle in the abstract logical source of a logical view

+

Error expected? Yes

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:view1 a rml:LogicalView ;
+  rml:viewOn :view2 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name1" ;
+    rml:reference "name2" ;
+  ] .
+
+:view2 a rml:LogicalView ;
+  rml:viewOn :view1 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name2" ;
+    rml:reference "name1" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :view2 ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name2}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name2" ;
+    ] ;
+  ] .
+
+
+

34. RMLLVTC0008b

+

Title: Cycle: Joins

+

Description: Test a cycle in two joins of two logical views

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :csvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv_birthyear" ;
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

35. RMLLVTC0008c

+

Title: Cycle: Self-Join

+

Description: Test a cycle in a join of a logical view: self-join

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "newName" ;
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/list.sh b/src/test/resources/rml-lv/list.sh new file mode 100644 index 00000000..12c32031 --- /dev/null +++ b/src/test/resources/rml-lv/list.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for i in RML*; do + echo "
" +done diff --git a/src/test/resources/rml-lv/make-metadata.py b/src/test/resources/rml-lv/make-metadata.py new file mode 100644 index 00000000..27899859 --- /dev/null +++ b/src/test/resources/rml-lv/make-metadata.py @@ -0,0 +1,148 @@ +#!/usr/bin/env python3 + +import os +import sys +import glob +import csv + +def get_title_description(testcase: str): + with open ('descriptions.csv') as csvfile: + reader = csv.reader(csvfile) + for row in reader: + if row[0] == testcase: + return row[1], row[2] + +def main(spec: str): + with open ('metadata.csv', 'w') as csvfile: + writer = csv.writer(csvfile) + writer.writerow(['ID', 'title', 'description', 'specification', + 'mapping', 'input_format1', 'input_format2', + 'input_format3', 'output_format1', 'output_format2', + 'output_format3', 'input1', 'input2', 'input3', + 'output1', 'output2', 'output3', 'error']) + for testcase in glob.glob('RML*'): + print(testcase) + title, description = get_title_description(testcase) + error = 'false' + input1 = '' + input2 = '' + input3 = '' + input_format1 = '' + input_format2 = '' + input_format3 = '' + output1 = '' + output2 = '' + output3 = '' + output_format1 = '' + output_format2 = '' + output_format3 = '' + + # Input file + if os.path.exists(os.path.join(testcase, 'people.json')): + input1 = 'people.json' + input_format1 = 'application/json' + + if os.path.exists(os.path.join(testcase, 'people.csv')): + if input1 == '': + input1 = 'people.csv' + input_format1 = 'text/csv' + else: + input2 = 'people.csv' + input_format2 = 'text/csv' + + if os.path.exists(os.path.join(testcase, 'people2.csv')): + input3 = 'people2.csv' + input_format3 = 'text/csv' + + # Mapping file + if os.path.exists(os.path.join(testcase, 'mapping.ttl')): + mapping_file = 'mapping.ttl' + else: + raise ValueError('Mapping file missing!') + + # Output files + if os.path.exists(os.path.join(testcase, 'output.nq')): + output1 = 'output.nq' + output_format1 = 'application/n-quads' + else: + error = 'true' + + writer.writerow([testcase, title, description, spec, mapping_file, + input_format1, input_format2, input_format3, + output_format1, output_format2, output_format3, + input1, input2, input3, output1, output2, + output3, error]) + lines = [] + # Title and description + lines.append(f'## {testcase}\n\n') + lines.append(f'**Title**: {title}\n\n') + lines.append(f'**Description**: {description}\n\n') + if error == 'true': + error_html = 'Yes' + else: + error_html = 'No' + lines.append(f'**Error expected?** {error_html}\n\n') + + # Input + inputCount = '' + + for index, i in enumerate([input1, input2, input3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + input_html = f'**Input{inputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + input_html = f'**Input{inputCount}**\n `{i}`\n\n' + + lines.append(input_html) + inputCount = f' {index + 1}' + + # Mapping + with open(os.path.join(testcase, mapping_file)) as f: + mapping_html = f'**Mapping**\n```\n{f.read()}\n```\n\n' + lines.append(mapping_html) + + # Output + outputCount = '' + if output2 or output3: + outputCount = ' 1' + + for index, i in enumerate([output1, output2, output3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + output_html = f'**Output{outputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + output_html = f'**Output{outputCount}**\n `{i}`\n\n' + + lines.append(output_html) + outputCount = f' {index + 2}' + + + with open(os.path.join(testcase, 'README.md'), 'w') as f: + f.writelines(lines) + + +if __name__ == '__main__': + if len(sys.argv) != 2: + print('Usage: ./make-metadata.py ') + sys.exit(1) + main(sys.argv[1]) diff --git a/src/test/resources/rml-lv/manifest.rml.ttl b/src/test/resources/rml-lv/manifest.rml.ttl new file mode 100644 index 00000000..7e92bc26 --- /dev/null +++ b/src/test/resources/rml-lv/manifest.rml.ttl @@ -0,0 +1,267 @@ +@prefix xsd: . +@prefix dcterms: . +@prefix rml: . +@prefix rmltest: . +@prefix test: . +@base . + +# java -jar .\burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/lv/test/ + +_:source + rml:source [ + a rml:RelativePathSource ; + rml:path "metadata.csv" ; + rml:null ""; + ]; + rml:referenceFormulation rml:CSV; +. + +<#TriplesMapTestcase> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:reference "ID"; + rml:class test:TestCase; + ]; + + rml:predicateObjectMap [ + rml:predicate dcterms:identifier; + rml:objectMap [ + rml:reference "ID"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:hasError; + rml:objectMap [ + rml:reference "error"; + rml:datatype xsd:boolean; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:mappingDocument; + rml:objectMap [ + rml:reference "mapping"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; +. + +<#TriplesMapInput1> + a rml:TriplesMap; + + rml:logicalSource _:source ; + + rml:subjectMap [ + rml:template "{ID}/input/{input1}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format1"; + ]; + ]; +. + +<#TriplesMapInput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input2}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format2"; + ]; + ]; +. + +<#TriplesMapInput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input3}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format3"; + ]; + ]; +. + +<#TriplesMapOutput1> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output1}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format1"; + ]; + ]; +. + +<#TriplesMapOutput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output2}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format2"; + ]; + ]; +. + +<#TriplesMapOutput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output3}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format3"; + ]; + ]; +. + diff --git a/src/test/resources/rml-lv/manifest.ttl b/src/test/resources/rml-lv/manifest.ttl new file mode 100644 index 00000000..db368700 --- /dev/null +++ b/src/test/resources/rml-lv/manifest.ttl @@ -0,0 +1,400 @@ + "people.csv" . + "text/csv" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + . + "mapping.ttl" . + "RMLLVTC0008c" . + "true"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0001d" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0004b" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0000a" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + . + . + . + . + "mapping.ttl" . + "RMLLVTC0006c" . + "false"^^ . + . + "people.csv" . + "text/csv" . + . + "output.nq" . + "application/n-quads" . + . + . + . + "mapping.ttl" . + "RMLLVTC0002b" . + "false"^^ . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + . + . + "mapping.ttl" . + "RMLLVTC0004c" . + "false"^^ . + . + "people.csv" . + "text/csv" . + . + . + . + "mapping.ttl" . + "RMLLVTC0007a" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0000b" . + "false"^^ . + . + "people.json" . + "application/json" . + . + "people2.csv" . + "text/csv" . + . + "output.nq" . + "application/n-quads" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + . + . + . + . + "mapping.ttl" . + "RMLLVTC0006d" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + . + . + "mapping.ttl" . + "RMLLVTC0002c" . + "false"^^ . + . + . + "mapping.ttl" . + "RMLLVTC0005a" . + "true"^^ . + . + "people.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "people.json" . + "application/json" . + . + . + . + "mapping.ttl" . + "RMLLVTC0004d" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0007b" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + . + . + "mapping.ttl" . + "RMLLVTC0000c" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0003a" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + . + . + . + . + "mapping.ttl" . + "RMLLVTC0006e" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "people.csv" . + "text/csv" . + . + . + "mapping.ttl" . + "RMLLVTC0005b" . + "true"^^ . + . + "people.json" . + "application/json" . + . + . + . + "mapping.ttl" . + "RMLLVTC0001a" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0007c" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + "people.csv" . + "text/csv" . + . + . + . + "mapping.ttl" . + "RMLLVTC0003b" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "people2.csv" . + "text/csv" . + . + "people.json" . + "application/json" . + . + . + . + . + "mapping.ttl" . + "RMLLVTC0006f" . + "false"^^ . + . + "people.csv" . + "text/csv" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + . + "mapping.ttl" . + "RMLLVTC0005c" . + "true"^^ . + . + "mapping.ttl" . + "RMLLVTC0008a" . + "true"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0001b" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "people.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "people.json" . + "application/json" . + . + "people.csv" . + "text/csv" . + . + "people.json" . + "application/json" . + . + . + . + "mapping.ttl" . + "RMLLVTC0003c" . + "false"^^ . + . + . + . + . + "mapping.ttl" . + "RMLLVTC0006a" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "people2.csv" . + "text/csv" . + . + "people.csv" . + "text/csv" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + . + . + . + "mapping.ttl" . + "RMLLVTC0008b" . + "false"^^ . + . + "people.csv" . + "text/csv" . + . + . + . + "mapping.ttl" . + "RMLLVTC0001c" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0004a" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "people.csv" . + "text/csv" . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . + "people.json" . + "application/json" . + . + "people.json" . + "application/json" . + . + "output.nq" . + "application/n-quads" . + . + . + . + . + "mapping.ttl" . + "RMLLVTC0006b" . + "false"^^ . + . + . + . + "mapping.ttl" . + "RMLLVTC0002a" . + "false"^^ . + . + "output.nq" . + "application/n-quads" . + . + "output.nq" . + "application/n-quads" . + . diff --git a/src/test/resources/rml-lv/metadata.csv b/src/test/resources/rml-lv/metadata.csv new file mode 100644 index 00000000..9af26f60 --- /dev/null +++ b/src/test/resources/rml-lv/metadata.csv @@ -0,0 +1,33 @@ +ID,title,description,specification,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error +RMLLVTC0000a,Logical view on JSON source,Test a view on a hierarchical source,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0000b,Logical view on CSV source,Test a view on a tabular source,http://w3id.org/rml/lv/,mapping.ttl,text/csv,,,application/n-quads,,,people.csv,,,output.nq,,,false +RMLLVTC0000c,Logical View on Logical View,Test a view on a logical view,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0001a,Expression Field: Reference,Test a reference in an expression field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0001b,Expression Field: Template,Test a template in an expression field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0001c,Expression Field: Constant,Test a constant expression in an expression field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0001d,Expression Field Siblings,Test multiple expression fields with the same parent,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0002a,Iterable Field,Test a nested field construction: iterable field with expression field as child,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0002b,Iterable Field with Multiple Children,Test a nested field construction: iterable field with mulitple expression fields as children,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0002c,Nested Iterable Fields,Test a nested field construction: iterable field with an iterable field as child,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0003a,Index Key: #,Test a reference to the index key #,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0003b,Index Key: Iterable Field,Test a reference to the index key of an iterable field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0003c,Index Key: Expression field,Test a reference to the index key of an expression field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0004a,Natural Datatype: Index #,Test the natural datatype mapping for the index #,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0004b,Natural Datatype: Index Expression Field,Test the natural datatype mapping for the index of an expression field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0004c,Natural Datatype: Index Iterable Field,Test the natural datatype mapping for the index of an iterable field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0004d,Natural Datatype: Record Expression Field,Test the natural datatype mapping for a record of an expression field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0005a,Referencing a Non-Existing Key,Test a reference to a non-existing key,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,,,,people.json,,,,,,true +RMLLVTC0005b,Referencing the Record Key ,Test a reference to the record key ,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,,,,people.json,,,,,,true +RMLLVTC0005c,Referencing the Record Key of an Iterable Field,Test a reference to the record key of an iterable field,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,,,,people.json,,,,,,true +RMLLVTC0006a,Left Join,Test a left join,http://w3id.org/rml/lv/,mapping.ttl,application/json,text/csv,,application/n-quads,,,people.json,people.csv,,output.nq,,,false +RMLLVTC0006b,Inner Join,Test an inner join,http://w3id.org/rml/lv/,mapping.ttl,application/json,text/csv,,application/n-quads,,,people.json,people.csv,,output.nq,,,false +RMLLVTC0006c,Two Left Joins,Test two left joins in one logical view,http://w3id.org/rml/lv/,mapping.ttl,application/json,text/csv,text/csv,application/n-quads,,,people.json,people.csv,people2.csv,output.nq,,,false +RMLLVTC0006d,Inner Join and Left Join,Test an inner join and a left join in one logical view,http://w3id.org/rml/lv/,mapping.ttl,application/json,text/csv,text/csv,application/n-quads,,,people.json,people.csv,people2.csv,output.nq,,,false +RMLLVTC0006e,Two Inner Joins,Test two left joins in one logical view,http://w3id.org/rml/lv/,mapping.ttl,application/json,text/csv,text/csv,application/n-quads,,,people.json,people.csv,people2.csv,output.nq,,,false +RMLLVTC0006f,Index Key of Field in Join,Test references to indexes of fields from a join,http://w3id.org/rml/lv/,mapping.ttl,application/json,text/csv,,application/n-quads,,,people.json,people.csv,,output.nq,,,false +RMLLVTC0007a,Change Reference Formulations: CSV including JSON array,Test a change of reference formulations: csv source including json array,http://w3id.org/rml/lv/,mapping.ttl,text/csv,,,application/n-quads,,,people.csv,,,output.nq,,,false +RMLLVTC0007b,Change Reference Formulations: CSV including JSON object,Test a change of reference formulations: csv source including json object,http://w3id.org/rml/lv/,mapping.ttl,text/csv,,,application/n-quads,,,people.csv,,,output.nq,,,false +RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of reference formulations: json source including csv data,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,application/n-quads,,,people.json,,,output.nq,,,false +RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,http://w3id.org/rml/lv/,mapping.ttl,,,,,,,,,,,,,true +RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,http://w3id.org/rml/lv/,mapping.ttl,application/json,text/csv,,application/n-quads,,,people.json,people.csv,,output.nq,,,false +RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,,,,people.json,,,,,,true diff --git a/src/test/resources/rml-lv/section/abstract.md b/src/test/resources/rml-lv/section/abstract.md new file mode 100644 index 00000000..97a2cd6c --- /dev/null +++ b/src/test/resources/rml-lv/section/abstract.md @@ -0,0 +1 @@ +This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools. diff --git a/src/test/resources/rml-lv/section/data-model.md b/src/test/resources/rml-lv/section/data-model.md new file mode 100644 index 00000000..f4c3ad6a --- /dev/null +++ b/src/test/resources/rml-lv/section/data-model.md @@ -0,0 +1,12 @@ +# Data model + +The test cases are semantically described for re-usability and shareability following the [W3C Test case description](https://www.w3.org/2006/03/test-description). +Each `test:Testcase` as the following properties: + +- `dcterms:identifier`: unique ID of the test case. +- `rmltest:hasError`: if an error of the RML Processor is expected or not. +- `rmltest:input`: One or more input data of the test case. +- `rmltest:output`: One or more output data of the test case. +- `rmltest:inputFormat`: the input data format. +- `rmltest:outputFormat`: the output data format. +- `rmltest:mappingDocument`: the RML mapping rules in Turtle. diff --git a/src/test/resources/rml-lv/section/introduction.md b/src/test/resources/rml-lv/section/introduction.md new file mode 100644 index 00000000..f19d17bd --- /dev/null +++ b/src/test/resources/rml-lv/section/introduction.md @@ -0,0 +1,4 @@ +# Introduction + +This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification. diff --git a/src/test/resources/rml-lv/section/test-cases.md b/src/test/resources/rml-lv/section/test-cases.md new file mode 100644 index 00000000..4efe6d74 --- /dev/null +++ b/src/test/resources/rml-lv/section/test-cases.md @@ -0,0 +1,10 @@ +# Test cases + +This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on [GitHub](https://github.com/kg-construct/rml-lv/tree/main/test-cases) in the folder `test-cases`. +Each test case is contained in a single folder, containing three types of files: + + - Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server. + - One file with the RML rules, called `mapping.ttl`, in the Turtle format. + - Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error. + diff --git a/src/test/resources/rml-star/RMLSTARTC001a/README.md b/src/test/resources/rml-star/RMLSTARTC001a/README.md new file mode 100644 index 00000000..5d5bc204 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC001a/README.md @@ -0,0 +1,66 @@ +## RMLSTARTC001a + +**Title**: quoted triple in subject, one source, blank node in quoted subject + +**Description**: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from one file + +**Error expected?** No + +**Input** +``` +c1,c2,c3 +b0,o,ABC +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:reference "c1" ; + rml:termType rml:BlankNode + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c3" + ] + ] . + +``` + +**Output** +``` +_:b0 . +<< _:b0 >> "ABC" . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC001b/README.md b/src/test/resources/rml-star/RMLSTARTC001b/README.md new file mode 100644 index 00000000..d75d03d0 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC001b/README.md @@ -0,0 +1,78 @@ +## RMLSTARTC001b + +**Title**: quoted triple in subject, two sources, blank node in quoted subject + +**Description**: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from two files + +**Error expected?** No + +**Input** +``` +c1-1,c1-2,c1-3 +b0,o,1 + +``` + +**Input 1** +``` +c2-1,c2-2 +ABC,1 + +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:reference "c1-1" ; + rml:termType rml:BlankNode + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-3" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c2-1" + ] + ] . + +``` + +**Output** +``` +_:b0 . +<< _:b0 >> "ABC" . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC002a/README.md b/src/test/resources/rml-star/RMLSTARTC002a/README.md new file mode 100644 index 00000000..7421560e --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC002a/README.md @@ -0,0 +1,68 @@ +## RMLSTARTC002a + +**Title**: quoted triple in subject, one source, blank node in quoted object + +**Description**: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from one file + +**Error expected?** No + +**Input** +``` +c1,c2,c3 +s,b1,456 +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix xsd: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:reference "c2" ; + rml:termType rml:BlankNode + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c3"; + rml:datatype xsd:integer + ] + ] . + +``` + +**Output** +``` + _:b1 . +<< _:b1 >> "456"^^ . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC002b/README.md b/src/test/resources/rml-star/RMLSTARTC002b/README.md new file mode 100644 index 00000000..b59c964b --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC002b/README.md @@ -0,0 +1,80 @@ +## RMLSTARTC002b + +**Title**: quoted triple in subject, two sources, blank node in quoted object + +**Description**: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from two files + +**Error expected?** No + +**Input** +``` +c1-1,c1-2,c1-3 +s,b1,1 + +``` + +**Input 1** +``` +c2-1,c2-2 +456,1 + +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix xsd: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:reference "c1-2" ; + rml:termType rml:BlankNode + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-3" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c2-1"; + rml:datatype xsd:integer + ] + ] . + +``` + +**Output** +``` + _:b1 . +<< _:b1 >> "456"^^ . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC003a/README.md b/src/test/resources/rml-star/RMLSTARTC003a/README.md new file mode 100644 index 00000000..43f16aec --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC003a/README.md @@ -0,0 +1,85 @@ +## RMLSTARTC003a + +**Title**: two-level quoted triple in subject, one source + +**Description**: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from one file + +**Error expected?** No + +**Input** +``` +c1,c2,c3,c4 +s,o,z,1 +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:r ; + rml:objectMap [ + rml:template "http://example/{c3}" + ] + ] . + +:thirdTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :secondTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c4" ; + rml:datatype xsd:integer + ] + ] . + +``` + +**Output** +``` + . +<< >> . +<< << >> >> "1"^^ . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC003b/README.md b/src/test/resources/rml-star/RMLSTARTC003b/README.md new file mode 100644 index 00000000..e9fe709b --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC003b/README.md @@ -0,0 +1,97 @@ +## RMLSTARTC003b + +**Title**: two-level quoted triple in subject, two sources + +**Description**: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from two files + +**Error expected?** No + +**Input** +``` +c1-1,c1-2,c1-3,c1-4 +s,o,z,1 + +``` + +**Input 1** +``` +c2-1,c2-2 +1,1 + +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:r ; + rml:objectMap [ + rml:template "http://example/{c1-3}" + ] + ] . + +:thirdTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :secondTM; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-4" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c2-1" ; + rml:datatype xsd:integer + ] + ] . + +``` + +**Output** +``` + . +<< >> . +<< << >> >> "1"^^ . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC004a/README.md b/src/test/resources/rml-star/RMLSTARTC004a/README.md new file mode 100644 index 00000000..59274195 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC004a/README.md @@ -0,0 +1,84 @@ +## RMLSTARTC004a + +**Title**: two-level quoted triple in subject and object, one source + +**Description**: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from one file + +**Error expected?** No + +**Input** +``` +c1,c2,c3,c4 +s,o,a,z +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:quotedTriplesMap :firstTM + ] + ] . + +:thirdTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :secondTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:r ; + rml:objectMap [ + rml:template "http://example/{c4}" + ] + ] . + +``` + +**Output** +``` + . + << >> . +<< << >> >> . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC004b/README.md b/src/test/resources/rml-star/RMLSTARTC004b/README.md new file mode 100644 index 00000000..4fbfb2b0 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC004b/README.md @@ -0,0 +1,96 @@ +## RMLSTARTC004b + +**Title**: two-level quoted triple in subject and object, two sources + +**Description**: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from two sources + +**Error expected?** No + +**Input** +``` +c1-1,c1-2,c1-3,c1-4 +s,o,a,1 + +``` + +**Input 1** +``` +c2-1,c2-2 +z,1 + +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:quotedTriplesMap :firstTM + ] + ] . + +:thirdTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :secondTM; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-4" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:r ; + rml:objectMap [ + rml:template "http://example/{c2-1}" + ] + ] . + +``` + +**Output** +``` + . + << >> . +<< << >> >> . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC005a/README.md b/src/test/resources/rml-star/RMLSTARTC005a/README.md new file mode 100644 index 00000000..c51def6c --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC005a/README.md @@ -0,0 +1,65 @@ +## RMLSTARTC005a + +**Title**: non-asserted quoted triple in subject, one source + +**Description**: Tests the creation of a non-asserted quoted triple in the position of subject with data from one file + +**Error expected?** No + +**Input** +``` +c1,c2,c3 +s,o,z +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:template "http://example/{c3}" + ] + ] . + +``` + +**Output** +``` +<< >> . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC005b/README.md b/src/test/resources/rml-star/RMLSTARTC005b/README.md new file mode 100644 index 00000000..01b7971c --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC005b/README.md @@ -0,0 +1,77 @@ +## RMLSTARTC005b + +**Title**: non-asserted quoted triple in subject, two sources + +**Description**: Tests the creation of a non-asserted quoted triple in the position of subject with data from two files + +**Error expected?** No + +**Input** +``` +c1-1,c1-2,c1-3 +s,o,1 + +``` + +**Input 1** +``` +c2-1,c2-2 +z,1 + +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-3" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:template "http://example/{c2-1}" + ] + ] . + +``` + +**Output** +``` +<< >> . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC006a/README.md b/src/test/resources/rml-star/RMLSTARTC006a/README.md new file mode 100644 index 00000000..ae58fa3b --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC006a/README.md @@ -0,0 +1,65 @@ +## RMLSTARTC006a + +**Title**: non-asserted quoted triple in object, one source + +**Description**: Tests the creation of a non-asserted quoted triple in the position of object with data from one file + +**Error expected?** No + +**Input** +``` +c1,c2,c3 +s,o,x +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p; ; + rml:objectMap [ + rml:quotedTriplesMap :firstTM + ] + ] . + +``` + +**Output** +``` + << >> . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC006b/README.md b/src/test/resources/rml-star/RMLSTARTC006b/README.md new file mode 100644 index 00000000..5b297461 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC006b/README.md @@ -0,0 +1,77 @@ +## RMLSTARTC006b + +**Title**: non-asserted quoted triple in object, two sources + +**Description**: Tests the creation of a non-asserted quoted triple in the position of object with data from two files + +**Error expected?** No + +**Input** +``` +c1-1,c1-2,c1-3 +s,o,1 + +``` + +**Input 1** +``` +c2-1,c2-2 +x,1 + +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p; ; + rml:objectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-3" ; + ]; + ] + ] . + +``` + +**Output** +``` + << >> . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC007a/README.md b/src/test/resources/rml-star/RMLSTARTC007a/README.md new file mode 100644 index 00000000..5c0301e5 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC007a/README.md @@ -0,0 +1,82 @@ +## RMLSTARTC007a + +**Title**: non-asserted quoted triples in subject and object, one source + +**Description**: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from one file + +**Error expected?** No + +**Input** +``` +c1,c2,c3,c4 +s1,o1,s2,o2 +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p1 ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q; ; + rml:objectMap [ + rml:quotedTriplesMap :thirdTM + ] + ] . + +:thirdTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p2 ; + rml:objectMap [ + rml:template "http://example/{c4}" + ] + ] . + +``` + +**Output** +``` +<< >> << >> . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC007b/README.md b/src/test/resources/rml-star/RMLSTARTC007b/README.md new file mode 100644 index 00000000..942e5139 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC007b/README.md @@ -0,0 +1,94 @@ +## RMLSTARTC007b + +**Title**: non-asserted quoted triples in subject and object, two sources + +**Description**: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from two sources + +**Error expected?** No + +**Input** +``` +c1-1,c1-2,c1-3 +s1,o1,1 + +``` + +**Input 1** +``` +c2-1,c2-2,c2-3 +s2,o2,1 + +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p1 ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-3" ; + rml:parent "c1-3" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q; ; + rml:objectMap [ + rml:quotedTriplesMap :thirdTM + ] + ] . + +:thirdTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p2 ; + rml:objectMap [ + rml:template "http://example/{c2-2}" + ] + ] . + +``` + +**Output** +``` +<< >> << >> . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC008a/README.md b/src/test/resources/rml-star/RMLSTARTC008a/README.md new file mode 100644 index 00000000..1b429c5a --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC008a/README.md @@ -0,0 +1,149 @@ +## RMLSTARTC008a + +**Title**: two-level non-asserted quoted triple in subject and object two-fold, one source + +**Description**: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form one source + +**Error expected?** No + +**Input** +``` +c1,c2,c3,c4,c5,c6,c7,c8 +s1,o1,s2,o2,s3,o3,s4,o4 +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:elementaryTM1 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p1 ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:firstJoinTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :elementaryTM1 + ]; + rml:predicateObjectMap [ + rml:predicate ex:q1; ; + rml:objectMap [ + rml:quotedTriplesMap :elementaryTM2 + ] + ] . + +:elementaryTM2 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p2 ; + rml:objectMap [ + rml:template "http://example/{c4}" + ] + ] . + +:centralJoinTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstJoinTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q2; + rml:objectMap [ + rml:quotedTriplesMap :secondJoinTM + ] + ] . + +:elementaryTM3 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c5}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p3 ; + rml:objectMap [ + rml:template "http://example/{c6}" + ] + ] . + +:secondJoinTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :elementaryTM3 + ]; + rml:predicateObjectMap [ + rml:predicate ex:q3; ; + rml:objectMap [ + rml:quotedTriplesMap :elementaryTM4 + ] + ] . + +:elementaryTM4 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c7}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p4 ; + rml:objectMap [ + rml:template "http://example/{c8}" + ] + ] . + +``` + +**Output** +``` +<<<<>><<>>>><<<<>><<>>>>. +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC008b/README.md b/src/test/resources/rml-star/RMLSTARTC008b/README.md new file mode 100644 index 00000000..8c346707 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC008b/README.md @@ -0,0 +1,162 @@ +## RMLSTARTC008b + +**Title**: two-level non-asserted quoted triple in subject and object two-fold, two sources + +**Description**: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form two sources + +**Error expected?** No + +**Input** +``` +c1-1,c1-2,c1-3,c1-4,c1-5 +s1,o1,s2,o2,1 + +``` + +**Input 1** +``` +c2-1,c2-2,c2-3,c2-4,c2-5 +s3,o3,s4,o4,1 + +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:elementaryTM1 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p1 ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:firstJoinTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :elementaryTM1 + ]; + rml:predicateObjectMap [ + rml:predicate ex:q1; ; + rml:objectMap [ + rml:quotedTriplesMap :elementaryTM2 + ] + ] . + +:elementaryTM2 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p2 ; + rml:objectMap [ + rml:template "http://example/{c1-4}" + ] + ] . + +:centralJoinTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstJoinTM ; + rml:joinCondition [ + rml:child "c2-5" ; + rml:parent "c1-5" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q2; + rml:objectMap [ + rml:quotedTriplesMap :secondJoinTM + ] + ] . + +:elementaryTM3 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p3 ; + rml:objectMap [ + rml:template "http://example/{c2-2}" + ] + ] . + +:secondJoinTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :elementaryTM3 + ]; + rml:predicateObjectMap [ + rml:predicate ex:q3; ; + rml:objectMap [ + rml:quotedTriplesMap :elementaryTM4 + ] + ] . + +:elementaryTM4 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2-3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p4 ; + rml:objectMap [ + rml:template "http://example/{c2-4}" + ] + ] . + +``` + +**Output** +``` +<<<<>><<>>>><<<<>><<>>>>. + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC009/README.md b/src/test/resources/rml-star/RMLSTARTC009/README.md new file mode 100644 index 00000000..6d91e68b --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC009/README.md @@ -0,0 +1,58 @@ +## RMLSTARTC009 + +**Title**: + +**Description**: + +**Error expected?** Yes + +**Input** +``` +c1,c2,c3,c4 +a,s,o,z +``` + +**Mapping** +``` +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:quotedTriplesMap :secondTM ; + rml:objectMap [ + rml:template "http://example/{c4}" + ] + ] . + +:secondTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c3}" + ] + ] . + +``` + diff --git a/src/test/resources/rml-star/RMLSTARTC010/README.md b/src/test/resources/rml-star/RMLSTARTC010/README.md new file mode 100644 index 00000000..6d37e946 --- /dev/null +++ b/src/test/resources/rml-star/RMLSTARTC010/README.md @@ -0,0 +1,56 @@ +## RMLSTARTC010 + +**Title**: + +**Description**: + +**Error expected?** Yes + +**Input** +``` +c1,c2,c3,c4 +a,s,o,z +``` + +**Mapping** +``` +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap, rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p; + rml:quotedTriplesMap :secondTM ; + ] . + +:secondTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c3}" + ] + ] . + +``` + diff --git a/src/test/resources/rml-star/config.js b/src/test/resources/rml-star/config.js new file mode 100644 index 00000000..a967e7c7 --- /dev/null +++ b/src/test/resources/rml-star/config.js @@ -0,0 +1,72 @@ +async function loadTurtle() { + //this is the function you call in 'preProcess', to load the highlighter + const worker = await new Promise(resolve => { + require(["core/worker"], ({ worker }) => resolve(worker)); + }); + const action = "highlight-load-lang"; + const langURL = + "https://cdn.jsdelivr.net/gh/redmer/highlightjs-turtle/src/languages/turtle.js"; + const propName = "hljsDefineTurtle"; // This funtion is defined in the highlighter being loaded + const lang = "turtle"; // this is the class you use to identify the language + worker.postMessage({ action, langURL, propName, lang }); + return new Promise(resolve => { + worker.addEventListener("message", function listener({ data }) { + const { action: responseAction, lang: responseLang } = data; + if (responseAction === action && responseLang === lang) { + worker.removeEventListener("message", listener); + resolve(); + } + }); + }); +} + +var respecConfig = { + // check https://respec.org/docs/ for the meaning of these keys + preProcess: [loadTurtle], + authors: [ + { + name: "Dylan Van Assche", + url: "https://dylanvanassche.be", + company: "IDLab – Ghent University – imec", + orcid: "0000-0002-7195-9935", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + edDraftURI: "https://w3id.org/rml/star/test-cases/", + editors: [ + { + name: "Dylan Van Assche", + url: "https://dylanvanassche.be", + company: "IDLab – Ghent University – imec", + orcid: "0000-0002-7195-9935", + companyURL: "https://knows.idlab.ugent.be/" + } + ], + formerEditors: [ + ], + github: "https://github.com/kg-construct/rml-io", + license: "w3c-software-doc", + localBiblio: { + "RML-Core": { + title: "RML-Core", + href: "https://w3id.org/rml/core/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "07 August 2024", + }, + "RML-IO": { + title: "RML-IO", + href: "https://w3id.org/rml/io/spec", + status: "Draft Community Group Report", + publisher: "W3C", + date: "12 March 2024", + }, + }, + otherLinks: [], + shortName: "RML-Star-Testcases", + specStatus: "CG-DRAFT", + // W3C config + copyrightStart: "2024", + doJsonLd: true, + group: "kg-construct", +}; diff --git a/src/test/resources/rml-star/descriptions.csv b/src/test/resources/rml-star/descriptions.csv new file mode 100644 index 00000000..6fc887f0 --- /dev/null +++ b/src/test/resources/rml-star/descriptions.csv @@ -0,0 +1,19 @@ +RML id,title,purpose,part of spec,data format,ref. formulation,error expected?,input file 1,input file 2,input file 3,comment +RMLSTARTC001a,"quoted triple in subject, one source, blank node in quoted subject",Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from one file,,CSV,CSV,no,data.csv,,, +RMLSTARTC001b,"quoted triple in subject, two sources, blank node in quoted subject",Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from two files,,CSV,CSV,no,data1.csv,data2.csv,, +RMLSTARTC002a,"quoted triple in subject, one source, blank node in quoted object",Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from one file,,CSV,CSV,no,data.csv,,, +RMLSTARTC002b,"quoted triple in subject, two sources, blank node in quoted object",Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from two files,,CSV,CSV,no,data1.csv,data2.csv,, +RMLSTARTC003a,"two-level quoted triple in subject, one source",Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from one file,,CSV,CSV,no,data.csv,,, +RMLSTARTC003b,"two-level quoted triple in subject, two sources",Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from two files,,CSV,CSV,no,data1.csv,data2.csv,, +RMLSTARTC004a,"two-level quoted triple in subject and object, one source","Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from one file",,CSV,CSV,no,data.csv,,, +RMLSTARTC004b,"two-level quoted triple in subject and object, two sources","Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from two sources",,CSV,CSV,no,data1.csv,data2.csv,, +RMLSTARTC005a,"non-asserted quoted triple in subject, one source",Tests the creation of a non-asserted quoted triple in the position of subject with data from one file,,CSV,CSV,no,data.csv,,, +RMLSTARTC005b,"non-asserted quoted triple in subject, two sources",Tests the creation of a non-asserted quoted triple in the position of subject with data from two files,,CSV,CSV,no,data1.csv,data2.csv,, +RMLSTARTC006a,"non-asserted quoted triple in object, one source",Tests the creation of a non-asserted quoted triple in the position of object with data from one file,,CSV,CSV,no,data.csv,,, +RMLSTARTC006b,"non-asserted quoted triple in object, two sources",Tests the creation of a non-asserted quoted triple in the position of object with data from two files,,CSV,CSV,no,data1.csv,data2.csv,, +RMLSTARTC007a,"non-asserted quoted triples in subject and object, one source","Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from one file",,CSV,CSV,no,data.csv,,, +RMLSTARTC007b,"non-asserted quoted triples in subject and object, two sources","Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from two sources",,CSV,CSV,no,data1.csv,data2.csv,, +RMLSTARTC008a,"two-level non-asserted quoted triple in subject and object two-fold, one source","Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form one source",,CSV,CSV,no,data.csv,,, +RMLSTARTC008b,"two-level non-asserted quoted triple in subject and object two-fold, two sources","Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form two sources",,CSV,CSV,no,data1.csv,data2.csv,, +RMLSTARTC009,,,,,,yes,,,, +RMLSTARTC010,,,,,,yes,,,, \ No newline at end of file diff --git a/src/test/resources/rml-star/dev.html b/src/test/resources/rml-star/dev.html new file mode 100644 index 00000000..1a97616f --- /dev/null +++ b/src/test/resources/rml-star/dev.html @@ -0,0 +1,118 @@ + + + + + RML-Star: Test Cases + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/src/test/resources/rml-star/docs/20250130/index.html b/src/test/resources/rml-star/docs/20250130/index.html new file mode 100644 index 00000000..d764af76 --- /dev/null +++ b/src/test/resources/rml-star/docs/20250130/index.html @@ -0,0 +1,1895 @@ + + + + + + +RML-Star: Test Cases + + + + + + + + + + + + + + +
+ +

RML-Star: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Star-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/star/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Star test cases to the determine the RML-Star specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Star test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Star specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Star test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLSTARTC001a

+

Title: quoted triple in subject, one source, blank node in quoted subject

+

Description: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+b0,o,ABC
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:reference "c1" ;
+        rml:termType rml:BlankNode
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c3"
+        ]
+    ] .
+
+

Output

+
_:b0 <http://example/p> <http://example/o> .
+<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
+
+
+

5. RMLSTARTC001b

+

Title: quoted triple in subject, two sources, blank node in quoted subject

+

Description: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+b0,o,1
+
+

Input 1

+
c2-1,c2-2
+ABC,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:reference "c1-1" ;
+        rml:termType rml:BlankNode
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM ;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-3" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1"
+        ]
+    ] .
+
+

Output

+
_:b0 <http://example/p> <http://example/o> .
+<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
+
+
+

6. RMLSTARTC002a

+

Title: quoted triple in subject, one source, blank node in quoted object

+

Description: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,b1,456
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:reference "c2" ;
+            rml:termType rml:BlankNode
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c3";
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> _:b1 .
+<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

7. RMLSTARTC002b

+

Title: quoted triple in subject, two sources, blank node in quoted object

+

Description: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,b1,1
+
+

Input 1

+
c2-1,c2-2
+456,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:reference "c1-2" ;
+            rml:termType rml:BlankNode
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM ;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-3" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1";
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> _:b1 .
+<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLSTARTC003a

+

Title: two-level quoted triple in subject, one source

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s,o,z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c3}"
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c4" ;
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
+<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

9. RMLSTARTC003b

+

Title: two-level quoted triple in subject, two sources

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4
+s,o,z,1
+
+

Input 1

+
c2-1,c2-2
+1,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c1-3}"
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-4" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1" ;
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
+<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

10. RMLSTARTC004a

+

Title: two-level quoted triple in subject and object, one source

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s,o,a,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> .
+<< <http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> >> <http://example/r> <http://example/z> .
+
+
+

11. RMLSTARTC004b

+

Title: two-level quoted triple in subject and object, two sources

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4
+s,o,a,1
+
+

Input 1

+
c2-1,c2-2
+z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-4" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c2-1}"
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> .
+<< <http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> >> <http://example/r> <http://example/z> .
+
+
+

12. RMLSTARTC005a

+

Title: non-asserted quoted triple in subject, one source

+

Description: Tests the creation of a non-asserted quoted triple in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,o,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:template "http://example/{c3}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
+
+
+

13. RMLSTARTC005b

+

Title: non-asserted quoted triple in subject, two sources

+

Description: Tests the creation of a non-asserted quoted triple in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,o,1
+
+

Input 1

+
c2-1,c2-2
+z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-2" ;
+              rml:parent "c1-3" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:template "http://example/{c2-1}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
+
+
+

14. RMLSTARTC006a

+

Title: non-asserted quoted triple in object, one source

+

Description: Tests the creation of a non-asserted quoted triple in the position of object with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,o,x
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;  # This refers to the x statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+

Output

+
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
+
+
+

15. RMLSTARTC006b

+

Title: non-asserted quoted triple in object, two sources

+

Description: Tests the creation of a non-asserted quoted triple in the position of object with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,o,1
+
+

Input 1

+
c2-1,c2-2
+x,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-2" ;
+              rml:parent "c1-3" ;
+            ];
+        ]
+    ] .
+
+

Output

+
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
+
+
+

16. RMLSTARTC007a

+

Title: non-asserted quoted triples in subject and object, one source

+

Description: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s1,o1,s2,o2
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :thirdTM
+        ]
+    ] .
+
+:thirdTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
+
+
+

17. RMLSTARTC007b

+

Title: non-asserted quoted triples in subject and object, two sources

+

Description: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s1,o1,1
+
+

Input 1

+
c2-1,c2-2,c2-3
+s2,o2,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-3" ;
+              rml:parent "c1-3" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :thirdTM
+        ]
+    ] .
+
+:thirdTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-2}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
+
+
+

18. RMLSTARTC008a

+

Title: two-level non-asserted quoted triple in subject and object two-fold, one source

+

Description: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form one source

+

Error expected? No

+

Input

+
c1,c2,c3,c4,c5,c6,c7,c8
+s1,o1,s2,o2,s3,o3,s4,o4
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:elementaryTM1 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:firstJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM1
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q1; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM2
+        ]
+    ] .
+
+:elementaryTM2 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+:centralJoinTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstJoinTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q2;
+        rml:objectMap [
+            rml:quotedTriplesMap :secondJoinTM
+        ]
+    ] .
+
+:elementaryTM3 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c5}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p3 ;
+        rml:objectMap [
+            rml:template "http://example/{c6}"
+        ]
+    ] .
+
+:secondJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM3
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q3; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM4
+        ]
+    ] .
+
+:elementaryTM4 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c7}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p4 ;
+        rml:objectMap [
+            rml:template "http://example/{c8}"
+        ]
+    ] .
+
+

Output

+
<<<<<http://example/s1><http://example/p1><http://example/o1>>><http://example/q1><<<http://example/s2><http://example/p2><http://example/o2>>>>><http://example/q2><<<<<http://example/s3><http://example/p3><http://example/o3>>><http://example/q3><<<http://example/s4><http://example/p4><http://example/o4>>>>>.
+
+
+

19. RMLSTARTC008b

+

Title: two-level non-asserted quoted triple in subject and object two-fold, two sources

+

Description: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4,c1-5
+s1,o1,s2,o2,1
+
+

Input 1

+
c2-1,c2-2,c2-3,c2-4,c2-5
+s3,o3,s4,o4,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:elementaryTM1 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:firstJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM1
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q1; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM2
+        ]
+    ] .
+
+:elementaryTM2 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-4}"
+        ]
+    ] .
+
+:centralJoinTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstJoinTM ;
+            rml:joinCondition [
+              rml:child "c2-5" ;
+              rml:parent "c1-5" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q2;
+        rml:objectMap [
+            rml:quotedTriplesMap :secondJoinTM
+        ]
+    ] .
+
+:elementaryTM3 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p3 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-2}"
+        ]
+    ] .
+
+:secondJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM3
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q3; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM4
+        ]
+    ] .
+
+:elementaryTM4 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p4 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-4}"
+        ]
+    ] .
+
+

Output

+
<<<<<http://example/s1><http://example/p1><http://example/o1>>><http://example/q1><<<http://example/s2><http://example/p2><http://example/o2>>>>><http://example/q2><<<<<http://example/s3><http://example/p3><http://example/o3>>><http://example/q3><<<http://example/s4><http://example/p4><http://example/o4>>>>>.
+
+
+

20. RMLSTARTC009

+

Title:

+

Description:

+

Error expected? Yes

+

Input

+
c1,c2,c3,c4
+a,s,o,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}" 
+    ];
+    rml:predicateObjectMap [
+        rml:quotedTriplesMap :secondTM ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+:secondTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c3}" 
+        ]
+    ] .
+
+
+

21. RMLSTARTC010

+

Title:

+

Description:

+

Error expected? Yes

+

Input

+
c1,c2,c3,c4
+a,s,o,z
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap, rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p;
+        rml:quotedTriplesMap :secondTM ;
+    ] .
+
+:secondTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c3}" 
+        ]
+    ] .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-star/docs/index.html b/src/test/resources/rml-star/docs/index.html new file mode 100644 index 00000000..d764af76 --- /dev/null +++ b/src/test/resources/rml-star/docs/index.html @@ -0,0 +1,1895 @@ + + + + + + +RML-Star: Test Cases + + + + + + + + + + + + + + +
+ +

RML-Star: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Star-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/star/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Star test cases to the determine the RML-Star specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Star test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Star specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Star test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLSTARTC001a

+

Title: quoted triple in subject, one source, blank node in quoted subject

+

Description: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+b0,o,ABC
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:reference "c1" ;
+        rml:termType rml:BlankNode
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c3"
+        ]
+    ] .
+
+

Output

+
_:b0 <http://example/p> <http://example/o> .
+<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
+
+
+

5. RMLSTARTC001b

+

Title: quoted triple in subject, two sources, blank node in quoted subject

+

Description: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+b0,o,1
+
+

Input 1

+
c2-1,c2-2
+ABC,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:reference "c1-1" ;
+        rml:termType rml:BlankNode
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM ;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-3" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1"
+        ]
+    ] .
+
+

Output

+
_:b0 <http://example/p> <http://example/o> .
+<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
+
+
+

6. RMLSTARTC002a

+

Title: quoted triple in subject, one source, blank node in quoted object

+

Description: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,b1,456
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:reference "c2" ;
+            rml:termType rml:BlankNode
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c3";
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> _:b1 .
+<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

7. RMLSTARTC002b

+

Title: quoted triple in subject, two sources, blank node in quoted object

+

Description: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,b1,1
+
+

Input 1

+
c2-1,c2-2
+456,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:reference "c1-2" ;
+            rml:termType rml:BlankNode
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM ;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-3" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1";
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> _:b1 .
+<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLSTARTC003a

+

Title: two-level quoted triple in subject, one source

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s,o,z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c3}"
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c4" ;
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
+<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

9. RMLSTARTC003b

+

Title: two-level quoted triple in subject, two sources

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4
+s,o,z,1
+
+

Input 1

+
c2-1,c2-2
+1,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c1-3}"
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-4" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1" ;
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
+<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

10. RMLSTARTC004a

+

Title: two-level quoted triple in subject and object, one source

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s,o,a,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> .
+<< <http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> >> <http://example/r> <http://example/z> .
+
+
+

11. RMLSTARTC004b

+

Title: two-level quoted triple in subject and object, two sources

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4
+s,o,a,1
+
+

Input 1

+
c2-1,c2-2
+z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-4" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c2-1}"
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> .
+<< <http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> >> <http://example/r> <http://example/z> .
+
+
+

12. RMLSTARTC005a

+

Title: non-asserted quoted triple in subject, one source

+

Description: Tests the creation of a non-asserted quoted triple in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,o,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:template "http://example/{c3}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
+
+
+

13. RMLSTARTC005b

+

Title: non-asserted quoted triple in subject, two sources

+

Description: Tests the creation of a non-asserted quoted triple in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,o,1
+
+

Input 1

+
c2-1,c2-2
+z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-2" ;
+              rml:parent "c1-3" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:template "http://example/{c2-1}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
+
+
+

14. RMLSTARTC006a

+

Title: non-asserted quoted triple in object, one source

+

Description: Tests the creation of a non-asserted quoted triple in the position of object with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,o,x
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;  # This refers to the x statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+

Output

+
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
+
+
+

15. RMLSTARTC006b

+

Title: non-asserted quoted triple in object, two sources

+

Description: Tests the creation of a non-asserted quoted triple in the position of object with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,o,1
+
+

Input 1

+
c2-1,c2-2
+x,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-2" ;
+              rml:parent "c1-3" ;
+            ];
+        ]
+    ] .
+
+

Output

+
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
+
+
+

16. RMLSTARTC007a

+

Title: non-asserted quoted triples in subject and object, one source

+

Description: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s1,o1,s2,o2
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :thirdTM
+        ]
+    ] .
+
+:thirdTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
+
+
+

17. RMLSTARTC007b

+

Title: non-asserted quoted triples in subject and object, two sources

+

Description: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s1,o1,1
+
+

Input 1

+
c2-1,c2-2,c2-3
+s2,o2,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-3" ;
+              rml:parent "c1-3" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :thirdTM
+        ]
+    ] .
+
+:thirdTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-2}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
+
+
+

18. RMLSTARTC008a

+

Title: two-level non-asserted quoted triple in subject and object two-fold, one source

+

Description: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form one source

+

Error expected? No

+

Input

+
c1,c2,c3,c4,c5,c6,c7,c8
+s1,o1,s2,o2,s3,o3,s4,o4
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:elementaryTM1 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:firstJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM1
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q1; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM2
+        ]
+    ] .
+
+:elementaryTM2 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+:centralJoinTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstJoinTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q2;
+        rml:objectMap [
+            rml:quotedTriplesMap :secondJoinTM
+        ]
+    ] .
+
+:elementaryTM3 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c5}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p3 ;
+        rml:objectMap [
+            rml:template "http://example/{c6}"
+        ]
+    ] .
+
+:secondJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM3
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q3; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM4
+        ]
+    ] .
+
+:elementaryTM4 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c7}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p4 ;
+        rml:objectMap [
+            rml:template "http://example/{c8}"
+        ]
+    ] .
+
+

Output

+
<<<<<http://example/s1><http://example/p1><http://example/o1>>><http://example/q1><<<http://example/s2><http://example/p2><http://example/o2>>>>><http://example/q2><<<<<http://example/s3><http://example/p3><http://example/o3>>><http://example/q3><<<http://example/s4><http://example/p4><http://example/o4>>>>>.
+
+
+

19. RMLSTARTC008b

+

Title: two-level non-asserted quoted triple in subject and object two-fold, two sources

+

Description: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4,c1-5
+s1,o1,s2,o2,1
+
+

Input 1

+
c2-1,c2-2,c2-3,c2-4,c2-5
+s3,o3,s4,o4,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:elementaryTM1 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:firstJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM1
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q1; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM2
+        ]
+    ] .
+
+:elementaryTM2 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-4}"
+        ]
+    ] .
+
+:centralJoinTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstJoinTM ;
+            rml:joinCondition [
+              rml:child "c2-5" ;
+              rml:parent "c1-5" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q2;
+        rml:objectMap [
+            rml:quotedTriplesMap :secondJoinTM
+        ]
+    ] .
+
+:elementaryTM3 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p3 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-2}"
+        ]
+    ] .
+
+:secondJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM3
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q3; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM4
+        ]
+    ] .
+
+:elementaryTM4 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p4 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-4}"
+        ]
+    ] .
+
+

Output

+
<<<<<http://example/s1><http://example/p1><http://example/o1>>><http://example/q1><<<http://example/s2><http://example/p2><http://example/o2>>>>><http://example/q2><<<<<http://example/s3><http://example/p3><http://example/o3>>><http://example/q3><<<http://example/s4><http://example/p4><http://example/o4>>>>>.
+
+
+

20. RMLSTARTC009

+

Title:

+

Description:

+

Error expected? Yes

+

Input

+
c1,c2,c3,c4
+a,s,o,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}" 
+    ];
+    rml:predicateObjectMap [
+        rml:quotedTriplesMap :secondTM ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+:secondTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c3}" 
+        ]
+    ] .
+
+
+

21. RMLSTARTC010

+

Title:

+

Description:

+

Error expected? Yes

+

Input

+
c1,c2,c3,c4
+a,s,o,z
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap, rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p;
+        rml:quotedTriplesMap :secondTM ;
+    ] .
+
+:secondTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c3}" 
+        ]
+    ] .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-star/invalid/RMLSTARTC009/data.csv b/src/test/resources/rml-star/invalid/RMLSTARTC009/data.csv new file mode 100644 index 00000000..d9a0567b --- /dev/null +++ b/src/test/resources/rml-star/invalid/RMLSTARTC009/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3,c4 +a,s,o,z \ No newline at end of file diff --git a/src/test/resources/rml-star/invalid/RMLSTARTC009/mapping.ttl b/src/test/resources/rml-star/invalid/RMLSTARTC009/mapping.ttl new file mode 100644 index 00000000..311477dc --- /dev/null +++ b/src/test/resources/rml-star/invalid/RMLSTARTC009/mapping.ttl @@ -0,0 +1,39 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:quotedTriplesMap :secondTM ; + rml:objectMap [ + rml:template "http://example/{c4}" + ] + ] . + +:secondTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c3}" + ] + ] . diff --git a/src/test/resources/rml-star/invalid/RMLSTARTC010/data.csv b/src/test/resources/rml-star/invalid/RMLSTARTC010/data.csv new file mode 100644 index 00000000..d9a0567b --- /dev/null +++ b/src/test/resources/rml-star/invalid/RMLSTARTC010/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3,c4 +a,s,o,z \ No newline at end of file diff --git a/src/test/resources/rml-star/invalid/RMLSTARTC010/mapping.ttl b/src/test/resources/rml-star/invalid/RMLSTARTC010/mapping.ttl new file mode 100644 index 00000000..48960292 --- /dev/null +++ b/src/test/resources/rml-star/invalid/RMLSTARTC010/mapping.ttl @@ -0,0 +1,37 @@ +@prefix rml: . +@prefix rdf: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap, rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p; + rml:quotedTriplesMap :secondTM ; + ] . + +:secondTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c3}" + ] + ] . diff --git a/src/test/resources/rml-star/list.sh b/src/test/resources/rml-star/list.sh new file mode 100644 index 00000000..12c32031 --- /dev/null +++ b/src/test/resources/rml-star/list.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for i in RML*; do + echo "
" +done diff --git a/src/test/resources/rml-star/make-metadata.py b/src/test/resources/rml-star/make-metadata.py new file mode 100644 index 00000000..f3501f45 --- /dev/null +++ b/src/test/resources/rml-star/make-metadata.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python3 + +import os +import sys +import glob +import csv + +def get_title_description(testcase: str): + with open ('descriptions.csv') as csvfile: + reader = csv.reader(csvfile) + for row in reader: + if row[0] == testcase: + return row[1], row[2] + +def main(spec: str): + with open ('metadata.csv', 'w') as csvfile: + writer = csv.writer(csvfile) + writer.writerow(['ID', 'title', 'description', 'specification', + 'mapping', 'input_format1', 'input_format2', + 'input_format3', 'output_format1', 'output_format2', + 'output_format3', 'input1', 'input2', 'input3', + 'output1', 'output2', 'output3', 'error']) + for testcase in glob.glob('RML*'): + print(testcase) + title, description = get_title_description(testcase) + error = 'false' + input1 = '' + input2 = '' + input3 = '' + input_format1 = '' + input_format2 = '' + input_format3 = '' + output1 = '' + output2 = '' + output3 = '' + output_format1 = '' + output_format2 = '' + output_format3 = '' + + # Input file + if os.path.exists(os.path.join(testcase, 'data.csv')): + input1 = 'data.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'data1.csv')): + input1 = 'data1.csv' + input_format1 = 'text/csv' + + if os.path.exists(os.path.join(testcase, 'data2.csv')): + input2 = 'data2.csv' + input_format2 = 'text/csv' + + # Mapping file + if os.path.exists(os.path.join(testcase, 'mapping.ttl')): + mapping_file = 'mapping.ttl' + else: + raise ValueError('Mapping file missing!') + + # Output files + if os.path.exists(os.path.join(testcase, 'output.nt')): + output1 = 'output.nt' + output_format1 = 'application/n-triples' + else: + error = 'true' + + writer.writerow([testcase, title, description, spec, mapping_file, + input_format1, input_format2, input_format3, + output_format1, output_format2, output_format3, + input1, input2, input3, output1, output2, + output3, error]) + lines = [] + # Title and description + lines.append(f'## {testcase}\n\n') + lines.append(f'**Title**: {title}\n\n') + lines.append(f'**Description**: {description}\n\n') + if error == 'true': + error_html = 'Yes' + else: + error_html = 'No' + lines.append(f'**Error expected?** {error_html}\n\n') + + # Input + inputCount = '' + + for index, i in enumerate([input1, input2, input3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + input_html = f'**Input{inputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + input_html = f'**Input{inputCount}**\n `{i}`\n\n' + + lines.append(input_html) + inputCount = f' {index + 1}' + + # Mapping + with open(os.path.join(testcase, mapping_file)) as f: + mapping_html = f'**Mapping**\n```\n{f.read()}\n```\n\n' + lines.append(mapping_html) + + # Output + outputCount = '' + if output2 or output3: + outputCount = ' 1' + + for index, i in enumerate([output1, output2, output3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + output_html = f'**Output{outputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + output_html = f'**Output{outputCount}**\n `{i}`\n\n' + + lines.append(output_html) + outputCount = f' {index + 2}' + + + with open(os.path.join(testcase, 'README.md'), 'w') as f: + f.writelines(lines) + + +if __name__ == '__main__': + if len(sys.argv) != 2: + print('Usage: ./make-metadata.py ') + sys.exit(1) + main(sys.argv[1]) diff --git a/src/test/resources/rml-star/manifest.rml.ttl b/src/test/resources/rml-star/manifest.rml.ttl new file mode 100644 index 00000000..e57c05c4 --- /dev/null +++ b/src/test/resources/rml-star/manifest.rml.ttl @@ -0,0 +1,267 @@ +@prefix xsd: . +@prefix dcterms: . +@prefix rml: . +@prefix rmltest: . +@prefix test: . +@base . + +# java -jar .\burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/star/test/ + +_:source + rml:source [ + a rml:RelativePathSource ; + rml:path "metadata.csv" ; + rml:null ""; + ]; + rml:referenceFormulation rml:CSV; +. + +<#TriplesMapTestcase> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:reference "ID"; + rml:class test:TestCase; + ]; + + rml:predicateObjectMap [ + rml:predicate dcterms:identifier; + rml:objectMap [ + rml:reference "ID"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:hasError; + rml:objectMap [ + rml:reference "error"; + rml:datatype xsd:boolean; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:mappingDocument; + rml:objectMap [ + rml:reference "mapping"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; +. + +<#TriplesMapInput1> + a rml:TriplesMap; + + rml:logicalSource _:source ; + + rml:subjectMap [ + rml:template "{ID}/input/{input1}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format1"; + ]; + ]; +. + +<#TriplesMapInput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input2}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format2"; + ]; + ]; +. + +<#TriplesMapInput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input3}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format3"; + ]; + ]; +. + +<#TriplesMapOutput1> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output1}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format1"; + ]; + ]; +. + +<#TriplesMapOutput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output2}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format2"; + ]; + ]; +. + +<#TriplesMapOutput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output3}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format3"; + ]; + ]; +. + diff --git a/src/test/resources/rml-star/manifest.ttl b/src/test/resources/rml-star/manifest.ttl new file mode 100644 index 00000000..95f2f27c --- /dev/null +++ b/src/test/resources/rml-star/manifest.ttl @@ -0,0 +1,240 @@ + "data2.csv" . + "text/csv" . + . + "RMLSTARTC006a" . + "mapping.ttl" . + . + "false"^^ . + . + . + "output.nt" . + "application/n-triples" . + . + "output.nt" . + "application/n-triples" . + . + "data1.csv" . + "text/csv" . + . + "output.nt" . + "application/n-triples" . + . + "data.csv" . + "text/csv" . + . + "RMLSTARTC010" . + "mapping.ttl" . + . + "true"^^ . + . + . + "RMLSTARTC008b" . + "mapping.ttl" . + . + "false"^^ . + . + . + "RMLSTARTC004a" . + "mapping.ttl" . + . + "false"^^ . + . + . + "data2.csv" . + "text/csv" . + . + "data.csv" . + "text/csv" . + . + . + "RMLSTARTC006b" . + "mapping.ttl" . + . + "false"^^ . + . + . + "output.nt" . + "application/n-triples" . + . + "RMLSTARTC002a" . + "mapping.ttl" . + . + "false"^^ . + . + . + "data.csv" . + "text/csv" . + . + "output.nt" . + "application/n-triples" . + . + "RMLSTARTC009" . + "mapping.ttl" . + . + "true"^^ . + . + "data1.csv" . + "text/csv" . + . + "data2.csv" . + "text/csv" . + . + "output.nt" . + "application/n-triples" . + . + . + "RMLSTARTC004b" . + "mapping.ttl" . + . + "false"^^ . + . + . + "data1.csv" . + "text/csv" . + . + "output.nt" . + "application/n-triples" . + . + "data2.csv" . + "text/csv" . + . + "data.csv" . + "text/csv" . + . + . + "RMLSTARTC002b" . + "mapping.ttl" . + . + "false"^^ . + . + . + "output.nt" . + "application/n-triples" . + . + "data1.csv" . + "text/csv" . + . + "data.csv" . + "text/csv" . + . + "RMLSTARTC007a" . + "mapping.ttl" . + . + "false"^^ . + . + . + "output.nt" . + "application/n-triples" . + . + "data2.csv" . + "text/csv" . + . + "data.csv" . + "text/csv" . + . + "data.csv" . + "text/csv" . + . + "RMLSTARTC005a" . + "mapping.ttl" . + . + "false"^^ . + . + . + "data1.csv" . + "text/csv" . + . + "data2.csv" . + "text/csv" . + . + . + "RMLSTARTC007b" . + "mapping.ttl" . + . + "false"^^ . + . + . + "RMLSTARTC003a" . + "mapping.ttl" . + . + "false"^^ . + . + . + "output.nt" . + "application/n-triples" . + . + "data1.csv" . + "text/csv" . + . + "output.nt" . + "application/n-triples" . + . + "output.nt" . + "application/n-triples" . + . + "data.csv" . + "text/csv" . + . + . + "RMLSTARTC005b" . + "mapping.ttl" . + . + "false"^^ . + . + . + "RMLSTARTC001a" . + "mapping.ttl" . + . + "false"^^ . + . + . + "data2.csv" . + "text/csv" . + . + "data.csv" . + "text/csv" . + . + "output.nt" . + "application/n-triples" . + . + . + "RMLSTARTC003b" . + "mapping.ttl" . + . + "false"^^ . + . + . + "output.nt" . + "application/n-triples" . + . + "data1.csv" . + "text/csv" . + . + "output.nt" . + "application/n-triples" . + . + "data2.csv" . + "text/csv" . + . + "data.csv" . + "text/csv" . + . + "output.nt" . + "application/n-triples" . + . + "RMLSTARTC008a" . + "mapping.ttl" . + . + "false"^^ . + . + . + . + "RMLSTARTC001b" . + "mapping.ttl" . + . + "false"^^ . + . + . + "data1.csv" . + "text/csv" . + . diff --git a/src/test/resources/rml-star/metadata.csv b/src/test/resources/rml-star/metadata.csv new file mode 100644 index 00000000..7a55da58 --- /dev/null +++ b/src/test/resources/rml-star/metadata.csv @@ -0,0 +1,19 @@ +ID,title,description,specification,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error +RMLSTARTC009,,,http://w3id.org/rml/star/,mapping.ttl,text/csv,,,,,,data.csv,,,,,,true +RMLSTARTC010,,,http://w3id.org/rml/star/,mapping.ttl,text/csv,,,,,,data.csv,,,,,,true +RMLSTARTC001a,"quoted triple in subject, one source, blank node in quoted subject",Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from one file,http://w3id.org/rml/star/,mapping.ttl,text/csv,,,application/n-triples,,,data.csv,,,output.nt,,,false +RMLSTARTC001b,"quoted triple in subject, two sources, blank node in quoted subject",Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from two files,http://w3id.org/rml/star/,mapping.ttl,text/csv,text/csv,,application/n-triples,,,data1.csv,data2.csv,,output.nt,,,false +RMLSTARTC002a,"quoted triple in subject, one source, blank node in quoted object",Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from one file,http://w3id.org/rml/star/,mapping.ttl,text/csv,,,application/n-triples,,,data.csv,,,output.nt,,,false +RMLSTARTC002b,"quoted triple in subject, two sources, blank node in quoted object",Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from two files,http://w3id.org/rml/star/,mapping.ttl,text/csv,text/csv,,application/n-triples,,,data1.csv,data2.csv,,output.nt,,,false +RMLSTARTC003a,"two-level quoted triple in subject, one source",Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from one file,http://w3id.org/rml/star/,mapping.ttl,text/csv,,,application/n-triples,,,data.csv,,,output.nt,,,false +RMLSTARTC003b,"two-level quoted triple in subject, two sources",Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from two files,http://w3id.org/rml/star/,mapping.ttl,text/csv,text/csv,,application/n-triples,,,data1.csv,data2.csv,,output.nt,,,false +RMLSTARTC004a,"two-level quoted triple in subject and object, one source","Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from one file",http://w3id.org/rml/star/,mapping.ttl,text/csv,,,application/n-triples,,,data.csv,,,output.nt,,,false +RMLSTARTC004b,"two-level quoted triple in subject and object, two sources","Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from two sources",http://w3id.org/rml/star/,mapping.ttl,text/csv,text/csv,,application/n-triples,,,data1.csv,data2.csv,,output.nt,,,false +RMLSTARTC005a,"non-asserted quoted triple in subject, one source",Tests the creation of a non-asserted quoted triple in the position of subject with data from one file,http://w3id.org/rml/star/,mapping.ttl,text/csv,,,application/n-triples,,,data.csv,,,output.nt,,,false +RMLSTARTC005b,"non-asserted quoted triple in subject, two sources",Tests the creation of a non-asserted quoted triple in the position of subject with data from two files,http://w3id.org/rml/star/,mapping.ttl,text/csv,text/csv,,application/n-triples,,,data1.csv,data2.csv,,output.nt,,,false +RMLSTARTC006a,"non-asserted quoted triple in object, one source",Tests the creation of a non-asserted quoted triple in the position of object with data from one file,http://w3id.org/rml/star/,mapping.ttl,text/csv,,,application/n-triples,,,data.csv,,,output.nt,,,false +RMLSTARTC006b,"non-asserted quoted triple in object, two sources",Tests the creation of a non-asserted quoted triple in the position of object with data from two files,http://w3id.org/rml/star/,mapping.ttl,text/csv,text/csv,,application/n-triples,,,data1.csv,data2.csv,,output.nt,,,false +RMLSTARTC007a,"non-asserted quoted triples in subject and object, one source","Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from one file",http://w3id.org/rml/star/,mapping.ttl,text/csv,,,application/n-triples,,,data.csv,,,output.nt,,,false +RMLSTARTC007b,"non-asserted quoted triples in subject and object, two sources","Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from two sources",http://w3id.org/rml/star/,mapping.ttl,text/csv,text/csv,,application/n-triples,,,data1.csv,data2.csv,,output.nt,,,false +RMLSTARTC008a,"two-level non-asserted quoted triple in subject and object two-fold, one source","Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form one source",http://w3id.org/rml/star/,mapping.ttl,text/csv,,,application/n-triples,,,data.csv,,,output.nt,,,false +RMLSTARTC008b,"two-level non-asserted quoted triple in subject and object two-fold, two sources","Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form two sources",http://w3id.org/rml/star/,mapping.ttl,text/csv,text/csv,,application/n-triples,,,data1.csv,data2.csv,,output.nt,,,false diff --git a/src/test/resources/rml-star/section/abstract.md b/src/test/resources/rml-star/section/abstract.md new file mode 100644 index 00000000..177fb7a7 --- /dev/null +++ b/src/test/resources/rml-star/section/abstract.md @@ -0,0 +1 @@ +This document defines the RML-Star test cases to the determine the RML-Star specification conformance of tools. diff --git a/src/test/resources/rml-star/section/data-model.md b/src/test/resources/rml-star/section/data-model.md new file mode 100644 index 00000000..f4c3ad6a --- /dev/null +++ b/src/test/resources/rml-star/section/data-model.md @@ -0,0 +1,12 @@ +# Data model + +The test cases are semantically described for re-usability and shareability following the [W3C Test case description](https://www.w3.org/2006/03/test-description). +Each `test:Testcase` as the following properties: + +- `dcterms:identifier`: unique ID of the test case. +- `rmltest:hasError`: if an error of the RML Processor is expected or not. +- `rmltest:input`: One or more input data of the test case. +- `rmltest:output`: One or more output data of the test case. +- `rmltest:inputFormat`: the input data format. +- `rmltest:outputFormat`: the output data format. +- `rmltest:mappingDocument`: the RML mapping rules in Turtle. diff --git a/src/test/resources/rml-star/section/introduction.md b/src/test/resources/rml-star/section/introduction.md new file mode 100644 index 00000000..3a3f1e99 --- /dev/null +++ b/src/test/resources/rml-star/section/introduction.md @@ -0,0 +1,4 @@ +# Introduction + +This document defines the RML-Star test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Star specification. diff --git a/src/test/resources/rml-star/section/test-cases.md b/src/test/resources/rml-star/section/test-cases.md new file mode 100644 index 00000000..228143d4 --- /dev/null +++ b/src/test/resources/rml-star/section/test-cases.md @@ -0,0 +1,10 @@ +# Test cases + +This section describes the RML-Star test cases. These descriptions are also available as RDF. +The files are available on [GitHub](https://github.com/kg-construct/rml-star/tree/main/test-cases) in the folder `test-cases`. +Each test case is contained in a single folder, containing three types of files: + + - Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server. + - One file with the RML rules, called `mapping.ttl`, in the Turtle format. + - Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error. + diff --git a/src/test/resources/rml-star/valid/RMLSTARTC001a/data.csv b/src/test/resources/rml-star/valid/RMLSTARTC001a/data.csv new file mode 100644 index 00000000..5de825f9 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC001a/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3 +b0,o,ABC \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC001a/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC001a/mapping.ttl new file mode 100644 index 00000000..63ec2335 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC001a/mapping.ttl @@ -0,0 +1,40 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:reference "c1" ; + rml:termType rml:BlankNode + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c3" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC001a/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC001a/output.nt new file mode 100644 index 00000000..2d94448c --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC001a/output.nt @@ -0,0 +1,2 @@ +_:b0 . +<< _:b0 >> "ABC" . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC001b/data1.csv b/src/test/resources/rml-star/valid/RMLSTARTC001b/data1.csv new file mode 100644 index 00000000..f6cfd6e0 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC001b/data1.csv @@ -0,0 +1,2 @@ +c1-1,c1-2,c1-3 +b0,o,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC001b/data2.csv b/src/test/resources/rml-star/valid/RMLSTARTC001b/data2.csv new file mode 100644 index 00000000..15677400 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC001b/data2.csv @@ -0,0 +1,2 @@ +c2-1,c2-2 +ABC,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC001b/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC001b/mapping.ttl new file mode 100644 index 00000000..e9826ef3 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC001b/mapping.ttl @@ -0,0 +1,44 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:reference "c1-1" ; + rml:termType rml:BlankNode + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-3" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c2-1" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC001b/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC001b/output.nt new file mode 100644 index 00000000..2d94448c --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC001b/output.nt @@ -0,0 +1,2 @@ +_:b0 . +<< _:b0 >> "ABC" . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC002a/data.csv b/src/test/resources/rml-star/valid/RMLSTARTC002a/data.csv new file mode 100644 index 00000000..c44682d4 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC002a/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3 +s,b1,456 \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC002a/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC002a/mapping.ttl new file mode 100644 index 00000000..c301bf7e --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC002a/mapping.ttl @@ -0,0 +1,42 @@ +@prefix rdf: . +@prefix rml: . +@prefix xsd: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:reference "c2" ; + rml:termType rml:BlankNode + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c3"; + rml:datatype xsd:integer + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC002a/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC002a/output.nt new file mode 100644 index 00000000..2dc337a9 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC002a/output.nt @@ -0,0 +1,2 @@ + _:b1 . +<< _:b1 >> "456"^^ . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC002b/data1.csv b/src/test/resources/rml-star/valid/RMLSTARTC002b/data1.csv new file mode 100644 index 00000000..bd188285 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC002b/data1.csv @@ -0,0 +1,2 @@ +c1-1,c1-2,c1-3 +s,b1,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC002b/data2.csv b/src/test/resources/rml-star/valid/RMLSTARTC002b/data2.csv new file mode 100644 index 00000000..6c461cb5 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC002b/data2.csv @@ -0,0 +1,2 @@ +c2-1,c2-2 +456,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC002b/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC002b/mapping.ttl new file mode 100644 index 00000000..372d0f92 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC002b/mapping.ttl @@ -0,0 +1,46 @@ +@prefix rdf: . +@prefix rml: . +@prefix xsd: . +@prefix ex: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:reference "c1-2" ; + rml:termType rml:BlankNode + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-3" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c2-1"; + rml:datatype xsd:integer + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC002b/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC002b/output.nt new file mode 100644 index 00000000..2dc337a9 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC002b/output.nt @@ -0,0 +1,2 @@ + _:b1 . +<< _:b1 >> "456"^^ . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC003a/data.csv b/src/test/resources/rml-star/valid/RMLSTARTC003a/data.csv new file mode 100644 index 00000000..98b64639 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC003a/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3,c4 +s,o,z,1 \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC003a/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC003a/mapping.ttl new file mode 100644 index 00000000..4d461697 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC003a/mapping.ttl @@ -0,0 +1,58 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:r ; + rml:objectMap [ + rml:template "http://example/{c3}" + ] + ] . + +:thirdTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :secondTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c4" ; + rml:datatype xsd:integer + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC003a/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC003a/output.nt new file mode 100644 index 00000000..d6a50cbe --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC003a/output.nt @@ -0,0 +1,3 @@ + . +<< >> . +<< << >> >> "1"^^ . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC003b/data1.csv b/src/test/resources/rml-star/valid/RMLSTARTC003b/data1.csv new file mode 100644 index 00000000..3999e70c --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC003b/data1.csv @@ -0,0 +1,2 @@ +c1-1,c1-2,c1-3,c1-4 +s,o,z,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC003b/data2.csv b/src/test/resources/rml-star/valid/RMLSTARTC003b/data2.csv new file mode 100644 index 00000000..76b3614a --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC003b/data2.csv @@ -0,0 +1,2 @@ +c2-1,c2-2 +1,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC003b/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC003b/mapping.ttl new file mode 100644 index 00000000..edab9cc6 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC003b/mapping.ttl @@ -0,0 +1,62 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:r ; + rml:objectMap [ + rml:template "http://example/{c1-3}" + ] + ] . + +:thirdTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :secondTM; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-4" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:reference "c2-1" ; + rml:datatype xsd:integer + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC003b/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC003b/output.nt new file mode 100644 index 00000000..d6a50cbe --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC003b/output.nt @@ -0,0 +1,3 @@ + . +<< >> . +<< << >> >> "1"^^ . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC004a/data.csv b/src/test/resources/rml-star/valid/RMLSTARTC004a/data.csv new file mode 100644 index 00000000..6b3d2345 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC004a/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3,c4 +s,o,a,z \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC004a/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC004a/mapping.ttl new file mode 100644 index 00000000..06b3511b --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC004a/mapping.ttl @@ -0,0 +1,57 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:quotedTriplesMap :firstTM + ] + ] . + +:thirdTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :secondTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:r ; + rml:objectMap [ + rml:template "http://example/{c4}" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC004a/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC004a/output.nt new file mode 100644 index 00000000..7a8d3131 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC004a/output.nt @@ -0,0 +1,3 @@ + . + << >> . +<< << >> >> . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC004b/data1.csv b/src/test/resources/rml-star/valid/RMLSTARTC004b/data1.csv new file mode 100644 index 00000000..97346277 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC004b/data1.csv @@ -0,0 +1,2 @@ +c1-1,c1-2,c1-3,c1-4 +s,o,a,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC004b/data2.csv b/src/test/resources/rml-star/valid/RMLSTARTC004b/data2.csv new file mode 100644 index 00000000..d07b44ae --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC004b/data2.csv @@ -0,0 +1,2 @@ +c2-1,c2-2 +z,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC004b/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC004b/mapping.ttl new file mode 100644 index 00000000..6ea45025 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC004b/mapping.ttl @@ -0,0 +1,61 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:quotedTriplesMap :firstTM + ] + ] . + +:thirdTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :secondTM; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-4" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:r ; + rml:objectMap [ + rml:template "http://example/{c2-1}" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC004b/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC004b/output.nt new file mode 100644 index 00000000..7a8d3131 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC004b/output.nt @@ -0,0 +1,3 @@ + . + << >> . +<< << >> >> . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC005a/data.csv b/src/test/resources/rml-star/valid/RMLSTARTC005a/data.csv new file mode 100644 index 00000000..fc181e5f --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC005a/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3 +s,o,z \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC005a/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC005a/mapping.ttl new file mode 100644 index 00000000..9cfe1409 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC005a/mapping.ttl @@ -0,0 +1,40 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:template "http://example/{c3}" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC005a/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC005a/output.nt new file mode 100644 index 00000000..7f2be99c --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC005a/output.nt @@ -0,0 +1 @@ +<< >> . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC005b/data1.csv b/src/test/resources/rml-star/valid/RMLSTARTC005b/data1.csv new file mode 100644 index 00000000..9fe2369b --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC005b/data1.csv @@ -0,0 +1,2 @@ +c1-1,c1-2,c1-3 +s,o,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC005b/data2.csv b/src/test/resources/rml-star/valid/RMLSTARTC005b/data2.csv new file mode 100644 index 00000000..d07b44ae --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC005b/data2.csv @@ -0,0 +1,2 @@ +c2-1,c2-2 +z,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC005b/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC005b/mapping.ttl new file mode 100644 index 00000000..1b885da3 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC005b/mapping.ttl @@ -0,0 +1,44 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-3" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q ; + rml:objectMap [ + rml:template "http://example/{c2-1}" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC005b/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC005b/output.nt new file mode 100644 index 00000000..7f2be99c --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC005b/output.nt @@ -0,0 +1 @@ +<< >> . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC006a/data.csv b/src/test/resources/rml-star/valid/RMLSTARTC006a/data.csv new file mode 100644 index 00000000..8ffc2012 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC006a/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3 +s,o,x \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC006a/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC006a/mapping.ttl new file mode 100644 index 00000000..5de699b9 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC006a/mapping.ttl @@ -0,0 +1,40 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p; ; + rml:objectMap [ + rml:quotedTriplesMap :firstTM + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC006a/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC006a/output.nt new file mode 100644 index 00000000..5aa2cb20 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC006a/output.nt @@ -0,0 +1 @@ + << >> . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC006b/data1.csv b/src/test/resources/rml-star/valid/RMLSTARTC006b/data1.csv new file mode 100644 index 00000000..9fe2369b --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC006b/data1.csv @@ -0,0 +1,2 @@ +c1-1,c1-2,c1-3 +s,o,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC006b/data2.csv b/src/test/resources/rml-star/valid/RMLSTARTC006b/data2.csv new file mode 100644 index 00000000..80e83100 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC006b/data2.csv @@ -0,0 +1,2 @@ +c2-1,c2-2 +x,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC006b/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC006b/mapping.ttl new file mode 100644 index 00000000..c1baf80d --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC006b/mapping.ttl @@ -0,0 +1,44 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p; ; + rml:objectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-2" ; + rml:parent "c1-3" ; + ]; + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC006b/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC006b/output.nt new file mode 100644 index 00000000..5aa2cb20 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC006b/output.nt @@ -0,0 +1 @@ + << >> . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC007a/data.csv b/src/test/resources/rml-star/valid/RMLSTARTC007a/data.csv new file mode 100644 index 00000000..d20882cf --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC007a/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3,c4 +s1,o1,s2,o2 \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC007a/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC007a/mapping.ttl new file mode 100644 index 00000000..16a4cece --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC007a/mapping.ttl @@ -0,0 +1,57 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p1 ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q; ; + rml:objectMap [ + rml:quotedTriplesMap :thirdTM + ] + ] . + +:thirdTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p2 ; + rml:objectMap [ + rml:template "http://example/{c4}" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC007a/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC007a/output.nt new file mode 100644 index 00000000..16b9420a --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC007a/output.nt @@ -0,0 +1 @@ +<< >> << >> . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC007b/data1.csv b/src/test/resources/rml-star/valid/RMLSTARTC007b/data1.csv new file mode 100644 index 00000000..57395e8f --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC007b/data1.csv @@ -0,0 +1,2 @@ +c1-1,c1-2,c1-3 +s1,o1,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC007b/data2.csv b/src/test/resources/rml-star/valid/RMLSTARTC007b/data2.csv new file mode 100644 index 00000000..8e56adc6 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC007b/data2.csv @@ -0,0 +1,2 @@ +c2-1,c2-2,c2-3 +s2,o2,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC007b/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC007b/mapping.ttl new file mode 100644 index 00000000..89ea0073 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC007b/mapping.ttl @@ -0,0 +1,61 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:firstTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p1 ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:secondTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstTM ; + rml:joinCondition [ + rml:child "c2-3" ; + rml:parent "c1-3" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q; ; + rml:objectMap [ + rml:quotedTriplesMap :thirdTM + ] + ] . + +:thirdTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p2 ; + rml:objectMap [ + rml:template "http://example/{c2-2}" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC007b/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC007b/output.nt new file mode 100644 index 00000000..16b9420a --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC007b/output.nt @@ -0,0 +1 @@ +<< >> << >> . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC008a/data.csv b/src/test/resources/rml-star/valid/RMLSTARTC008a/data.csv new file mode 100644 index 00000000..e495323f --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC008a/data.csv @@ -0,0 +1,2 @@ +c1,c2,c3,c4,c5,c6,c7,c8 +s1,o1,s2,o2,s3,o3,s4,o4 \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC008a/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC008a/mapping.ttl new file mode 100644 index 00000000..9144682f --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC008a/mapping.ttl @@ -0,0 +1,125 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:elementaryTM1 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p1 ; + rml:objectMap [ + rml:template "http://example/{c2}" + ] + ] . + +:firstJoinTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :elementaryTM1 + ]; + rml:predicateObjectMap [ + rml:predicate ex:q1; ; + rml:objectMap [ + rml:quotedTriplesMap :elementaryTM2 + ] + ] . + +:elementaryTM2 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p2 ; + rml:objectMap [ + rml:template "http://example/{c4}" + ] + ] . + +:centralJoinTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstJoinTM + ]; + rml:predicateObjectMap [ + rml:predicate ex:q2; + rml:objectMap [ + rml:quotedTriplesMap :secondJoinTM + ] + ] . + +:elementaryTM3 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c5}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p3 ; + rml:objectMap [ + rml:template "http://example/{c6}" + ] + ] . + +:secondJoinTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :elementaryTM3 + ]; + rml:predicateObjectMap [ + rml:predicate ex:q3; ; + rml:objectMap [ + rml:quotedTriplesMap :elementaryTM4 + ] + ] . + +:elementaryTM4 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c7}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p4 ; + rml:objectMap [ + rml:template "http://example/{c8}" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC008a/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC008a/output.nt new file mode 100644 index 00000000..041b8573 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC008a/output.nt @@ -0,0 +1 @@ +<<<<>><<>>>><<<<>><<>>>>. \ No newline at end of file diff --git a/src/test/resources/rml-star/valid/RMLSTARTC008b/data1.csv b/src/test/resources/rml-star/valid/RMLSTARTC008b/data1.csv new file mode 100644 index 00000000..1f57ab59 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC008b/data1.csv @@ -0,0 +1,2 @@ +c1-1,c1-2,c1-3,c1-4,c1-5 +s1,o1,s2,o2,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC008b/data2.csv b/src/test/resources/rml-star/valid/RMLSTARTC008b/data2.csv new file mode 100644 index 00000000..edee9b83 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC008b/data2.csv @@ -0,0 +1,2 @@ +c2-1,c2-2,c2-3,c2-4,c2-5 +s3,o3,s4,o4,1 diff --git a/src/test/resources/rml-star/valid/RMLSTARTC008b/mapping.ttl b/src/test/resources/rml-star/valid/RMLSTARTC008b/mapping.ttl new file mode 100644 index 00000000..ee753626 --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC008b/mapping.ttl @@ -0,0 +1,129 @@ +@prefix rdf: . +@prefix rml: . +@prefix ex: . +@prefix xsd: . +@prefix : . +@base . + +:elementaryTM1 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p1 ; + rml:objectMap [ + rml:template "http://example/{c1-2}" + ] + ] . + +:firstJoinTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :elementaryTM1 + ]; + rml:predicateObjectMap [ + rml:predicate ex:q1; ; + rml:objectMap [ + rml:quotedTriplesMap :elementaryTM2 + ] + ] . + +:elementaryTM2 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data1.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c1-3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p2 ; + rml:objectMap [ + rml:template "http://example/{c1-4}" + ] + ] . + +:centralJoinTM a rml:AssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :firstJoinTM ; + rml:joinCondition [ + rml:child "c2-5" ; + rml:parent "c1-5" ; + ]; + ]; + rml:predicateObjectMap [ + rml:predicate ex:q2; + rml:objectMap [ + rml:quotedTriplesMap :secondJoinTM + ] + ] . + +:elementaryTM3 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2-1}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p3 ; + rml:objectMap [ + rml:template "http://example/{c2-2}" + ] + ] . + +:secondJoinTM a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:quotedTriplesMap :elementaryTM3 + ]; + rml:predicateObjectMap [ + rml:predicate ex:q3; ; + rml:objectMap [ + rml:quotedTriplesMap :elementaryTM4 + ] + ] . + +:elementaryTM4 a rml:NonAssertedTriplesMap ; + rml:logicalSource [ + rml:source [ a rml:Source, rml:RelativePathSource; + rml:path "data2.csv"; + ]; + rml:referenceFormulation rml:CSV + ]; + rml:subjectMap [ + rml:template "http://example/{c2-3}" + ]; + rml:predicateObjectMap [ + rml:predicate ex:p4 ; + rml:objectMap [ + rml:template "http://example/{c2-4}" + ] + ] . diff --git a/src/test/resources/rml-star/valid/RMLSTARTC008b/output.nt b/src/test/resources/rml-star/valid/RMLSTARTC008b/output.nt new file mode 100644 index 00000000..fe36da8e --- /dev/null +++ b/src/test/resources/rml-star/valid/RMLSTARTC008b/output.nt @@ -0,0 +1 @@ +<<<<>><<>>>><<<<>><<>>>>. From ae17d56d64699bbfbfb7cd7873662fda28e271a6 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Tue, 18 Mar 2025 18:33:21 +0100 Subject: [PATCH 03/28] Create fetch-test-cases.bat --- fetch-test-cases.bat | 61 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 fetch-test-cases.bat diff --git a/fetch-test-cases.bat b/fetch-test-cases.bat new file mode 100644 index 00000000..c0586723 --- /dev/null +++ b/fetch-test-cases.bat @@ -0,0 +1,61 @@ +@echo off + +set "targetDir=target" + +echo Creating target directory... +if not exist "%targetDir%" mkdir "%targetDir%" +if errorlevel 1 goto error + +cd "%targetDir%" +if errorlevel 1 goto error + +echo Cloning https://github.com/kg-construct/rml-core +git clone https://github.com/kg-construct/rml-core +if errorlevel 1 goto error + +echo Cloning rhttps://github.com/kg-construct/rml-cc +git clone https://github.com/kg-construct/rml-cc +if errorlevel 1 goto error + +echo Cloning https://github.com/kg-construct/rml-io +git clone https://github.com/kg-construct/rml-io +if errorlevel 1 goto error + +echo Cloning rhttps://github.com/kg-construct/rml-fnml +git clone https://github.com/kg-construct/rml-fnml +if errorlevel 1 goto error + +echo Cloning https://github.com/kg-construct/rml-lv +git clone https://github.com/kg-construct/rml-lv +if errorlevel 1 goto error + +echo Cloning rhttps://github.com/kg-construct/rml-star +git clone https://github.com/kg-construct/rml-star +if errorlevel 1 goto error + +echo All repositories cloned successfully into the target directory! + +echo Copying test-case directories to ..\src\test\resources +xcopy .\rml-core\test-cases ..\src\test\resources\rml-core /E /I /Y +xcopy .\rml-cc\test-cases ..\src\test\resources\rml-cc /E /I /Y +xcopy .\target\rml-io\test-cases ..\src\test\resources\rml-io /E /I /Y +xcopy .\rml-lv\test-cases ..\src\test\resources\rml-lv /E /I /Y +xcopy .\rml-fnml\test-cases ..\src\test\resources\rml-fnml /E /I /Y +xcopy .\rml-star\test-cases ..\src\test\resources\rml-star /E /I /Y + +rmdir /S /Q .\rml-core +rmdir /S /Q .\rml-cc +rmdir /S /Q .\rml-io +rmdir /S /Q .\rml-lv +rmdir /S /Q .\rml-fnml +rmdir /S /Q .\rml-star + +goto end + +:error +echo Error occurred. +echo Check the repository URLs and your internet connection. +echo or verify that you have permissions to create and write to the target directory. + +:end +pause \ No newline at end of file From 93c1e0a5db65e8d29740ffdaee77cd88652b77e8 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Tue, 18 Mar 2025 20:51:56 +0100 Subject: [PATCH 04/28] Tests for CC work! --- pom.xml | 6 ++ src/test/java/burp/TestData.java | 65 ++++++++++++++++++ src/test/java/burp/TestRMLCC.java | 108 ++++++++++++++++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 src/test/java/burp/TestData.java create mode 100644 src/test/java/burp/TestRMLCC.java diff --git a/pom.xml b/pom.xml index 7eceab29..3da813b3 100644 --- a/pom.xml +++ b/pom.xml @@ -176,6 +176,12 @@ 5.10.2 test + + org.junit.jupiter + junit-jupiter-params + 5.10.2 + test + org.testcontainers junit-jupiter diff --git a/src/test/java/burp/TestData.java b/src/test/java/burp/TestData.java new file mode 100644 index 00000000..41696cd4 --- /dev/null +++ b/src/test/java/burp/TestData.java @@ -0,0 +1,65 @@ +package burp; + +public class TestData { + + public String ID; + public String title; + public String description; + public String specification; + public String mapping; + public String input_format1; + public String input_format2; + public String input_format3; + public String output_format1; + public String output_format2; + public String output_format3; + public String input1; + public String input2; + public String input3; + public String output1; + public String output2; + public String output3; + public boolean error; + + TestData(String ID, + String title, + String description, + String specification, + String mapping, + String input_format1, + String input_format2, + String input_format3, + String output_format1, + String output_format2, + String output_format3, + String input1, + String input2, + String input3, + String output1, + String output2, + String output3, + String error) { + this.ID = ID; + this.title = title; + this.description = description; + this.specification = specification; + this.mapping = mapping; + this.input_format1 = input_format1; + this.input_format2 = input_format2; + this.input_format3 = input_format3; + this.output_format1 = output_format1; + this.output_format2 = output_format2; + this.output_format3 = output_format3; + this.input1 = input1; + this.input2 = input2; + this.input3 = input3; + this.output1 = output1; + this.output2 = output2; + this.output3 = output3; + this.error = "true".equalsIgnoreCase(error); + } + + public String toString() { + return ID; + } +} diff --git a/src/test/java/burp/TestRMLCC.java b/src/test/java/burp/TestRMLCC.java new file mode 100644 index 00000000..611a0b3f --- /dev/null +++ b/src/test/java/burp/TestRMLCC.java @@ -0,0 +1,108 @@ +package burp; + +import com.opencsv.CSVReader; +import com.opencsv.exceptions.CsvException; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.riot.RDFDataMgr; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class TestRMLCC { + + public static String base = "./src/test/resources/rml-cc/"; + + static Stream testDataProvider() throws IOException, CsvException { + + Path testCaseDir = Paths.get(base); + + List testDataList = new ArrayList(); + Path csvFilePath = testCaseDir.resolve("./metadata.csv"); + CSVReader reader = new CSVReader(new FileReader(csvFilePath.toFile())); + List records = reader.readAll(); + //skip the header + for (int i = 1; i < records.size(); i++) { + String[] record = records.get(i); + testDataList.add(new TestData( + record[0], record[1], record[2], record[3], + record[4], record[5], record[6], record[7], + record[8], record[9], record[10], record[11], + record[12], record[13], record[14], record[15], + record[16], record[17])); + } + return testDataList.stream(); + } + + @ParameterizedTest + @MethodSource("testDataProvider") + void testDirectoryBasedCases(TestData testData) throws IOException { + System.out.println("--------------------------------------------------------------------------------"); + System.out.println(String.format("Processing test %s", testData.ID)); + System.out.println("--------------------------------------------------------------------------------"); + + System.out.println(testData.mapping); + System.out.println(testData.output1); + System.out.println(testData.error); + System.out.println(); + + if(testData.error) + testForNotOK(testData); + else + testForOK(testData); + } + + public void testForOK(TestData testData) throws IOException { + String m = new File(base + testData.ID, testData.mapping).getAbsolutePath().toString(); + String r = Files.createTempFile(null, ".nq").toString(); + System.out.println(String.format("Writing output to %s", r)); + + System.out.println("This test should generate a graph."); + String o = new File(base + testData.ID, testData.output1).getAbsolutePath().toString(); + + int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }); + + Model expected = RDFDataMgr.loadModel(o); + Model actual = RDFDataMgr.loadModel(r); + + if (!expected.isIsomorphicWith(actual)) { + expected.write(System.out, "Turtle"); + System.out.println("---"); + actual.write(System.out, "Turtle"); + } + + assertEquals(0, exit); + + System.out.println(expected.isIsomorphicWith(actual) ? "OK" : "NOK"); + + assertTrue(expected.isIsomorphicWith(actual)); + } + + public void testForNotOK(TestData testData) throws IOException { + String m = new File(base + testData.ID, testData.mapping).getAbsolutePath().toString(); + String r = Files.createTempFile(null, ".nq").toString(); + System.out.println(String.format("Writing output to %s", r)); + + System.out.println("This test should NOT generate a graph."); + int exit = Main.doMain(new String[] { "-m", m, "-o", r }); + System.out.println(Files.size(Paths.get(r)) == 0 ? "OK" : "NOK"); + Model actual = RDFDataMgr.loadModel(r); + actual.write(System.out, "NQ"); + + assertTrue(exit > 0); + assertTrue(Files.size(Paths.get(r)) == 0); + + System.out.println(); + } +} From 74f2c05f43d6abd474f5651dde3c27a1dabaf20b Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Tue, 18 Mar 2025 20:52:07 +0100 Subject: [PATCH 05/28] Create TestRMLCore.java --- src/test/java/burp/TestRMLCore.java | 114 ++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 src/test/java/burp/TestRMLCore.java diff --git a/src/test/java/burp/TestRMLCore.java b/src/test/java/burp/TestRMLCore.java new file mode 100644 index 00000000..7ee4b730 --- /dev/null +++ b/src/test/java/burp/TestRMLCore.java @@ -0,0 +1,114 @@ +package burp; + +import com.opencsv.CSVReader; +import com.opencsv.exceptions.CsvException; +import org.apache.jena.query.Dataset; +import org.apache.jena.rdf.model.Model; +import org.apache.jena.rdf.model.Resource; +import org.apache.jena.riot.RDFDataMgr; +import org.apache.jena.riot.RDFFormat; +import org.eclipse.jetty.util.IO; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Iterator; +import java.util.List; +import java.util.ArrayList; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class TestRMLCore { + + public static String base = "./src/test/resources/rml-core/"; + + static Stream testDataProvider() throws IOException, CsvException { + + Path testCaseDir = Paths.get(base); + + List testDataList = new ArrayList(); + Path csvFilePath = testCaseDir.resolve("./metadata.csv"); + CSVReader reader = new CSVReader(new FileReader(csvFilePath.toFile())); + List records = reader.readAll(); + //skip the header + for (int i = 1; i < records.size(); i++) { + String[] record = records.get(i); + testDataList.add(new TestData( + record[0], record[1], record[2], record[3], + record[4], record[5], record[6], record[7], + record[8], record[9], record[10], record[11], + record[12], record[13], record[14], record[15], + record[16], record[17])); + } + return testDataList.stream(); + } + + @ParameterizedTest + @MethodSource("testDataProvider") + void testDirectoryBasedCases(TestData testData) throws IOException { + System.out.println("--------------------------------------------------------------------------------"); + System.out.println(String.format("Processing test %s", testData.ID)); + System.out.println("--------------------------------------------------------------------------------"); + + System.out.println(testData.mapping); + System.out.println(testData.output1); + System.out.println(testData.error); + System.out.println(); + + if(testData.error) + testForNotOK(testData); + else + testForOK(testData); + } + + public void testForOK(TestData testData) throws IOException { + String m = new File(base + testData.ID, testData.mapping).getAbsolutePath().toString(); + String r = Files.createTempFile(null, ".nq").toString(); + System.out.println(String.format("Writing output to %s", r)); + + System.out.println("This test should generate a graph."); + String o = new File(base + testData.ID, testData.output1).getAbsolutePath().toString(); + + int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }); + + Model expected = RDFDataMgr.loadModel(o); + Model actual = RDFDataMgr.loadModel(r); + + if (!expected.isIsomorphicWith(actual)) { + expected.write(System.out, "Turtle"); + System.out.println("---"); + actual.write(System.out, "Turtle"); + } + + assertEquals(0, exit); + + System.out.println(expected.isIsomorphicWith(actual) ? "OK" : "NOK"); + + assertTrue(expected.isIsomorphicWith(actual)); + } + + public void testForNotOK(TestData testData) throws IOException { + String m = new File(base + testData.ID, testData.mapping).getAbsolutePath().toString(); + String r = Files.createTempFile(null, ".nq").toString(); + System.out.println(String.format("Writing output to %s", r)); + + System.out.println("This test should NOT generate a graph."); + int exit = Main.doMain(new String[] { "-m", m, "-o", r }); + System.out.println(Files.size(Paths.get(r)) == 0 ? "OK" : "NOK"); + Model actual = RDFDataMgr.loadModel(r); + actual.write(System.out, "NQ"); + + assertTrue(exit > 0); + assertTrue(Files.size(Paths.get(r)) == 0); + + System.out.println(); + } +} From ad6c9dc371c161c52b63a4d78460e5281018eb0b Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Tue, 18 Mar 2025 20:52:21 +0100 Subject: [PATCH 06/28] Fixed test 26a --- .../rml-core/RMLTC0026a-JSON/mapping.ttl | 2 +- .../rml-core/RMLTC0026b-JSON/README.md | 44 +++++++++++++++++++ .../rml-core/RMLTC0026b-JSON/mapping.ttl | 22 ++++++++++ .../rml-core/RMLTC0026b-JSON/persons.json | 5 +++ src/test/resources/rml-core/metadata.csv | 1 + 5 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/rml-core/RMLTC0026b-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0026b-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0026b-JSON/persons.json diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl index 780bd99a..e20151e4 100644 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl @@ -13,7 +13,7 @@ ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.amounts" + rml:reference "$.amounts.*" ]; rml:predicate ex:amount ]; diff --git a/src/test/resources/rml-core/RMLTC0026b-JSON/README.md b/src/test/resources/rml-core/RMLTC0026b-JSON/README.md new file mode 100644 index 00000000..264033c5 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026b-JSON/README.md @@ -0,0 +1,44 @@ +## RMLTC0026a-JSON + +**Title**: "Generation of triples from arrays with wrong reference." + +**Description**: "Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array." + +**Error expected?** Yes + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amounts" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.fname}/{$.lname}" + ] . + +``` \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0026b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0026b-JSON/mapping.ttl new file mode 100644 index 00000000..780bd99a --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026b-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amounts" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.fname}/{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0026b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0026b-JSON/persons.json new file mode 100644 index 00000000..705406a9 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026b-JSON/persons.json @@ -0,0 +1,5 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + ] +} diff --git a/src/test/resources/rml-core/metadata.csv b/src/test/resources/rml-core/metadata.csv index 5376fea4..185e440b 100644 --- a/src/test/resources/rml-core/metadata.csv +++ b/src/test/resources/rml-core/metadata.csv @@ -51,6 +51,7 @@ RMLTC0023f-JSON,"""Invalid IRI template 6""","""Test handling of invalid IRI tem RMLTC0025a-JSON,"""Generation of triples with constant blank node ""","""Tests the generation of triples with a constant blank node""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false RMLTC0025b-JSON,"""Usage of constant term maps in combination with explicitly defined term types""","""Tests the usage of constant term maps in combination with explicitly defined term types""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true RMLTC0026a-JSON,"""Generation of triples from arrays""","""Tests the generation of triples from array input data structures""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false +RMLTC0026b-JSON,"""Generation of triples from arrays with wrong reference.""","""Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,,,,true RMLTC0027a-JSON,"""Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs""","""Tests the generation of triples from relative IRIs using base IRI""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false RMLTC0027b-JSON,"""Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter""","""Tests the generation of triples from relative IRI using base IRI parameter""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false RMLTC0027c-JSON,"""Two triples maps, both with rml:baseIRI defined""","""Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false From 43b088351fd04826e21d30a1c83ea697db85ae8e Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Tue, 18 Mar 2025 21:24:04 +0100 Subject: [PATCH 07/28] Support for baseIRI --- src/main/java/burp/Main.java | 4 +- src/main/java/burp/model/TriplesMap.java | 1 + src/main/java/burp/parse/Parse.java | 3 + src/main/java/burp/vocabularies/RML.java | 1 + src/main/resources/shapes/core.ttl | 745 ++++++++++++----------- src/test/java/burp/TestRMLCore.java | 2 +- 6 files changed, 401 insertions(+), 355 deletions(-) diff --git a/src/main/java/burp/Main.java b/src/main/java/burp/Main.java index d318529e..d7ac6597 100644 --- a/src/main/java/burp/Main.java +++ b/src/main/java/burp/Main.java @@ -68,11 +68,13 @@ public static int doMain(String[] args) { } } - private static Dataset generate(List triplesmaps, String baseIRI) { + private static Dataset generate(List triplesmaps, String givenBaseIRI) { Dataset ds = DatasetFactory.create(); // Execute the triples maps for (TriplesMap tm : triplesmaps) { + String baseIRI = tm.baseIRI == null ? givenBaseIRI : tm.baseIRI; + // Let sm be the subject map of the triples map SubjectMap sm = tm.subjectMap; diff --git a/src/main/java/burp/model/TriplesMap.java b/src/main/java/burp/model/TriplesMap.java index 8c3c9f37..41693492 100644 --- a/src/main/java/burp/model/TriplesMap.java +++ b/src/main/java/burp/model/TriplesMap.java @@ -10,6 +10,7 @@ public class TriplesMap { public LogicalSource logicalSource = null; public SubjectMap subjectMap = null; public List predicateObjectMaps = new ArrayList(); + public String baseIRI = null; public void generateInto(Dataset ds) { // TODO Auto-generated method stub diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index 871e901e..d3edc0ef 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -79,6 +79,9 @@ public static List parseMappingFile(String mappingFile) throws Excep Resource sm = r.getPropertyResourceValue(RML.subjectMap); tm.subjectMap = prepareSubjectMap(sm); + if(r.hasProperty(RML.baseIRI)) + tm.baseIRI = r.getPropertyResourceValue(RML.baseIRI).getURI(); + r.listProperties(RML.predicateObjectMap).forEach((s) -> { PredicateObjectMap pom = preparePredicateObjectMap(s.getObject().asResource()); tm.predicateObjectMaps.add(pom); diff --git a/src/main/java/burp/vocabularies/RML.java b/src/main/java/burp/vocabularies/RML.java index 706a492d..d1a88987 100644 --- a/src/main/java/burp/vocabularies/RML.java +++ b/src/main/java/burp/vocabularies/RML.java @@ -47,6 +47,7 @@ public final class RML { // Properties public static final Property allowEmptyListAndContainer = ResourceFactory.createProperty(NS + "allowEmptyListAndContainer"); + public static final Property baseIRI = ResourceFactory.createProperty(NS + "baseIRI"); public static final Property clazz = ResourceFactory.createProperty(NS + "class"); public static final Property childMap = ResourceFactory.createProperty(NS + "childMap"); public static final Property compression = ResourceFactory.createProperty(NS + "compression"); diff --git a/src/main/resources/shapes/core.ttl b/src/main/resources/shapes/core.ttl index bcbfae3e..939d1a7f 100644 --- a/src/main/resources/shapes/core.ttl +++ b/src/main/resources/shapes/core.ttl @@ -29,373 +29,516 @@ @prefix xml: . @prefix xsd: . - a sh:NodeShape ; - sh:description """ - Strategy to follow when generating RDF triples. - """ ; - sh:in ( rml:append rml:cartesianProduct ) ; - sh:message """ - Strategy must be either rml:append or rml:cartesianProduct. - """ ; - sh:name "Strategy" ; - sh:targetObjectsOf rml:strategy . - a sh:NodeShape ; - sh:and ( [ ] ) ; - sh:description """ + rdfs:label "ChildMap" ; + rdfs:comment """ Represents a Child Map. """ ; + sh:and ( [ ] ) ; sh:message """ rml:ChildMap must specify a literal referencing data in the child data source. """ ; - sh:name "ChildMap" ; sh:targetClass ; sh:targetObjectsOf . a sh:NodeShape ; - sh:and ( [ ] ) ; - sh:description """ + rdfs:label "DatatypeMap" ; + rdfs:comment """ Represents a Datatype Map. """ ; + sh:and ( [ ] ) ; sh:message """ rml:DatatypeMap must specify an rml:template, rml:reference, or rml:constant with the IRI of the datatype. """ ; - sh:name "DatatypeMap" ; sh:targetClass rml:DatatypeMap ; sh:targetObjectsOf rml:datatypeMap . a sh:NodeShape ; - sh:and ( [ sh:in ( rml:IRI rml:BlankNode ) ; + rdfs:label "GraphMap" ; + rdfs:comment """ + Represents a Graph Map. + """ ; + sh:and ( [ sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:BlankNode ) ; sh:message """ - rml:termType must be an IRI or blank node for a Graph Map. + rml:termType must be an rml:IRI, rml:UnsafeIRI, rml:URI, + rml:UnsafeURI, or rml:BlankNode for a Graph Map. """ ; sh:path rml:termType ] ) ; - sh:description """ - Represents a Graph Map. - """ ; sh:message """ - rml:GraphMap must specify an rml:template, rml:reference or rml:constant + rml:GraphMap must specify an rml:template, rml:reference or rml:constant with the IRI of the Named Graph. """ ; - sh:name "GraphMap" ; sh:targetClass rml:GraphMap ; sh:targetObjectsOf rml:graphMap . - a sh:PropertyShape ; - sh:description """ - Specifies the join condition for joining a child data source with - a parent data source of the foreign key constraint. - """ ; - sh:message """ - rml:joinCondition must specify an rml:parent and rml:child. - """ ; - sh:name "joinCondition" ; - sh:node ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:path rml:joinCondition ; - sh:targetSubjectsOf rml:joinCondition . - a sh:NodeShape ; - sh:description """ + rdfs:label "Join" ; + rdfs:comment """ Represents a Join. """ ; sh:message """ - rml:Join must specify exactly one rml:parent/rml:parentMap + rml:Join must specify exactly one rml:parent/rml:parentMap and rml:child/rml:childMap. """ ; - sh:name "Join" ; - sh:property [ sh:description """ - rml:parent/rml:parentMap may only be provided once and + sh:property [ rdfs:label "parentMap/parent" ; + rdfs:comment """ + rml:parent/rml:parentMap may only be provided once and not at the same time. """ ; sh:maxCount 1 ; sh:minCount 1 ; - sh:name "parentMap/parent" ; sh:path [ sh:alternativePath ( rml:parentMap rml:parent ) ] ], - [ sh:description """ + [ rdfs:label "childMap" ; + rdfs:comment """ Specifies the child of the object component for joining. """ ; sh:message """ rml:childMap must point to a rml:ChildMap specifying the child of the Literal. """ ; - sh:name "childMap" ; - sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:childMap ; sh:targetSubjectsOf rml:childMap ], - [ sh:description """ + [ rdfs:label "child" ; + rdfs:comment """ Specifies the child of the object component for joining. """ ; - sh:name "child" ; - sh:node ; sh:nodeKind sh:Literal ; sh:path rml:child ; sh:targetSubjectsOf rml:child ], - [ sh:description """ + [ rdfs:label "parentMap" ; + rdfs:comment """ Specifies the parent of the object component for joining. """ ; sh:message """ - rml:parentMap must point to a rml:ParentMap specifying the + rml:parentMap must point to a rml:ParentMap specifying the parent tag of the string Literal. """ ; - sh:name "parentMap" ; - sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:parentMap ; sh:targetSubjectsOf rml:parentMap ], - [ sh:description """ + [ rdfs:label "parent" ; + rdfs:comment """ Specifies the parent of the object component for joining. """ ; - sh:name "parent" ; - sh:node ; sh:nodeKind sh:Literal ; sh:path rml:parent ; sh:targetSubjectsOf rml:parent ], - [ sh:description """ - rml:child/rml:childMap may only be provided once and + [ rdfs:label "childMap/child" ; + rdfs:comment """ + rml:child/rml:childMap may only be provided once and not at the same time. """ ; sh:maxCount 1 ; sh:minCount 1 ; - sh:name "childMap/child" ; sh:path [ sh:alternativePath ( rml:childMap rml:child ) ] ] ; sh:targetClass rml:Join ; sh:targetObjectsOf rml:joinCondition . a sh:NodeShape ; - sh:and ( [ sh:path rml:constant ; - sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ] ) ; - sh:description """ + rdfs:label "LanguageMap" ; + rdfs:comment """ Represents a Language Map. """ ; + sh:and ( [ sh:path rml:constant ; + sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ] ) ; sh:message """ - rml:LanguageMap must specify an rml:template or rml:constant with the IRI - of the language. + rml:LanguageMap must specify an rml:template, rml:reference, or rml:constant + with the BCP47 name of the language as string. """ ; - sh:name "LanguageMap" ; sh:targetClass rml:LanguageMap ; sh:targetObjectsOf rml:languageMap . - a sh:NodeShape ; - sh:and ( [ sh:description """ - rml:language/rml:languageMap and rml:datatype/rml:datatypeMap - may only be provided once and not at the same time. - """ ; - sh:maxCount 1 ; - sh:minCount 0 ; - sh:name "languageMap/datatypeMap/language/datatype" ; - sh:path [ sh:alternativePath ( rml:languageMap rml:datatypeMap rml:language rml:datatype ) ] ] [ sh:description """ - Specified the language map for the object component for the - generated RDF triples. - """ ; - sh:message """ - rml:languageMap must point to a rml:LanguageMap specifying the - language tag of the string Literal. - """ ; - sh:name "languageMap" ; - sh:node ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:path rml:languageMap ; - sh:targetSubjectsOf rml:languageMap ] [ sh:description """ - Specifies the datatype of the object component for the generated - RDF triples. - """ ; - sh:message """ - rml:datatypeMap must point to a rml:DatatypeMap specifying the - datatype of the Literal. - """ ; - sh:name "datatypeMap" ; - sh:node ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:path rml:datatypeMap ; - sh:targetSubjectsOf rml:datatypeMap ] [ sh:description """ - Language tag for the object. - """ ; - sh:name "language" ; - sh:node ; - sh:path rml:language ; - sh:targetSubjectsOf rml:language ] [ sh:description """ - Datatype for the object. - """ ; - sh:name "datatype" ; - sh:node ; - sh:path rml:datatype ; - sh:targetSubjectsOf rml:datatype ] ) ; - sh:description """ - Represents an Object Map. - """ ; - sh:message """ - Object Map must generate a IRI, Blank Node, or Literal which has optionally - a language tag or datatype. - """ ; - sh:name "ObjectMap" ; - sh:targetClass rml:ObjectMap . - a sh:NodeShape ; - sh:and ( [ ] ) ; - sh:description """ + rdfs:label "ParentMap" ; + rdfs:comment """ Represents a Parent Map. """ ; + sh:and ( [ ] ) ; sh:message """ rml:ParentMap must specify a literal referencing data in the parent data source. """ ; - sh:name "ParentMap" ; sh:targetClass rml:ParentMap ; sh:targetObjectsOf rml:parentMap . a sh:NodeShape ; - sh:and ( [ sh:in ( rml:IRI ) ; + rdfs:label "PredicateMap" ; + rdfs:comment """ + Represents a Predicate Map. + """ ; + sh:and ( [ sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI ) ; sh:message """ - rml:termType for Predicate Map can only be a rml:IRI; + rml:termType for Predicate Map can only be a rml:IRI, rml:UnsafeIRI, + rml:URI, or rml:UnsafeURI; """ ; sh:path rml:termType ] ) ; - sh:description """ - Represents a Predicate Map. - """ ; sh:message """ - Predicate Object Map must generate an IRI representing the predicate of an + Predicate Object Map must generate an IRI representing the predicate of an RDF triple. """ ; - sh:name "PredicateMap" ; sh:targetClass rml:PredicateMap ; sh:targetObjectsOf rml:predicateMap . a sh:NodeShape ; - sh:and ( [ sh:description """ + rdfs:label "PredicateObjectMap" ; + rdfs:comment """ + Represents a Predicate Object Map. + """ ; + sh:and ( [ rdfs:label "predicate/predicateMap" ; + rdfs:comment """ At least one rml:predicate or rml:predicateMap must be provided. """ ; sh:message """ At least one rml:predicate or rml:predicateMap must be provided. """ ; sh:minCount 1 ; - sh:name "predicate/predicateMap" ; sh:path [ sh:alternativePath ( rml:predicate rml:predicateMap ) ] ; sh:targetSubjectsOf rml:predicate, - rml:predicateMap ] [ sh:description """ - A PredicateMap element to generate the predicate component of the + rml:predicateMap ] [ rdfs:label "predicateMap" ; + rdfs:comment """ + A PredicateMap element to generate the predicate component of the (predicate, object) pair from a logical table row or iterator. """ ; sh:message """ rml:predicateMap must be an IRI or blank node and be provided once. """ ; - sh:name "predicateMap" ; - sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:predicateMap ; - sh:targetSubjectsOf rml:predicateMap ] [ sh:description """ - Specifies the predicate for the generated triple from the logical table + sh:targetSubjectsOf rml:predicateMap ] [ rdfs:label "predicate" ; + rdfs:comment """ + Specifies the predicate for the generated triple from the logical table row or iterator. """ ; sh:message """ rml:predicate must be an IRI and be provided once. """ ; - sh:name "predicate" ; - sh:node ; sh:nodeKind sh:IRI ; sh:path rml:predicate ; - sh:targetSubjectsOf rml:predicate ] [ sh:description """ + sh:targetSubjectsOf rml:predicate ] [ rdfs:label "object/objectMap/quotedTriplesMap" ; + rdfs:comment """ Either an rml:object, rml:objectMap, or rml:quotedTriplesMap must be provided, not multiple. """ ; sh:message """ Either an rml:object, rml:objectMap, or rml:quotedTriplesMap must be provided, not multiple """ ; sh:minCount 1 ; - sh:name "object/objectMap/quotedTriplesMap" ; sh:path [ sh:alternativePath ( rml:object rml:objectMap rml:quotedTriplesMap ) ] ; sh:targetSubjectsOf rml:object, rml:objectMap, - rml:quotedTriplesMap ] [ sh:description """ - An ObjectMap element to generate the object component of the + rml:quotedTriplesMap ] [ rdfs:label "objectMap" ; + rdfs:comment """ + An ObjectMap element to generate the object component of the (predicate, object) pair from a logical table row or iterator. """ ; sh:message """ rml:objectMap must be an IRI or blank node and be provided once. """ ; - sh:name "objectMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:or ( [ sh:node ] [ sh:node ] [ sh:node ] ) ; sh:path rml:objectMap ; - sh:targetSubjectsOf rml:objectMap ] [ sh:description """ + sh:targetSubjectsOf rml:objectMap ] [ rdfs:label "object" ; + rdfs:comment """ Specifies the object for the generated RDF triples. """ ; sh:message """ rml:object must be an IRI and be provided once. """ ; - sh:name "object" ; - sh:node ; sh:path rml:object ; sh:targetSubjectsOf rml:object ] ) ; - sh:description """ - Represents a Predicate Object Map. - """ ; - sh:name "PredicateObjectMap" ; sh:targetClass rml:PredicateObjectMap ; sh:targetObjectsOf rml:predicateObjectMap . + a sh:NodeShape ; + rdfs:label "Strategy" ; + rdfs:comment """ + Strategy to follow when generating RDF triples. + """ ; + sh:in ( rml:append rml:cartesianProduct ) ; + sh:message """ + Strategy must be either rml:append or rml:cartesianProduct. + """ ; + sh:targetObjectsOf rml:strategy . + + a sh:NodeShape ; + rdfs:label "TriplesMap" ; + rdfs:comment """ + Represents a Triples Map. + """ ; + sh:and ( [ ] ) ; + sh:message """ + Triples Map requires exactly one rml:subject or one rml:subjectMap and zero + or more rml:predicateObjectMaps. + """ ; + sh:targetClass rml:TriplesMap ; + sh:targetObjectsOf rml:parentTriplesMap . + + a sh:NodeShape ; + rdfs:label "child" ; + rdfs:comment """ + A Literal reference to use as reference to the child data source. + """ ; + sh:datatype xsd:string ; + sh:message """ + rml:child shortcut for rml:ChildMap must be a Literal. + """ ; + sh:nodeKind sh:Literal ; + sh:targetObjectsOf . + + a sh:NodeShape ; + rdfs:label "datatype" ; + rdfs:comment """ + An IRI reference for use as the graph name of all triples generated with + the datatype. + """ ; + sh:message """ + rml:datatype must be an IRI. + """ ; + sh:nodeKind sh:IRI ; + sh:targetObjectsOf rml:datatype . + + a sh:NodeShape ; + rdfs:label "graph" ; + rdfs:comment """ + An IRI reference for use as the graph name of all triples generated with + the Graph Map. + """ ; + sh:message """ + rml:graph must be an IRI or blank node. + """ ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:targetObjectsOf rml:graph . + + a sh:NodeShape ; + rdfs:label "language" ; + rdfs:comment """ + Specified the language for the generated Literal. + """ ; + sh:message """ + rml:language must be a valid language tag according to BCP47 and may + only be provided once as string. + """ ; + sh:nodeKind sh:Literal ; + sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ; + sh:targetObjectsOf rml:language . + + a sh:NodeShape ; + rdfs:label "object" ; + rdfs:comment """ + An IRI, Blank Node, or Literal to use as object for all the RDF triples. + """ ; + sh:message """ + rml:object shortcut for rml:objectMap must be an IRI, Blank Node, + or Literal. + """ ; + sh:targetObjectsOf rml:object . + + a sh:NodeShape ; + rdfs:label "parent" ; + rdfs:comment """ + A Literal reference to use as reference to the parent data source. + """ ; + sh:datatype xsd:string ; + sh:message """ + rml:parent shortcut for rml:ParentMap must be a Literal. + """ ; + sh:nodeKind sh:Literal ; + sh:targetObjectsOf rml:parent . + + a sh:NodeShape ; + rdfs:label "predicate" ; + rdfs:comment """ + Specifies the predicate for the generated triple. + """ ; + sh:message """ + rml:predicate must be an IRI. + """ ; + sh:nodeKind sh:IRI ; + sh:targetObjectsOf rml:predicate . + + a sh:NodeShape ; + rdfs:label "subject" ; + rdfs:comment """ + An IRI reference to use as subject for all the RDF triples. + """ ; + sh:message """ + rml:subject shortcut for rml:SubjectMap must be a IRI or BlankNode. + """ ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:targetObjectsOf rml:subject . + + a sh:NodeShape ; + rdfs:label "Abstract Logical Source" ; + rdfs:comment """ + A sub-class of iterable that can be associated with a triples map such that a data source can be mapped to RDF triples. + """ ; + sh:message """ + rml:AbstractLogicalSource must specify how to generate logical iterations on a data source for a triples map. + """ ; + sh:node ; + sh:targetClass rml:AbstractLogicalSource . + + a sh:NodeShape ; + rdfs:label "Iterable" ; + rdfs:comment """ + An abstract construct to describe data access and iteration for a data source. + """ ; + sh:message """ + Iterable must specify how to generate logical iterations on a data source. + """ ; + sh:property [ rdfs:label "rml:referenceFormulation" ; + rdfs:comment """ + The reference formulation (rml:referenceFormulation) defines how to + reference to elements of the data of the input source. + """ ; + sh:maxCount 1 ; + sh:message """ + rml:referenceFormulation must be a blank node or IRI specifying the + reference formulation on how to reference elements of a data source, + and may be provided at most once. + """ ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path rml:referenceFormulation ], + [ rdfs:label "rml:iterator" ; + rdfs:comment """ + The logical iterator (rml:iterator) defines the iteration loop used to + map the data of the input source. Depends on the reference formulation + if an iterator is necessary. + """ ; + sh:datatype xsd:string ; + sh:maxCount 1 ; + sh:message """ + rml:iterator must be a Literal specifying the iterator to iterate over + the data source, and may be provided at most once. + """ ; + sh:nodeKind sh:Literal ; + sh:path rml:iterator ] ; + sh:targetClass rml:Iterable . + + a sh:PropertyShape ; + rdfs:label "joinCondition" ; + rdfs:comment """ + Specifies the join condition for joining a child data source with + a parent data source of the foreign key constraint. + """ ; + sh:message """ + rml:joinCondition must specify an rml:parent and rml:child. + """ ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path rml:joinCondition ; + sh:targetSubjectsOf rml:joinCondition . + + a sh:NodeShape ; + rdfs:label "ObjectMap" ; + rdfs:comment """ + Represents an Object Map. + """ ; + sh:and ( [ rdfs:label "languageMap/datatypeMap/language/datatype" ; + rdfs:comment """ + rml:language/rml:languageMap and rml:datatype/rml:datatypeMap + may only be provided once and not at the same time. + """ ; + sh:maxCount 1 ; + sh:minCount 0 ; + sh:path [ sh:alternativePath ( rml:languageMap rml:datatypeMap rml:language rml:datatype ) ] ] [ rdfs:label "languageMap" ; + rdfs:comment """ + Specified the language map for the object component for the + generated RDF triples. + """ ; + sh:message """ + rml:languageMap must point to a rml:LanguageMap specifying the + language tag of the string Literal. + """ ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path rml:languageMap ; + sh:targetSubjectsOf rml:languageMap ] [ rdfs:label "datatypeMap" ; + rdfs:comment """ + Specifies the datatype of the object component for the generated + RDF triples. + """ ; + sh:message """ + rml:datatypeMap must point to a rml:DatatypeMap specifying the + datatype of the Literal. + """ ; + sh:nodeKind sh:BlankNodeOrIRI ; + sh:path rml:datatypeMap ; + sh:targetSubjectsOf rml:datatypeMap ] [ rdfs:label "language" ; + rdfs:comment """ + Language tag for the object. + """ ; + sh:nodeKind sh:Literal ; + sh:path rml:language ] [ rdfs:label "datatype" ; + rdfs:comment """ + Datatype for the object. + """ ; + sh:nodeKind sh:IRI ; + sh:path rml:datatype ; + sh:targetSubjectsOf rml:datatype ] ) ; + sh:message """ + Object Map must generate a IRI, Blank Node, or Literal which has optionally + a language tag or datatype. + """ ; + sh:targetClass rml:ObjectMap . + a sh:NodeShape ; - sh:and ( [ - - - - sh:class rml:TriplesMap ; - - sh:description """ + rdfs:label "RefObjectMap" ; + rdfs:comment """ + Represents a Reference Object Map. + """ ; + sh:and ( [ rdfs:label "parentTriplesMap" ; + rdfs:comment """ Specifies the Triples Map element corresponding to the parent data source of the foreign key constraint. """ ; + sh:class rml:TriplesMap ; sh:maxCount 1 ; sh:message """ rml:parentTriplesMap may only be provided once and must be an IRI or Blank Node referring to a Triples Map. """ ; sh:minCount 1 ; - sh:name "parentTriplesMap" ; - sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:parentTriplesMap ; sh:targetSubjectsOf rml:parentTriplesMap ] ) ; - sh:description """ - Represents a Reference Object Map. - """ ; sh:message """ - rml:RefObjectMap must specify a rml:parentTriplesMap and zero or more + rml:RefObjectMap must specify a rml:parentTriplesMap and zero or more rml:joinConditions. """ ; - sh:name "RefObjectMap" ; sh:targetClass rml:RefObjectMap . a sh:NodeShape ; - sh:and ( [ sh:description """ + rdfs:label "SubjectMap" ; + rdfs:comment """ + Represents a Subject Map. + """ ; + sh:and ( [ rdfs:label "class" ; + rdfs:comment """ The subject value generated will be asserted as an instance of this RDFS class. """ ; sh:message """ rml:class must be an IRI and may be specified multiple times. """ ; - sh:name "class" ; sh:nodeKind sh:IRI ; sh:path rml:class ; - sh:targetSubjectsOf rml:class ] [ sh:in ( rml:IRI rml:BlankNode ) ; + sh:targetSubjectsOf rml:class ] [ sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:BlankNode ) ; sh:message """ - rml:termType must be a rml:IRI or rml:BlankNode for Subject Map. + rml:termType must be a rml:IRI, rml:UnsafeIRI, rml:URI, + rml:UnsafeURI, or rml:BlankNode for a Subject Map. """ ; sh:path rml:termType ] ) ; - sh:description """ - Represents a Subject Map. - """ ; sh:message """ - Subject Map must generate an IRI representing the subject of an RDF triple. + Subject Map must generate a resource representing the subject of + an RDF triple. """ ; - sh:name "SubjectMap" ; sh:targetClass rml:SubjectMap ; sh:targetObjectsOf rml:subjectMap . a sh:NodeShape ; - sh:property [ sh:description """ + sh:property [ rdfs:label "logicalSource" ; + rdfs:comment """ A logical source is any source that is mapped to RDF triples. """ ; sh:maxCount 1 ; @@ -403,34 +546,43 @@ Exactly one rml:logicalSource is required to access the data source. """ ; sh:minCount 1 ; - sh:name "logicalSource" ; + sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:logicalSource ; sh:targetSubjectsOf rml:logicalSource ], - [ sh:description """ + [ rdfs:label "subject" ; + rdfs:comment """ An IRI reference for use as subject for all generated RDF triples. """ ; sh:message """ rml:subject must be an IRI or blank node. """ ; - sh:name "subject" ; - sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:subject ; sh:targetSubjectsOf rml:subject ], - [ sh:description """ + [ rdfs:label "predicateObjectMap" ; + rdfs:comment """ A Predicate Object Map element to generate a (predicate, object) pair. """ ; sh:message """ rml:PredicateObjectMap must be an IRI or blank node. """ ; sh:minCount 0 ; - sh:name "predicateObjectMap" ; - sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:predicateObjectMap ; sh:targetSubjectsOf rml:predicateObjectMap ], [ sh:description """ + Base IRI to use for generating RDF triples or quads. + """ ; + sh:maxCount 1 ; + sh:message """ + rml:baseIRI must be an IRI. + """ ; + sh:minCount 0 ; + sh:nodeKind sh:IRI ; + sh:path rml:baseIRI ], + [ rdfs:label "subjectMap/subject/quotedTriplesMap" ; + rdfs:comment """ Either a rml:subject, rml:subjectMap or a rml:quotedTriplesMap is required, not multiple. """ ; sh:maxCount 1 ; @@ -438,18 +590,17 @@ Either a rml:subject, rml:subjectMap or a rml:quotedTriplesMap is required, not multiple. """ ; sh:minCount 1 ; - sh:name "subjectMap/subject/quotedTriplesMap" ; sh:path [ sh:alternativePath ( rml:subjectMap rml:subject rml:quotedTriplesMap ) ] ; sh:targetSubjectsOf rml:quotedTriplesMap, rml:subject, rml:subjectMap ], - [ sh:description """ + [ rdfs:label "subjectMap" ; + rdfs:comment """ A Subject Map element to generate a subject for generated RDF triples. """ ; sh:message """ rml:SubjectMap must be an IRI or blank node. """ ; - sh:name "subjectMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:or ( [ sh:node ] [ sh:node ] ) ; sh:path rml:subjectMap ; @@ -457,114 +608,9 @@ sh:targetClass rml:NonAssertedTriplesMap, rml:TriplesMap . - a sh:NodeShape ; - sh:and ( [ ] ) ; - sh:description """ - Represents a Triples Map. - """ ; - sh:message """ - Triples Map requires exactly one rml:subject or one rml:subjectMap and zero - or more rml:predicateObjectMaps. - """ ; - sh:name "TriplesMap" ; - sh:targetClass rml:TriplesMap . - - a sh:NodeShape ; - sh:datatype xsd:string ; - sh:description """ - A Literal reference to use as reference to the child data source. - """ ; - sh:message """ - rml:child shortcut for rml:ChildMap must be a Literal. - """ ; - sh:name "child" ; - sh:nodeKind sh:Literal ; - sh:targetObjectOf . - - a sh:NodeShape ; - sh:description """ - An IRI reference for use as the graph name of all triples generated with - the datatype. - """ ; - sh:message """ - rml:datatype must be an IRI. - """ ; - sh:name "datatype" ; - sh:nodeKind sh:IRI ; - sh:targetObjectsOf rml:datatype . - - a sh:NodeShape ; - sh:description """ - An IRI reference for use as the graph name of all triples generated with - the Graph Map. - """ ; - sh:message """ - rml:graph must be an IRI or blank node. - """ ; - sh:name "graph" ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:targetObjectsOf rml:graph . - - a sh:NodeShape ; - sh:description """ - Specified the language for the generated Literal. - """ ; - sh:message """ - rml:language must be a valid language tag according to BCP47 and may - only be provided once as string. - """ ; - sh:name "language" ; - sh:nodeKind sh:Literal ; - sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ; - sh:targetObjectsOf rml:language . - - a sh:NodeShape ; - sh:description """ - An IRI, Blank Node, or Literal to use as object for all the RDF triples. - """ ; - sh:message """ - rml:object shortcut for rml:objectMap must be an IRI, Blank Node, - or Literal. - """ ; - sh:name "object" ; - sh:targetObjectsOf rml:object . - - a sh:NodeShape ; - sh:datatype xsd:string ; - sh:description """ - A Literal reference to use as reference to the parent data source. - """ ; - sh:message """ - rml:parent shortcut for rml:ParentMap must be a Literal. - """ ; - sh:name "parent" ; - sh:nodeKind sh:Literal ; - sh:targetObjectsOf rml:parent . - - a sh:NodeShape ; - sh:description """ - Specifies the predicate for the generated triple. - """ ; - sh:message """ - rml:predicate must be an IRI. - """ ; - sh:name "predicate" ; - sh:nodeKind sh:IRI ; - sh:targetObjectsOf rml:predicate . - - a sh:NodeShape ; - sh:description """ - An IRI reference to use as subject for all the RDF triples. - """ ; - sh:message """ - rml:subject shortcut for rml:SubjectMap must be a IRI or BlankNode. - """ ; - sh:name "subject" ; - sh:nodeKind sh:BlankNodeOrIRI ; - sh:targetObjectsOf rml:subject . - a sh:NodeShape ; - sh:property [ sh:description """ + sh:property [ rdfs:label "graph/graphMap" ; + rdfs:comment """ Either an rml:graph or rml:graphMap may be optionally be provided, but not both. """ ; @@ -574,29 +620,26 @@ but not both. """ ; sh:minCount 0 ; - sh:name "graph/graphMap" ; sh:path [ sh:alternativePath ( rml:graph rml:graphMap ) ] ], - [ sh:description """ + [ rdfs:label "graphMap" ; + rdfs:comment """ Specifies a Graph Map. When used with a Subject Map element, all the RDF triples generated will be stored in the specified named graph. - Otherwise, the RDF triple generated using the (predicate, object) + Otherwise, the RDF triple generated using the (predicate, object) pair will be stored in the specified named graph. """ ; sh:message """ - rml:graphMap must be either an IRI or blank node. + rml:graphMap must be either an IRI or blank node. """ ; - sh:name "graphMap" ; - sh:node ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:graphMap ], - [ sh:description """ + [ rdfs:label "graph" ; + rdfs:comment """ An IRI reference to use as the named graph of all generated triples. """ ; sh:message """ - rml:graphMap must be an IRI. + rml:graphMap must be an IRI. """ ; - sh:name "graph" ; - sh:node ; sh:nodeKind sh:IRI ; sh:path rml:graph ] ; sh:targetSubjectsOf rml:graph, @@ -605,76 +648,75 @@ a sh:NodeShape . a sh:NodeShape ; - sh:and ( [ sh:description """ - An IRI indicating whether a generated term should be an IRI, + rdfs:label "TermMap" ; + rdfs:comment """ + Represents a Term Map. + """ ; + sh:and ( [ rdfs:label "termType" ; + rdfs:comment """ + An IRI indicating whether a generated term should be an IRI, Blank Node, or a Literal. """ ; - sh:in ( rml:IRI rml:Literal rml:BlankNode ) ; + sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:Literal rml:BlankNode ) ; sh:maxCount 1 ; sh:message """ - rml:termType must be either rml:IRI, rml:Literal, or rml:BlankNode - for a Term Map. May only be provided once. + rml:termType must be either rml:IRI, rml:UnsafeIRI, + rml:URI, rml:UnsafeURI, rml:Literal, or rml:BlankNode for a Term Map. + May only be provided once. """ ; - sh:name "termType" ; sh:nodeKind sh:IRI ; sh:path rml:termType ; sh:targetSubjectsOf rml:termType ] ) ; - sh:description """ - Represents a Term Map. - """ ; sh:message """ Term Map is an Expression Map with optionally a term type specified. - """ ; - sh:name "TermMap" . + """ . a sh:NodeShape ; - sh:description """ + rdfs:label "ExpressionMap" ; + rdfs:comment """ Represents a Expression Map. """ ; sh:message """ Expression Map requires one rml:template or one rml:constant or one rml:reference. """ ; - sh:name "ExpressionMap" ; - sh:property [ sh:description """ + sh:property [ rdfs:label "template/constant/reference/returnMap/functionExecution" ; + rdfs:comment """ Exactly one rml:template, one rml:constant, one rml:reference, one rml:returnMap, or one rml:functionExecution is required. """ ; sh:maxCount 1 ; sh:message """ - Exactly one rml:template, one rml:constant, one rml:reference, or one rml:functionExecution is required. - """ ; - - # SHOULD BE REMOVED? - # sh:minCount 1 ; - - - sh:name "template/constant/reference/returnMap/functionExecution" ; - sh:path [ sh:alternativePath ( rml:template rml:constant rml:reference rml:functionExecution ) ] ; + Exactly one rml:template, one rml:constant, one rml:reference, + one rml:returnMap, or one rml:functionExecution is required. + """ ; + sh:minCount 1 ; + sh:path [ sh:alternativePath ( rml:template rml:constant rml:reference rml:returnMap rml:functionExecution ) ] ; sh:targetSubjectsOf rml:constant, rml:functionExecution, rml:reference, rml:returnMap, rml:template ], - [ sh:datatype xsd:string ; - sh:description """ - A reference rml:reference is used to refer to a column in case of - databases, a record in case of CSV or TSV data source, an element in + [ rdfs:label "reference" ; + rdfs:comment """ + A reference rml:reference is used to refer to a column in case of + databases, a record in case of CSV or TSV data source, an element in case of XML data source, an object in case of a JSON data source, etc. - A reference must be a valid identifier, considering the reference + A reference must be a valid identifier, considering the reference formulation (rml:referenceFormulation) specified. The reference can be - an absolute path, or a path relative to the iterator specified at the - logical source. + an absolute path, or a path relative to the iterator specified at the + logical source. """ ; + sh:datatype xsd:string ; sh:message """ rml:reference must be a string. """ ; - sh:name "reference" ; sh:nodeKind sh:Literal ; sh:path rml:reference ; sh:targetSubjectsOf rml:reference ], - [ sh:description """ + [ rdfs:label "returnMap" ; + rdfs:comment """ A Return Map rml:returnMap is used to define the return values of a FnO function from the RML-FNML specification. RML Core only validates if the property is present and has the right node kind. The actual validation @@ -683,58 +725,55 @@ sh:message """ rml:returnMap must be an IRI; """ ; - sh:name "returnMap" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:returnMap ; sh:targetSubjectsOf rml:returnMap ], - [ sh:description """ - A Function Execution rml:functionExecution is used to define the FnO - function to execute from the RML-FNML specification. RML Core only + [ rdfs:label "functionExecution" ; + rdfs:comment """ + A Function Execution rml:functionExecution is used to define the FnO + function to execute from the RML-FNML specification. RML Core only validates if the property is present and has the right node kind. The actual validation happens with RML-FNML SHACL shapes. """ ; sh:message """ rml:functionExecution must be an IRI; """ ; - sh:name "functionExecution" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:functionExecution ; sh:targetSubjectsOf rml:functionExecution ], - [ sh:datatype xsd:string ; - sh:description """ - A template (format string) to specify how to generate a value for a + [ rdfs:label "template" ; + rdfs:comment """ + A template (format string) to specify how to generate a value for a subject, predicate, or object, using one or more columns from a logical table row or iterator. """ ; + sh:datatype xsd:string ; sh:message """ rml:template must be a string. """ ; - sh:name "template" ; sh:nodeKind sh:Literal ; sh:path rml:template ], - [ sh:description """ - A property for indicating whether a term map is a constant-valued term + [ rdfs:label "constant" ; + rdfs:comment """ + A property for indicating whether a term map is a constant-valued term map. """ ; sh:message """ rml:constant must be an IRI or Literal. """ ; - sh:name "constant" ; sh:path rml:constant ; sh:targetSubjectsOf rml:constant ] . a sh:PropertyShape ; - sh:description """ + rdfs:label "logicalTarget" ; + rdfs:comment """ A logical target is any target to where generated RDF triples are exported to. """ ; - sh:maxCount 1 ; sh:message """ - Zero or one rml:logicalTarget is required to export RDF triples. + Zero or more rml:logicalTarget is required to export RDF triples. """ ; sh:minCount 0 ; - sh:name "logicalTarget" ; sh:nodeKind sh:BlankNodeOrIRI ; sh:path rml:logicalTarget ; sh:targetSubjectsOf rml:logicalTarget . - diff --git a/src/test/java/burp/TestRMLCore.java b/src/test/java/burp/TestRMLCore.java index 7ee4b730..f7251621 100644 --- a/src/test/java/burp/TestRMLCore.java +++ b/src/test/java/burp/TestRMLCore.java @@ -77,7 +77,7 @@ public void testForOK(TestData testData) throws IOException { System.out.println("This test should generate a graph."); String o = new File(base + testData.ID, testData.output1).getAbsolutePath().toString(); - int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }); + int exit = Main.doMain(new String[] { "-m", m, "-o", r, "-b", "http://example.com/" }); Model expected = RDFDataMgr.loadModel(o); Model actual = RDFDataMgr.loadModel(r); From b9583f489c7b5c78cf23de5f6a3f847b2db818fa Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Wed, 19 Mar 2025 16:23:16 +0100 Subject: [PATCH 08/28] Update core.ttl --- src/main/resources/shapes/core.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/shapes/core.ttl b/src/main/resources/shapes/core.ttl index 939d1a7f..6ecc2ec3 100644 --- a/src/main/resources/shapes/core.ttl +++ b/src/main/resources/shapes/core.ttl @@ -690,7 +690,7 @@ Exactly one rml:template, one rml:constant, one rml:reference, one rml:returnMap, or one rml:functionExecution is required. """ ; - sh:minCount 1 ; + sh:minCount 0 ; sh:path [ sh:alternativePath ( rml:template rml:constant rml:reference rml:returnMap rml:functionExecution ) ] ; sh:targetSubjectsOf rml:constant, rml:functionExecution, From 91ee4adf4e51b21dcfebd5d7761110bb70c0081b Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Mon, 15 Sep 2025 10:25:13 +0200 Subject: [PATCH 09/28] RML-CC tests are updated --- src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md | 3 +-- src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl | 3 +-- 66 files changed, 66 insertions(+), 132 deletions(-) diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md index 52ddf5a4..77b13b89 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl index a72409e0..3ae7402a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md index 22d00ea8..5e9a7982 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl index 20d9348f..090551c6 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md index bf4ab396..bd4b3375 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl index ca963e35..cc59ab25 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md index e9b1bf21..72a129d2 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl index 2117ebdb..464e375f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md index 287d8936..62726bce 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl index 9924fa09..5e5660fd 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md index 332832f9..e63a46f8 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl index 77149652..d4bea911 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md index f9fdbb84..c81d539c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl index 7ed744a7..8f6d0a71 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md index e809d696..e588372e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl index a3545827..416ef309 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md index 49893b9b..3216e09f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl index 8bed79e7..18df5616 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md index 27928980..1fe75b53 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl index 87f8919e..11779d6d 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md index bbdfd65d..c750967b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl index 20d9348f..090551c6 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md index b6d1a3d1..facdad4a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl index ca963e35..cc59ab25 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md index 51262015..4ef9d729 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl index 6da934ad..fec1cb92 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md index 33d9a508..d78e6ac2 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl index 19eee717..8b1336cb 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md index a2a54a71..bb8f5af1 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl index b0db209a..3791cabe 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md index ef82ce64..650449eb 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl index b0db209a..3791cabe 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md index d3c43302..f03ab6a1 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl index a6f85e5e..87ece93e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md index df0571be..404032d8 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl index b8cbc6a9..522fd8b7 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md index d33ee77c..44aac394 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl index b8b8b2f4..210742e9 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md index b2d8ef6b..d3fa35a7 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl index b8b8b2f4..210742e9 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md index a135240f..bccb7e9b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl index 6a91a0db..024f013c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md index 0b98d32c..8d145688 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl index 6a91a0db..024f013c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md index 8d6caf6e..cf730683 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl index 0a156f5c..c838425d 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md index 81bf7f13..bbcc004e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl index 847277ca..3978b48f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md index aed94f81..2a6ef494 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl index 14e90fed..ebfbcce8 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md index 4dac7a04..a7c4ec8f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl index 09f6a13d..dfcc4089 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md index 8478c6ae..5496169b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl index e47599b5..f0d8a3cb 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md index 7cd91a0e..a1536a16 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl index fbd5b088..050e35d1 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md index 4d660585..de0b96e5 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl index 98d2787a..2c1495ac 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md index 68ed8977..554a3f28 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl index 20d9348f..090551c6 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md index 388c4ac2..aa88b932 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl index ca963e35..cc59ab25 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md index c4c65e88..5a0a7735 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl index 1dd36510..92b09f42 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md index ad67043f..e26f112d 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md @@ -14,9 +14,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl index 230573f4..5f44efa7 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl @@ -1,9 +1,8 @@ @prefix rml: . @prefix rdf: . @prefix ex: . -@base . -<#TM> a rml:TriplesMap; + a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; From 3691eaa63d85160085a72033bf5d5bcfa54a365b Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Fri, 26 Sep 2025 15:48:25 +0200 Subject: [PATCH 10/28] Updated all test cases --- fetch-test-cases.sh | 56 + src/test/resources/rml-cc/list.sh | 0 src/test/resources/rml-cc/make-metadata.py | 0 .../rml-core/RMLTC0000-JSON/README.md | 2 + .../rml-core/RMLTC0001a-JSON/README.md | 2 + .../rml-core/RMLTC0001b-JSON/README.md | 2 + .../rml-core/RMLTC0002a-JSON/README.md | 4 +- .../rml-core/RMLTC0002a-JSON/output.nq | 2 +- .../rml-core/RMLTC0002b-JSON/README.md | 2 + .../rml-core/RMLTC0002e-JSON/README.md | 2 + .../rml-core/RMLTC0002g-JSON/README.md | 2 + .../rml-core/RMLTC0003c-JSON/README.md | 2 + .../rml-core/RMLTC0004a-JSON/README.md | 2 + .../rml-core/RMLTC0004b-JSON/README.md | 2 + .../rml-core/RMLTC0005a-JSON/README.md | 2 + .../rml-core/RMLTC0006a-JSON/README.md | 2 + .../rml-core/RMLTC0007a-JSON/README.md | 2 + .../rml-core/RMLTC0007b-JSON/README.md | 2 + .../rml-core/RMLTC0007c-JSON/README.md | 4 +- .../rml-core/RMLTC0007c-JSON/output.nq | 2 +- .../rml-core/RMLTC0007d-JSON/README.md | 4 +- .../rml-core/RMLTC0007d-JSON/output.nq | 2 +- .../rml-core/RMLTC0007e-JSON/README.md | 4 +- .../rml-core/RMLTC0007e-JSON/output.nq | 2 +- .../rml-core/RMLTC0007f-JSON/README.md | 4 +- .../rml-core/RMLTC0007f-JSON/output.nq | 2 +- .../rml-core/RMLTC0007g-JSON/README.md | 2 + .../rml-core/RMLTC0007h-JSON/README.md | 2 + .../rml-core/RMLTC0008a-JSON/README.md | 2 + .../rml-core/RMLTC0008b-JSON/README.md | 2 + .../rml-core/RMLTC0008c-JSON/README.md | 2 + .../rml-core/RMLTC0009a-JSON/README.md | 15 + .../rml-core/RMLTC0009b-JSON/README.md | 15 + .../rml-core/RMLTC0010a-JSON/README.md | 2 + .../rml-core/RMLTC0010b-JSON/README.md | 2 + .../rml-core/RMLTC0010c-JSON/README.md | 2 + .../rml-core/RMLTC0011b-JSON/README.md | 27 + .../rml-core/RMLTC0012a-JSON/README.md | 2 + .../rml-core/RMLTC0012b-JSON/README.md | 26 + .../rml-core/RMLTC0012c-JSON/README.md | 2 + .../rml-core/RMLTC0012d-JSON/README.md | 2 + .../rml-core/RMLTC0013a-JSON/README.md | 2 + .../rml-core/RMLTC0015a-JSON/README.md | 6 +- .../rml-core/RMLTC0015b-JSON/README.md | 6 +- .../rml-core/RMLTC0019a-JSON/README.md | 4 +- .../rml-core/RMLTC0019a-JSON/output.nq | 2 +- .../rml-core/RMLTC0019b-JSON/README.md | 19 +- .../rml-core/RMLTC0019b-JSON/persons.json | 10 - .../rml-core/RMLTC0020a-JSON/README.md | 12 +- .../rml-core/RMLTC0020a-JSON/output.nq | 10 +- .../rml-core/RMLTC0021a-JSON/README.md | 2 + .../rml-core/RMLTC0022a-JSON/README.md | 5 +- .../rml-core/RMLTC0022a-JSON/student.json | 3 +- .../rml-core/RMLTC0022b-JSON/README.md | 14 +- .../rml-core/RMLTC0022b-JSON/mapping.ttl | 2 +- .../rml-core/RMLTC0022c-JSON/README.md | 18 +- .../rml-core/RMLTC0022c-JSON/mapping.ttl | 2 +- .../rml-core/RMLTC0022c-JSON/output.nq | 4 +- .../rml-core/RMLTC0023a-JSON/README.md | 2 + .../rml-core/RMLTC0023b-JSON/README.md | 2 + .../rml-core/RMLTC0023c-JSON/README.md | 2 + .../rml-core/RMLTC0023d-JSON/README.md | 2 + .../rml-core/RMLTC0023e-JSON/README.md | 12 +- .../rml-core/RMLTC0023e-JSON/mapping.ttl | 2 +- .../rml-core/RMLTC0023f-JSON/README.md | 10 +- .../rml-core/RMLTC0023g-JSON/README.md | 48 + .../rml-core/RMLTC0023g-JSON/mapping.ttl | 17 + .../rml-core/RMLTC0023g-JSON/output.nq | 1 + .../rml-core/RMLTC0023g-JSON/student.json | 6 + .../rml-core/RMLTC0024a-JSON/README.md | 51 + .../rml-core/RMLTC0024a-JSON/mapping.ttl | 23 + .../rml-core/RMLTC0024a-JSON/student.json | 8 + .../rml-core/RMLTC0025a-JSON/README.md | 34 +- .../rml-core/RMLTC0025a-JSON/mapping.ttl | 14 +- .../rml-core/RMLTC0025a-JSON/output.nq | 5 +- .../rml-core/RMLTC0025a-JSON/persons.json | 5 + .../rml-core/RMLTC0025b-JSON/README.md | 30 +- .../rml-core/RMLTC0025b-JSON/mapping.ttl | 15 +- .../rml-core/RMLTC0025b-JSON/persons.json | 5 + .../rml-core/RMLTC0025c-JSON/README.md | 58 + .../rml-core/RMLTC0025c-JSON/mapping.ttl | 22 + .../rml-core/RMLTC0025c-JSON/output.nq | 6 + .../rml-core/RMLTC0025c-JSON/persons.json | 5 + .../rml-core/RMLTC0026a-JSON/README.md | 40 +- .../rml-core/RMLTC0026a-JSON/mapping.ttl | 24 +- .../rml-core/RMLTC0026a-JSON/output.nq | 7 +- .../rml-core/RMLTC0026a-JSON/persons.json | 3 +- .../rml-core/RMLTC0026b-JSON/README.md | 49 +- .../rml-core/RMLTC0026b-JSON/mapping.ttl | 24 +- .../rml-core/RMLTC0026b-JSON/output.nq | 4 + .../rml-core/RMLTC0026b-JSON/persons.json | 3 +- .../rml-core/RMLTC0026c-JSON/README.md | 78 + .../rml-core/RMLTC0026c-JSON/mapping.ttl | 43 + .../rml-core/RMLTC0026c-JSON/output.nq | 4 + .../rml-core/RMLTC0026c-JSON/persons.json | 6 + .../rml-core/RMLTC0026d-JSON/README.md | 78 + .../rml-core/RMLTC0026d-JSON/mapping.ttl | 43 + .../rml-core/RMLTC0026d-JSON/output.nq | 4 + .../rml-core/RMLTC0026d-JSON/persons.json | 6 + .../rml-core/RMLTC0027a-JSON/README.md | 59 +- .../rml-core/RMLTC0027a-JSON/mapping.ttl | 35 +- .../rml-core/RMLTC0027a-JSON/output.nq | 9 +- .../rml-core/RMLTC0027a-JSON/student.json | 9 + .../rml-core/RMLTC0027b-JSON/README.md | 60 +- .../rml-core/RMLTC0027b-JSON/mapping.ttl | 36 +- .../rml-core/RMLTC0027b-JSON/output.nq | 9 +- .../rml-core/RMLTC0027b-JSON/student.json | 9 + .../rml-core/RMLTC0027c-JSON/README.md | 60 +- .../rml-core/RMLTC0027c-JSON/mapping.ttl | 36 +- .../rml-core/RMLTC0027c-JSON/output.nq | 9 +- .../rml-core/RMLTC0027c-JSON/student.json | 9 + .../rml-core/RMLTC0028a-JSON/README.md | 52 +- .../rml-core/RMLTC0028a-JSON/data.json | 1 + .../rml-core/RMLTC0028a-JSON/mapping.ttl | 30 +- .../rml-core/RMLTC0028a-JSON/output.nq | 6 +- .../rml-core/RMLTC0028b-JSON/README.md | 60 +- .../rml-core/RMLTC0028b-JSON/data.json | 1 + .../rml-core/RMLTC0028b-JSON/mapping.ttl | 34 +- .../rml-core/RMLTC0028b-JSON/output.nq | 8 +- .../rml-core/RMLTC0028c-JSON/README.md | 53 +- .../rml-core/RMLTC0028c-JSON/data.json | 1 + .../rml-core/RMLTC0028c-JSON/mapping.ttl | 31 +- .../rml-core/RMLTC0028c-JSON/output.nq | 6 +- src/test/resources/rml-core/config.js | 7 + src/test/resources/rml-core/descriptions.csv | 502 +- .../resources/rml-core/descriptions_old.csv | 426 + src/test/resources/rml-core/dev.html | 12 + .../rml-core/docs/20250908/index.html | 3906 ++++++++++ src/test/resources/rml-core/docs/index.html | 1001 ++- src/test/resources/rml-core/list.sh | 0 src/test/resources/rml-core/make-metadata.py | 135 +- src/test/resources/rml-core/manifest.rml.ttl | 7 + src/test/resources/rml-core/manifest.ttl | 504 +- src/test/resources/rml-core/metadata.csv | 126 +- src/test/resources/rml-fnml/README.md | 97 +- .../rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl | 60 +- .../rml-fnml/RMLFNMLTC0001-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0001-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl | 74 +- .../rml-fnml/RMLFNMLTC0002-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0002-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl | 78 +- .../rml-fnml/RMLFNMLTC0003-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0003-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl | 74 +- .../rml-fnml/RMLFNMLTC0005-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0005-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl | 76 +- .../rml-fnml/RMLFNMLTC0011-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0011-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl | 82 +- .../rml-fnml/RMLFNMLTC0021-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0021-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl | 72 +- .../rml-fnml/RMLFNMLTC0031-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0031-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0032-CSV/README.md | 70 + .../rml-fnml/RMLFNMLTC0032-CSV/mapping.ttl | 43 + .../rml-fnml/RMLFNMLTC0032-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0032-CSV/student.csv | 3 + .../rml-fnml/RMLFNMLTC0041-CSV/README.md | 2 +- .../rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl | 78 +- .../rml-fnml/RMLFNMLTC0041-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0041-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl | 124 +- .../rml-fnml/RMLFNMLTC0051-CSV/output.nq | 2 +- .../rml-fnml/RMLFNMLTC0051-CSV/student.csv | 4 +- .../rml-fnml/RMLFNMLTC0071-CSV/README.md | 72 + .../rml-fnml/RMLFNMLTC0071-CSV/mapping.ttl | 46 + .../rml-fnml/RMLFNMLTC0071-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0071-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0081-CSV/README.md | 72 + .../rml-fnml/RMLFNMLTC0081-CSV/mapping.ttl | 46 + .../rml-fnml/RMLFNMLTC0081-CSV/output.nq | 1 + .../rml-fnml/RMLFNMLTC0081-CSV/student.csv | 2 + .../rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl | 76 +- .../rml-fnml/RMLFNMLTC0101-CSV/student.csv | 4 +- src/test/resources/rml-fnml/config.js | 21 + src/test/resources/rml-fnml/descriptions.csv | 37 +- src/test/resources/rml-fnml/dev.html | 3 + .../rml-fnml/docs/20250630/index.html | 1768 +++++ .../rml-fnml/docs/20250806/index.html | 1865 +++++ src/test/resources/rml-fnml/docs/index.html | 563 +- src/test/resources/rml-fnml/list.sh | 0 src/test/resources/rml-fnml/make-metadata.py | 2 +- src/test/resources/rml-fnml/manifest.ttl | 364 +- src/test/resources/rml-fnml/metadata.csv | 39 +- src/test/resources/rml-io/README.md | 14 + .../resources/rml-io/RMLSTC0001a/Friends.json | 27 + .../resources/rml-io/RMLSTC0001a/README.md | 94 + .../resources/rml-io/RMLSTC0001a/default.nq | 10 + .../resources/rml-io/RMLSTC0001a/mapping.ttl | 34 + .../rml-io/RMLSTC0001b/Friends-UTF16.json | Bin 0 -> 664 bytes .../resources/rml-io/RMLSTC0001b/README.md | 94 + .../resources/rml-io/RMLSTC0001b/default.nq | 10 + .../resources/rml-io/RMLSTC0001b/mapping.ttl | 34 + .../resources/rml-io/RMLSTC0002a/Friends.json | 27 + .../resources/rml-io/RMLSTC0002a/README.md | 94 + .../resources/rml-io/RMLSTC0002a/default.nq | 10 + .../resources/rml-io/RMLSTC0002a/mapping.ttl | 34 + .../rml-io/RMLSTC0002b/Friends.json.gz | Bin 0 -> 166 bytes .../resources/rml-io/RMLSTC0002b/README.md | 66 + .../resources/rml-io/RMLSTC0002b/default.nq | 10 + .../resources/rml-io/RMLSTC0002b/mapping.ttl | 35 + .../resources/rml-io/RMLSTC0002c/README.md | 65 + .../resources/rml-io/RMLSTC0002c/default.nq | 10 + .../resources/rml-io/RMLSTC0002c/mapping.ttl | 34 + .../rml-io/RMLSTC0002d/Friends.json.tar.xz | Bin 0 -> 284 bytes .../resources/rml-io/RMLSTC0002d/README.md | 65 + .../resources/rml-io/RMLSTC0002d/default.nq | 10 + .../resources/rml-io/RMLSTC0002d/mapping.ttl | 34 + .../resources/rml-io/RMLSTC0002e/README.md | 65 + .../resources/rml-io/RMLSTC0002e/default.nq | 10 + .../resources/rml-io/RMLSTC0002e/mapping.ttl | 34 + .../resources/rml-io/RMLSTC0003/Friends.nt | 10 + .../resources/rml-io/RMLSTC0003/README.md | 83 + .../resources/rml-io/RMLSTC0003/default.nq | 10 + .../resources/rml-io/RMLSTC0003/mapping.ttl | 40 + .../rml-io/RMLSTC0004a/Friends-NULL.csv | 7 + .../resources/rml-io/RMLSTC0004a/README.md | 73 + .../resources/rml-io/RMLSTC0004a/default.nq | 10 + .../resources/rml-io/RMLSTC0004a/mapping.ttl | 33 + .../rml-io/RMLSTC0004b/Friends-NULL.csv | 7 + .../resources/rml-io/RMLSTC0004b/README.md | 74 + .../resources/rml-io/RMLSTC0004b/default.nq | 10 + .../resources/rml-io/RMLSTC0004b/mapping.ttl | 34 + .../rml-io/RMLSTC0004c/Friends-NULL.csv | 8 + .../resources/rml-io/RMLSTC0004c/README.md | 76 + .../resources/rml-io/RMLSTC0004c/default.nq | 10 + .../resources/rml-io/RMLSTC0004c/mapping.ttl | 35 + .../resources/rml-io/RMLSTC0006a/Friends.csv | 6 + .../resources/rml-io/RMLSTC0006a/README.md | 77 + .../resources/rml-io/RMLSTC0006a/default.nq | 10 + .../resources/rml-io/RMLSTC0006a/mapping.ttl | 38 + .../resources/rml-io/RMLSTC0006b/Friends.csv | 6 + .../resources/rml-io/RMLSTC0006b/README.md | 72 + .../resources/rml-io/RMLSTC0006b/default.nq | 10 + .../resources/rml-io/RMLSTC0006b/mapping.ttl | 33 + .../resources/rml-io/RMLSTC0007a/Friends.json | 27 + .../resources/rml-io/RMLSTC0007a/README.md | 94 + .../resources/rml-io/RMLSTC0007a/default.nq | 10 + .../resources/rml-io/RMLSTC0007a/mapping.ttl | 34 + .../resources/rml-io/RMLSTC0007b/Friends.csv | 6 + .../resources/rml-io/RMLSTC0007b/README.md | 72 + .../resources/rml-io/RMLSTC0007b/default.nq | 10 + .../resources/rml-io/RMLSTC0007b/mapping.ttl | 33 + .../resources/rml-io/RMLSTC0007c/Friends.xml | 22 + .../resources/rml-io/RMLSTC0007c/README.md | 88 + .../resources/rml-io/RMLSTC0007c/default.nq | 10 + .../resources/rml-io/RMLSTC0007c/mapping.ttl | 33 + .../resources/rml-io/RMLSTC0007d/Friends.xml | 22 + .../resources/rml-io/RMLSTC0007d/README.md | 93 + .../resources/rml-io/RMLSTC0007d/default.nq | 10 + .../resources/rml-io/RMLSTC0007d/mapping.ttl | 38 + .../resources/rml-io/RMLSTC0008a/Friends.json | 27 + .../rml-io/RMLSTC0008a/Friends2.json | 7 + .../resources/rml-io/RMLSTC0008a/README.md | 127 + .../resources/rml-io/RMLSTC0008a/default.nq | 12 + .../resources/rml-io/RMLSTC0008a/mapping.ttl | 65 + .../resources/rml-io/RMLSTC0008b/Friends.csv | 2 + .../resources/rml-io/RMLSTC0008b/Friends.json | 27 + .../resources/rml-io/RMLSTC0008b/README.md | 126 + .../resources/rml-io/RMLSTC0008b/default.nq | 12 + .../resources/rml-io/RMLSTC0008b/mapping.ttl | 64 + .../resources/rml-io/RMLSTC0009a/Friends.csv | 6 + .../resources/rml-io/RMLSTC0009a/README.md | 57 + .../resources/rml-io/RMLSTC0009a/mapping.ttl | 33 + .../resources/rml-io/RMLSTC0009a/output.nq | 10 + .../resources/rml-io/RMLSTC0010a/Friends.csv | 2 + .../resources/rml-io/RMLSTC0010a/README.md | 52 + .../resources/rml-io/RMLSTC0010a/mapping.ttl | 32 + .../resources/rml-io/RMLSTC0010b/Friends.csv | 2 + .../resources/rml-io/RMLSTC0010b/README.md | 44 + .../resources/rml-io/RMLSTC0010b/mapping.ttl | 24 + .../resources/rml-io/RMLSTC0011a/README.md | 48 + .../rml-io/RMLSTC0011a/companies.json | 91 + .../resources/rml-io/RMLSTC0011a/default.nq | 2 + .../resources/rml-io/RMLSTC0011a/mapping.ttl | 25 + .../resources/rml-io/RMLSTC0011b/README.md | 51 + .../rml-io/RMLSTC0011b/companies.json | 91 + .../resources/rml-io/RMLSTC0011b/default.nq | 4 + .../resources/rml-io/RMLSTC0011b/mapping.ttl | 26 + .../resources/rml-io/RMLSTC0011c/README.md | 53 + .../rml-io/RMLSTC0011c/companies.json | 91 + .../resources/rml-io/RMLSTC0011c/default.nq | 6 + .../resources/rml-io/RMLSTC0011c/mapping.ttl | 26 + .../resources/rml-io/RMLSTC0011d/README.md | 51 + .../rml-io/RMLSTC0011d/companies.json | 91 + .../resources/rml-io/RMLSTC0011d/default.nq | 4 + .../resources/rml-io/RMLSTC0011d/mapping.ttl | 26 + .../resources/rml-io/RMLSTC0011e/README.md | 65 + .../rml-io/RMLSTC0011e/companies.json | 91 + .../resources/rml-io/RMLSTC0011e/default.nq | 18 + .../resources/rml-io/RMLSTC0011e/mapping.ttl | 26 + .../resources/rml-io/RMLSTC0012a/README.md | 49 + .../rml-io/RMLSTC0012a/companies.xml | 112 + .../resources/rml-io/RMLSTC0012a/default.nq | 2 + .../resources/rml-io/RMLSTC0012a/mapping.ttl | 26 + .../resources/rml-io/RMLSTC0012b/README.md | 51 + .../rml-io/RMLSTC0012b/companies.xml | 112 + .../resources/rml-io/RMLSTC0012b/default.nq | 4 + .../resources/rml-io/RMLSTC0012b/mapping.ttl | 26 + .../resources/rml-io/RMLSTC0012c/README.md | 53 + .../rml-io/RMLSTC0012c/companies.xml | 112 + .../resources/rml-io/RMLSTC0012c/default.nq | 6 + .../resources/rml-io/RMLSTC0012c/mapping.ttl | 26 + .../resources/rml-io/RMLSTC0012d/README.md | 51 + .../rml-io/RMLSTC0012d/companies.xml | 112 + .../resources/rml-io/RMLSTC0012d/default.nq | 4 + .../resources/rml-io/RMLSTC0012d/mapping.ttl | 26 + .../resources/rml-io/RMLSTC0012e/README.md | 65 + .../rml-io/RMLSTC0012e/companies.xml | 112 + .../resources/rml-io/RMLSTC0012e/default.nq | 18 + .../resources/rml-io/RMLSTC0012e/mapping.ttl | 26 + .../resources/rml-io/RMLTTC0000/Friends.json | 27 + .../resources/rml-io/RMLTTC0000/README.md | 94 + .../resources/rml-io/RMLTTC0000/default.nq | 10 + .../resources/rml-io/RMLTTC0000/mapping.ttl | 34 + .../resources/rml-io/RMLTTC0001a/Friends.json | 27 + .../resources/rml-io/RMLTTC0001a/README.md | 108 + .../resources/rml-io/RMLTTC0001a/default.nq | 0 .../resources/rml-io/RMLTTC0001a/dump1.nq | 10 + .../resources/rml-io/RMLTTC0001a/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0001b/Friends.json | 27 + .../resources/rml-io/RMLTTC0001b/README.md | 108 + .../resources/rml-io/RMLTTC0001b/default.nq | 5 + .../resources/rml-io/RMLTTC0001b/dump1.nq | 5 + .../resources/rml-io/RMLTTC0001b/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0001c/Friends.json | 27 + .../resources/rml-io/RMLTTC0001c/README.md | 108 + .../resources/rml-io/RMLTTC0001c/default.nq | 5 + .../resources/rml-io/RMLTTC0001c/dump1.nq | 5 + .../resources/rml-io/RMLTTC0001c/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0001d/Friends.json | 27 + .../resources/rml-io/RMLTTC0001d/README.md | 113 + .../resources/rml-io/RMLTTC0001d/default.nq | 0 .../resources/rml-io/RMLTTC0001d/dump1.nq | 10 + .../resources/rml-io/RMLTTC0001d/mapping.ttl | 48 + .../resources/rml-io/RMLTTC0001e/Friends.json | 27 + .../resources/rml-io/RMLTTC0001e/README.md | 111 + .../resources/rml-io/RMLTTC0001e/default.nq | 5 + .../resources/rml-io/RMLTTC0001e/dump1.nq | 5 + .../resources/rml-io/RMLTTC0001e/mapping.ttl | 46 + .../resources/rml-io/RMLTTC0001f/Friends.json | 27 + .../resources/rml-io/RMLTTC0001f/README.md | 112 + .../resources/rml-io/RMLTTC0001f/default.nq | 5 + .../resources/rml-io/RMLTTC0001f/dump1.nq | 5 + .../resources/rml-io/RMLTTC0001f/mapping.ttl | 47 + .../resources/rml-io/RMLTTC0002a/Friends.json | 27 + .../resources/rml-io/RMLTTC0002a/README.md | 132 + .../resources/rml-io/RMLTTC0002a/default.nq | 0 .../resources/rml-io/RMLTTC0002a/dump1.nq | 10 + .../resources/rml-io/RMLTTC0002a/dump2.nq | 10 + .../resources/rml-io/RMLTTC0002a/mapping.ttl | 52 + .../resources/rml-io/RMLTTC0002b/Friends.json | 27 + .../resources/rml-io/RMLTTC0002b/README.md | 127 + .../resources/rml-io/RMLTTC0002b/default.nq | 0 .../resources/rml-io/RMLTTC0002b/dump1.nq | 10 + .../resources/rml-io/RMLTTC0002b/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002b/mapping.ttl | 52 + .../resources/rml-io/RMLTTC0002c/Friends.json | 27 + .../resources/rml-io/RMLTTC0002c/README.md | 127 + .../resources/rml-io/RMLTTC0002c/default.nq | 0 .../resources/rml-io/RMLTTC0002c/dump1.nq | 10 + .../resources/rml-io/RMLTTC0002c/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002c/mapping.ttl | 52 + .../resources/rml-io/RMLTTC0002d/Friends.json | 27 + .../resources/rml-io/RMLTTC0002d/README.md | 122 + .../resources/rml-io/RMLTTC0002d/default.nq | 0 .../resources/rml-io/RMLTTC0002d/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002d/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002d/mapping.ttl | 52 + .../resources/rml-io/RMLTTC0002e/Friends.json | 27 + .../resources/rml-io/RMLTTC0002e/README.md | 131 + .../resources/rml-io/RMLTTC0002e/default.nq | 0 .../resources/rml-io/RMLTTC0002e/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002e/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002e/dump3.nq | 10 + .../resources/rml-io/RMLTTC0002e/mapping.ttl | 61 + .../resources/rml-io/RMLTTC0002f/Friends.json | 27 + .../resources/rml-io/RMLTTC0002f/README.md | 131 + .../resources/rml-io/RMLTTC0002f/default.nq | 0 .../resources/rml-io/RMLTTC0002f/dump1.nq | 10 + .../resources/rml-io/RMLTTC0002f/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002f/mapping.ttl | 56 + .../resources/rml-io/RMLTTC0002g/Friends.json | 27 + .../resources/rml-io/RMLTTC0002g/README.md | 126 + .../resources/rml-io/RMLTTC0002g/default.nq | 0 .../resources/rml-io/RMLTTC0002g/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002g/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002g/mapping.ttl | 56 + .../resources/rml-io/RMLTTC0002h/Friends.json | 27 + .../resources/rml-io/RMLTTC0002h/README.md | 126 + .../resources/rml-io/RMLTTC0002h/default.nq | 0 .../resources/rml-io/RMLTTC0002h/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002h/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002h/mapping.ttl | 56 + .../resources/rml-io/RMLTTC0002i/Friends.json | 27 + .../resources/rml-io/RMLTTC0002i/README.md | 129 + .../resources/rml-io/RMLTTC0002i/default.nq | 0 .../resources/rml-io/RMLTTC0002i/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002i/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002i/mapping.ttl | 59 + .../resources/rml-io/RMLTTC0002j/Friends.json | 27 + .../resources/rml-io/RMLTTC0002j/README.md | 126 + .../resources/rml-io/RMLTTC0002j/default.nq | 0 .../resources/rml-io/RMLTTC0002j/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002j/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002j/mapping.ttl | 56 + .../resources/rml-io/RMLTTC0002k/Friends.json | 27 + .../resources/rml-io/RMLTTC0002k/README.md | 135 + .../resources/rml-io/RMLTTC0002k/default.nq | 5 + .../resources/rml-io/RMLTTC0002k/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002k/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002k/mapping.ttl | 60 + .../resources/rml-io/RMLTTC0002l/Friends.json | 27 + .../resources/rml-io/RMLTTC0002l/README.md | 127 + .../resources/rml-io/RMLTTC0002l/default.nq | 0 .../resources/rml-io/RMLTTC0002l/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002l/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002l/mapping.ttl | 57 + .../resources/rml-io/RMLTTC0002m/Friends.json | 27 + .../resources/rml-io/RMLTTC0002m/README.md | 122 + .../resources/rml-io/RMLTTC0002m/default.nq | 0 .../resources/rml-io/RMLTTC0002m/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002m/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002m/mapping.ttl | 52 + .../resources/rml-io/RMLTTC0002n/Friends.json | 27 + .../resources/rml-io/RMLTTC0002n/README.md | 122 + .../resources/rml-io/RMLTTC0002n/default.nq | 0 .../resources/rml-io/RMLTTC0002n/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002n/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002n/mapping.ttl | 52 + .../resources/rml-io/RMLTTC0002o/Friends.json | 27 + .../resources/rml-io/RMLTTC0002o/README.md | 134 + .../resources/rml-io/RMLTTC0002o/default.nq | 0 .../resources/rml-io/RMLTTC0002o/dump1.nq | 10 + .../resources/rml-io/RMLTTC0002o/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002o/mapping.ttl | 60 + .../resources/rml-io/RMLTTC0002p/Friends.json | 27 + .../resources/rml-io/RMLTTC0002p/README.md | 141 + .../resources/rml-io/RMLTTC0002p/default.nq | 5 + .../resources/rml-io/RMLTTC0002p/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002p/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002p/mapping.ttl | 66 + .../resources/rml-io/RMLTTC0002q/Friends.json | 27 + .../resources/rml-io/RMLTTC0002q/README.md | 142 + .../resources/rml-io/RMLTTC0002q/default.nq | 5 + .../resources/rml-io/RMLTTC0002q/dump1.nq | 5 + .../resources/rml-io/RMLTTC0002q/dump2.nq | 5 + .../resources/rml-io/RMLTTC0002q/mapping.ttl | 67 + .../resources/rml-io/RMLTTC0002r/Friends.json | 27 + .../resources/rml-io/RMLTTC0002r/README.md | 109 + .../resources/rml-io/RMLTTC0002r/default.nq | 0 .../resources/rml-io/RMLTTC0002r/dump1.nq | 10 + .../resources/rml-io/RMLTTC0002r/mapping.ttl | 44 + .../resources/rml-io/RMLTTC0003a/Friends.json | 27 + .../resources/rml-io/RMLTTC0003a/README.md | 136 + .../resources/rml-io/RMLTTC0003a/default.nq | 0 .../resources/rml-io/RMLTTC0003a/dump1.nq | 5 + .../resources/rml-io/RMLTTC0003a/dump2.nq | 5 + .../resources/rml-io/RMLTTC0003a/mapping.ttl | 66 + .../resources/rml-io/RMLTTC0004a/Friends.json | 27 + .../resources/rml-io/RMLTTC0004a/README.md | 131 + .../resources/rml-io/RMLTTC0004a/default.nq | 0 .../resources/rml-io/RMLTTC0004a/dump1.jsonld | 33 + .../resources/rml-io/RMLTTC0004a/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0004b/Friends.json | 27 + .../resources/rml-io/RMLTTC0004b/README.md | 110 + .../resources/rml-io/RMLTTC0004b/default.nq | 0 .../resources/rml-io/RMLTTC0004b/dump1.n3 | 12 + .../resources/rml-io/RMLTTC0004b/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0004c/Friends.json | 27 + .../resources/rml-io/RMLTTC0004c/README.md | 108 + .../resources/rml-io/RMLTTC0004c/default.nq | 0 .../resources/rml-io/RMLTTC0004c/dump1.nt | 10 + .../resources/rml-io/RMLTTC0004c/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0004d/Friends.json | 27 + .../resources/rml-io/RMLTTC0004d/README.md | 108 + .../resources/rml-io/RMLTTC0004d/default.nq | 0 .../resources/rml-io/RMLTTC0004d/dump1.nq | 10 + .../resources/rml-io/RMLTTC0004d/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0004e/Friends.json | 27 + .../resources/rml-io/RMLTTC0004e/README.md | 120 + .../resources/rml-io/RMLTTC0004e/default.nq | 0 .../rml-io/RMLTTC0004e/dump1.rdfjson | 22 + .../resources/rml-io/RMLTTC0004e/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0004f/Friends.json | 27 + .../resources/rml-io/RMLTTC0004f/README.md | 121 + .../resources/rml-io/RMLTTC0004f/default.nq | 0 .../resources/rml-io/RMLTTC0004f/dump1.rdfxml | 23 + .../resources/rml-io/RMLTTC0004f/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0004g/Friends.json | 27 + .../resources/rml-io/RMLTTC0004g/README.md | 108 + .../resources/rml-io/RMLTTC0004g/default.nq | 0 .../resources/rml-io/RMLTTC0004g/dump1.ttl | 10 + .../resources/rml-io/RMLTTC0004g/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0005a/Friends.json | 27 + .../resources/rml-io/RMLTTC0005a/README.md | 109 + .../resources/rml-io/RMLTTC0005a/default.nq | 0 .../resources/rml-io/RMLTTC0005a/dump1.nq | 10 + .../resources/rml-io/RMLTTC0005a/mapping.ttl | 44 + .../resources/rml-io/RMLTTC0005b/Friends.json | 27 + .../resources/rml-io/RMLTTC0005b/README.md | 109 + .../resources/rml-io/RMLTTC0005b/default.nq | 0 .../resources/rml-io/RMLTTC0005b/dump1.nq | Bin 0 -> 1358 bytes .../resources/rml-io/RMLTTC0005b/mapping.ttl | 44 + .../resources/rml-io/RMLTTC0006a/Friends.json | 27 + .../resources/rml-io/RMLTTC0006a/README.md | 108 + .../resources/rml-io/RMLTTC0006a/default.nq | 0 .../resources/rml-io/RMLTTC0006a/dump1.nq | 10 + .../resources/rml-io/RMLTTC0006a/mapping.ttl | 43 + .../resources/rml-io/RMLTTC0006b/Friends.json | 27 + .../resources/rml-io/RMLTTC0006b/README.md | 97 + .../resources/rml-io/RMLTTC0006b/default.nq | 0 .../resources/rml-io/RMLTTC0006b/dump1.nq.gz | Bin 0 -> 193 bytes .../resources/rml-io/RMLTTC0006b/mapping.ttl | 44 + .../resources/rml-io/RMLTTC0006c/Friends.json | 27 + .../resources/rml-io/RMLTTC0006c/README.md | 97 + .../resources/rml-io/RMLTTC0006c/default.nq | 0 .../resources/rml-io/RMLTTC0006c/mapping.ttl | 44 + .../resources/rml-io/RMLTTC0006d/Friends.json | 27 + .../resources/rml-io/RMLTTC0006d/README.md | 98 + .../resources/rml-io/RMLTTC0006d/default.nq | 0 .../rml-io/RMLTTC0006d/dump1.nq.tar.xz | Bin 0 -> 277 bytes .../resources/rml-io/RMLTTC0006d/mapping.ttl | 45 + .../resources/rml-io/RMLTTC0006e/Friends.json | 27 + .../resources/rml-io/RMLTTC0006e/README.md | 97 + .../resources/rml-io/RMLTTC0006e/default.nq | 0 .../resources/rml-io/RMLTTC0006e/mapping.ttl | 44 + .../resources/rml-io/RMLTTC0007a/Friends.json | 27 + .../resources/rml-io/RMLTTC0007a/README.md | 108 + .../resources/rml-io/RMLTTC0007a/default.nq | 0 .../resources/rml-io/RMLTTC0007a/dump1.nq | 10 + .../resources/rml-io/RMLTTC0007a/mapping.ttl | 43 + src/test/resources/rml-io/config.js | 73 + src/test/resources/rml-io/descriptions.csv | 85 + src/test/resources/rml-io/dev.html | 173 + .../resources/rml-io/docs/20250130/index.html | 5687 ++++++++++++++ .../resources/rml-io/docs/20250217/index.html | 5298 +++++++++++++ .../resources/rml-io/docs/20250228/index.html | 6190 +++++++++++++++ .../resources/rml-io/docs/20250630/index.html | 6880 +++++++++++++++++ src/test/resources/rml-io/docs/index.html | 6880 +++++++++++++++++ src/test/resources/rml-io/list.sh | 5 + src/test/resources/rml-io/make-metadata.py | 210 + src/test/resources/rml-io/manifest.rml.ttl | 267 + src/test/resources/rml-io/manifest.ttl | 1096 +++ src/test/resources/rml-io/metadata.csv | 74 + src/test/resources/rml-io/section/abstract.md | 1 + .../resources/rml-io/section/data-model.md | 12 + .../resources/rml-io/section/introduction.md | 4 + .../resources/rml-io/section/test-cases.md | 10 + src/test/resources/rml-lv/README.md | 12 + .../resources/rml-lv/RMLLVTC0002c/README.md | 5 - .../resources/rml-lv/RMLLVTC0002c/mapping.ttl | 5 - .../resources/rml-lv/RMLLVTC0007b/README.md | 2 +- .../resources/rml-lv/RMLLVTC0007b/mapping.ttl | 2 +- .../resources/rml-lv/RMLLVTC0008b/README.md | 13 +- src/test/resources/rml-lv/config.js | 1 + src/test/resources/rml-lv/descriptions.csv | 82 +- src/test/resources/rml-lv/dev.html | 1 + .../resources/rml-lv/docs/20250508/index.html | 3529 +++++++++ .../resources/rml-lv/docs/20250725/index.html | 3490 +++++++++ .../resources/rml-lv/docs/20250805/index.html | 3524 +++++++++ src/test/resources/rml-lv/docs/index.html | 969 ++- src/test/resources/rml-lv/list.sh | 0 src/test/resources/rml-lv/make-metadata.py | 6 +- src/test/resources/rml-lv/manifest.ttl | 212 +- src/test/resources/rml-lv/metadata.csv | 66 +- src/test/resources/rml-star/descriptions.csv | 36 +- src/test/resources/rml-star/list.sh | 0 src/test/resources/rml-star/make-metadata.py | 0 src/test/resources/rml-star/metadata.csv | 38 +- 573 files changed, 69745 insertions(+), 2889 deletions(-) create mode 100755 fetch-test-cases.sh mode change 100644 => 100755 src/test/resources/rml-cc/list.sh mode change 100644 => 100755 src/test/resources/rml-cc/make-metadata.py create mode 100644 src/test/resources/rml-core/RMLTC0023g-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0023g-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0023g-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0023g-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0024a-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0024a-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0024a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0025a-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0025b-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0025c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0025c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0025c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0025c-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0026b-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0026c-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0026c-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0026c-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0026c-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0026d-JSON/README.md create mode 100644 src/test/resources/rml-core/RMLTC0026d-JSON/mapping.ttl create mode 100644 src/test/resources/rml-core/RMLTC0026d-JSON/output.nq create mode 100644 src/test/resources/rml-core/RMLTC0026d-JSON/persons.json create mode 100644 src/test/resources/rml-core/RMLTC0027a-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0027b-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0027c-JSON/student.json create mode 100644 src/test/resources/rml-core/RMLTC0028a-JSON/data.json create mode 100644 src/test/resources/rml-core/RMLTC0028b-JSON/data.json create mode 100644 src/test/resources/rml-core/RMLTC0028c-JSON/data.json create mode 100644 src/test/resources/rml-core/descriptions_old.csv create mode 100644 src/test/resources/rml-core/docs/20250908/index.html mode change 100644 => 100755 src/test/resources/rml-core/list.sh mode change 100644 => 100755 src/test/resources/rml-core/make-metadata.py create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/README.md create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/mapping.ttl create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/output.nq create mode 100644 src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/student.csv create mode 100644 src/test/resources/rml-fnml/docs/20250630/index.html create mode 100644 src/test/resources/rml-fnml/docs/20250806/index.html mode change 100644 => 100755 src/test/resources/rml-fnml/list.sh mode change 100644 => 100755 src/test/resources/rml-fnml/make-metadata.py create mode 100644 src/test/resources/rml-io/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0001a/Friends.json create mode 100644 src/test/resources/rml-io/RMLSTC0001a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0001a/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0001a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0001b/Friends-UTF16.json create mode 100644 src/test/resources/rml-io/RMLSTC0001b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0001b/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0001b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0002a/Friends.json create mode 100644 src/test/resources/rml-io/RMLSTC0002a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0002a/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0002a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0002b/Friends.json.gz create mode 100644 src/test/resources/rml-io/RMLSTC0002b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0002b/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0002b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0002c/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0002c/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0002c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0002d/Friends.json.tar.xz create mode 100644 src/test/resources/rml-io/RMLSTC0002d/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0002d/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0002d/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0002e/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0002e/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0002e/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0003/Friends.nt create mode 100644 src/test/resources/rml-io/RMLSTC0003/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0003/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0003/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0004a/Friends-NULL.csv create mode 100644 src/test/resources/rml-io/RMLSTC0004a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0004a/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0004a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0004b/Friends-NULL.csv create mode 100644 src/test/resources/rml-io/RMLSTC0004b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0004b/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0004b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0004c/Friends-NULL.csv create mode 100644 src/test/resources/rml-io/RMLSTC0004c/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0004c/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0004c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0006a/Friends.csv create mode 100644 src/test/resources/rml-io/RMLSTC0006a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0006a/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0006a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0006b/Friends.csv create mode 100644 src/test/resources/rml-io/RMLSTC0006b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0006b/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0006b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0007a/Friends.json create mode 100644 src/test/resources/rml-io/RMLSTC0007a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0007a/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0007a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0007b/Friends.csv create mode 100644 src/test/resources/rml-io/RMLSTC0007b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0007b/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0007b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0007c/Friends.xml create mode 100644 src/test/resources/rml-io/RMLSTC0007c/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0007c/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0007c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0007d/Friends.xml create mode 100644 src/test/resources/rml-io/RMLSTC0007d/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0007d/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0007d/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0008a/Friends.json create mode 100644 src/test/resources/rml-io/RMLSTC0008a/Friends2.json create mode 100644 src/test/resources/rml-io/RMLSTC0008a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0008a/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0008a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0008b/Friends.csv create mode 100644 src/test/resources/rml-io/RMLSTC0008b/Friends.json create mode 100644 src/test/resources/rml-io/RMLSTC0008b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0008b/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0008b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0009a/Friends.csv create mode 100644 src/test/resources/rml-io/RMLSTC0009a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0009a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0009a/output.nq create mode 100644 src/test/resources/rml-io/RMLSTC0010a/Friends.csv create mode 100644 src/test/resources/rml-io/RMLSTC0010a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0010a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0010b/Friends.csv create mode 100644 src/test/resources/rml-io/RMLSTC0010b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0010b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0011a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0011a/companies.json create mode 100644 src/test/resources/rml-io/RMLSTC0011a/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0011a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0011b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0011b/companies.json create mode 100644 src/test/resources/rml-io/RMLSTC0011b/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0011b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0011c/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0011c/companies.json create mode 100644 src/test/resources/rml-io/RMLSTC0011c/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0011c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0011d/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0011d/companies.json create mode 100644 src/test/resources/rml-io/RMLSTC0011d/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0011d/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0011e/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0011e/companies.json create mode 100644 src/test/resources/rml-io/RMLSTC0011e/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0011e/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0012a/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0012a/companies.xml create mode 100644 src/test/resources/rml-io/RMLSTC0012a/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0012a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0012b/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0012b/companies.xml create mode 100644 src/test/resources/rml-io/RMLSTC0012b/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0012b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0012c/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0012c/companies.xml create mode 100644 src/test/resources/rml-io/RMLSTC0012c/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0012c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0012d/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0012d/companies.xml create mode 100644 src/test/resources/rml-io/RMLSTC0012d/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0012d/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLSTC0012e/README.md create mode 100644 src/test/resources/rml-io/RMLSTC0012e/companies.xml create mode 100644 src/test/resources/rml-io/RMLSTC0012e/default.nq create mode 100644 src/test/resources/rml-io/RMLSTC0012e/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0000/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0000/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0000/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0000/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0001a/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0001a/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0001a/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001a/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0001b/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0001b/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0001b/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001b/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0001c/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0001c/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0001c/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001c/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0001d/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0001d/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0001d/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001d/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001d/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0001e/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0001e/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0001e/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001e/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001e/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0001f/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0001f/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0001f/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001f/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0001f/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002a/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002a/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002a/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002a/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002a/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002b/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002b/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002b/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002b/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002b/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002c/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002c/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002c/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002c/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002c/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002d/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002d/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002d/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002d/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002d/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002d/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002e/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002e/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002e/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002e/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002e/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002e/dump3.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002e/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002f/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002f/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002f/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002f/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002f/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002f/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002g/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002g/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002g/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002g/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002g/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002g/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002h/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002h/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002h/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002h/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002h/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002h/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002i/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002i/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002i/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002i/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002i/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002i/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002j/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002j/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002j/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002j/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002j/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002j/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002k/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002k/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002k/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002k/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002k/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002k/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002l/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002l/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002l/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002l/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002l/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002l/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002m/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002m/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002m/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002m/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002m/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002m/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002n/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002n/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002n/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002n/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002n/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002n/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002o/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002o/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002o/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002o/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002o/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002o/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002p/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002p/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002p/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002p/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002p/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002p/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002q/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002q/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002q/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002q/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002q/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002q/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0002r/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0002r/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0002r/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002r/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0002r/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0003a/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0003a/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0003a/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0003a/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0003a/dump2.nq create mode 100644 src/test/resources/rml-io/RMLTTC0003a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0004a/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0004a/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0004a/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0004a/dump1.jsonld create mode 100644 src/test/resources/rml-io/RMLTTC0004a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0004b/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0004b/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0004b/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0004b/dump1.n3 create mode 100644 src/test/resources/rml-io/RMLTTC0004b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0004c/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0004c/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0004c/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0004c/dump1.nt create mode 100644 src/test/resources/rml-io/RMLTTC0004c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0004d/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0004d/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0004d/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0004d/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0004d/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0004e/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0004e/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0004e/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0004e/dump1.rdfjson create mode 100644 src/test/resources/rml-io/RMLTTC0004e/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0004f/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0004f/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0004f/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0004f/dump1.rdfxml create mode 100644 src/test/resources/rml-io/RMLTTC0004f/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0004g/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0004g/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0004g/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0004g/dump1.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0004g/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0005a/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0005a/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0005a/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0005a/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0005a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0005b/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0005b/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0005b/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0005b/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0005b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0006a/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0006a/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0006a/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0006a/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0006a/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0006b/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0006b/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0006b/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0006b/dump1.nq.gz create mode 100644 src/test/resources/rml-io/RMLTTC0006b/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0006c/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0006c/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0006c/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0006c/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0006d/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0006d/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0006d/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0006d/dump1.nq.tar.xz create mode 100644 src/test/resources/rml-io/RMLTTC0006d/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0006e/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0006e/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0006e/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0006e/mapping.ttl create mode 100644 src/test/resources/rml-io/RMLTTC0007a/Friends.json create mode 100644 src/test/resources/rml-io/RMLTTC0007a/README.md create mode 100644 src/test/resources/rml-io/RMLTTC0007a/default.nq create mode 100644 src/test/resources/rml-io/RMLTTC0007a/dump1.nq create mode 100644 src/test/resources/rml-io/RMLTTC0007a/mapping.ttl create mode 100644 src/test/resources/rml-io/config.js create mode 100644 src/test/resources/rml-io/descriptions.csv create mode 100644 src/test/resources/rml-io/dev.html create mode 100644 src/test/resources/rml-io/docs/20250130/index.html create mode 100644 src/test/resources/rml-io/docs/20250217/index.html create mode 100644 src/test/resources/rml-io/docs/20250228/index.html create mode 100644 src/test/resources/rml-io/docs/20250630/index.html create mode 100644 src/test/resources/rml-io/docs/index.html create mode 100755 src/test/resources/rml-io/list.sh create mode 100755 src/test/resources/rml-io/make-metadata.py create mode 100644 src/test/resources/rml-io/manifest.rml.ttl create mode 100644 src/test/resources/rml-io/manifest.ttl create mode 100644 src/test/resources/rml-io/metadata.csv create mode 100644 src/test/resources/rml-io/section/abstract.md create mode 100644 src/test/resources/rml-io/section/data-model.md create mode 100644 src/test/resources/rml-io/section/introduction.md create mode 100644 src/test/resources/rml-io/section/test-cases.md create mode 100644 src/test/resources/rml-lv/README.md create mode 100644 src/test/resources/rml-lv/docs/20250508/index.html create mode 100644 src/test/resources/rml-lv/docs/20250725/index.html create mode 100644 src/test/resources/rml-lv/docs/20250805/index.html mode change 100644 => 100755 src/test/resources/rml-lv/list.sh mode change 100644 => 100755 src/test/resources/rml-lv/make-metadata.py mode change 100644 => 100755 src/test/resources/rml-star/list.sh mode change 100644 => 100755 src/test/resources/rml-star/make-metadata.py diff --git a/fetch-test-cases.sh b/fetch-test-cases.sh new file mode 100755 index 00000000..554f0aba --- /dev/null +++ b/fetch-test-cases.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +# --- config --- +target_dir="target" +resources_dir="src/test/resources" +repos=( + "rml-core" + "rml-cc" + "rml-io" + "rml-fnml" + "rml-lv" + "rml-star" +) + +trap 'echo; echo "Error occurred."; echo "• Check the repository URLs and your internet connection."; echo "• Verify you have permissions to create/write to \"$target_dir\"."; exit 1' ERR + +# Check prerequisites +command -v git >/dev/null 2>&1 || { echo "git is required but not found in PATH."; exit 1; } + +echo "Creating $target_dir directory..." +mkdir -p "$target_dir" + +echo "Entering $target_dir..." +cd "$target_dir" + +# Clone all repositories +for repo in "${repos[@]}"; do + echo "Cloning https://github.com/kg-construct/$repo ..." + git clone "https://github.com/kg-construct/$repo" +done + +echo "All repositories cloned successfully into $target_dir" + +# Copy test-cases into ../src/test/resources/ +echo "Copying test-case directories to ../$resources_dir ..." +for repo in "${repos[@]}"; do + src="$repo/test-cases" + dest="../$resources_dir/$repo" + if [[ -d "$src" ]]; then + mkdir -p "$dest" + # -a to preserve attrs; -r for recursive; --no-target-directory not needed here + cp -a "$src/." "$dest/" + echo "• Copied $src -> $dest" + else + echo "• Skipped $repo (no test-cases directory found)" + fi +done + +# Remove cloned repositories +echo "Cleaning up cloned repositories..." +for repo in "${repos[@]}"; do + rm -rf "./$repo" +done + +echo "Done." diff --git a/src/test/resources/rml-cc/list.sh b/src/test/resources/rml-cc/list.sh old mode 100644 new mode 100755 diff --git a/src/test/resources/rml-cc/make-metadata.py b/src/test/resources/rml-cc/make-metadata.py old mode 100644 new mode 100755 diff --git a/src/test/resources/rml-core/RMLTC0000-JSON/README.md b/src/test/resources/rml-core/RMLTC0000-JSON/README.md index 17168dca..b8bc8015 100644 --- a/src/test/resources/rml-core/RMLTC0000-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0000-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests if an empty table produces an empty RDF graph" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0001a-JSON/README.md b/src/test/resources/rml-core/RMLTC0001a-JSON/README.md index 0bb26b0c..a8181987 100644 --- a/src/test/resources/rml-core/RMLTC0001a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0001a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0001b-JSON/README.md b/src/test/resources/rml-core/RMLTC0001b-JSON/README.md index f8e738ce..a2391102 100644 --- a/src/test/resources/rml-core/RMLTC0001b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0001b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/README.md b/src/test/resources/rml-core/RMLTC0002a-JSON/README.md index 850f1d5b..fc9f8483 100644 --- a/src/test/resources/rml-core/RMLTC0002a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0002a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -53,7 +55,7 @@ **Output** ``` "Venus" . - "10" . + "10"^^ . . diff --git a/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq index 174309a6..cf274fb0 100644 --- a/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0002a-JSON/output.nq @@ -1,4 +1,4 @@ "Venus" . - "10" . + "10"^^ . . diff --git a/src/test/resources/rml-core/RMLTC0002b-JSON/README.md b/src/test/resources/rml-core/RMLTC0002b-JSON/README.md index 452ea19f..09891e2a 100644 --- a/src/test/resources/rml-core/RMLTC0002b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0002b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0002e-JSON/README.md b/src/test/resources/rml-core/RMLTC0002e-JSON/README.md index 3a237729..0324c94f 100644 --- a/src/test/resources/rml-core/RMLTC0002e-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0002e-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the presence of an undefined rml:path" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0002g-JSON/README.md b/src/test/resources/rml-core/RMLTC0002g-JSON/README.md index 5a04f6e5..512f5cb1 100644 --- a/src/test/resources/rml-core/RMLTC0002g-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0002g-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test the presence of an invalid JSONPath" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0003c-JSON/README.md b/src/test/resources/rml-core/RMLTC0003c-JSON/README.md index 67fdc5a3..722070b0 100644 --- a/src/test/resources/rml-core/RMLTC0003c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0003c-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0004a-JSON/README.md b/src/test/resources/rml-core/RMLTC0004a-JSON/README.md index 2fcfb0be..9930094b 100644 --- a/src/test/resources/rml-core/RMLTC0004a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0004a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0004b-JSON/README.md b/src/test/resources/rml-core/RMLTC0004b-JSON/README.md index fcb279b2..447cd83e 100644 --- a/src/test/resources/rml-core/RMLTC0004b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0004b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0005a-JSON/README.md b/src/test/resources/rml-core/RMLTC0005a-JSON/README.md index 28dae551..a796f16a 100644 --- a/src/test/resources/rml-core/RMLTC0005a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0005a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the typing of resources" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0006a-JSON/README.md b/src/test/resources/rml-core/RMLTC0006a-JSON/README.md index ffa61754..c901da55 100644 --- a/src/test/resources/rml-core/RMLTC0006a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0006a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0007a-JSON/README.md b/src/test/resources/rml-core/RMLTC0007a-JSON/README.md index c86dcf39..54b13a37 100644 --- a/src/test/resources/rml-core/RMLTC0007a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0007a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the typing resources by relying on rdf:type predicate" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0007b-JSON/README.md b/src/test/resources/rml-core/RMLTC0007b-JSON/README.md index 7dcbda75..e4e921e8 100644 --- a/src/test/resources/rml-core/RMLTC0007b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0007b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the generation of triples to a named graph" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/README.md b/src/test/resources/rml-core/RMLTC0007c-JSON/README.md index 7bd10d6e..7d4dab80 100644 --- a/src/test/resources/rml-core/RMLTC0007c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0007c-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests subjectmap with more than one class IRIs, rml:class" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -54,7 +56,7 @@ **Output** ``` "Venus" . - "10" . + "10"^^ . . . diff --git a/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq index fb4d7fe2..ae78ddfb 100644 --- a/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0007c-JSON/output.nq @@ -1,5 +1,5 @@ "Venus" . - "10" . + "10"^^ . . . diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/README.md b/src/test/resources/rml-core/RMLTC0007d-JSON/README.md index 82b12af4..94042941 100644 --- a/src/test/resources/rml-core/RMLTC0007d-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0007d-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -60,7 +62,7 @@ **Output** ``` "Venus" . - "10" . + "10"^^ . . . diff --git a/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq index 2f24266d..2232abdb 100644 --- a/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0007d-JSON/output.nq @@ -1,5 +1,5 @@ "Venus" . - "10" . + "10"^^ . . . diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/README.md b/src/test/resources/rml-core/RMLTC0007e-JSON/README.md index a4b5eb8b..d4a1458b 100644 --- a/src/test/resources/rml-core/RMLTC0007e-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0007e-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests subjectmap with rml:graphMap and rml:class" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -53,7 +55,7 @@ **Output** ``` - "10" . + "10"^^ . "Venus" . . diff --git a/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq index 4cbaaf55..c5ea4c49 100644 --- a/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0007e-JSON/output.nq @@ -1,4 +1,4 @@ - "10" . + "10"^^ . "Venus" . . diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/README.md b/src/test/resources/rml-core/RMLTC0007f-JSON/README.md index 32e9b11a..f9cff3b4 100644 --- a/src/test/resources/rml-core/RMLTC0007f-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0007f-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -59,7 +61,7 @@ ``` . "Venus" . - "10" . + "10"^^ . ``` diff --git a/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq b/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq index d4694d78..fb6a536c 100644 --- a/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0007f-JSON/output.nq @@ -1,4 +1,4 @@ . "Venus" . - "10" . + "10"^^ . diff --git a/src/test/resources/rml-core/RMLTC0007g-JSON/README.md b/src/test/resources/rml-core/RMLTC0007g-JSON/README.md index 3a17bc06..bc7e645b 100644 --- a/src/test/resources/rml-core/RMLTC0007g-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0007g-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the generation of triples to the default graph" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0007h-JSON/README.md b/src/test/resources/rml-core/RMLTC0007h-JSON/README.md index f53be206..acb63958 100644 --- a/src/test/resources/rml-core/RMLTC0007h-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0007h-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the generation of triples to a non-IRI named graph, which is an error" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0008a-JSON/README.md b/src/test/resources/rml-core/RMLTC0008a-JSON/README.md index 8f103be4..a0841468 100644 --- a/src/test/resources/rml-core/RMLTC0008a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0008a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0008b-JSON/README.md b/src/test/resources/rml-core/RMLTC0008b-JSON/README.md index eb07d5cc..b426d4fb 100644 --- a/src/test/resources/rml-core/RMLTC0008b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0008b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the mapping specification referencing object map without join" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0008c-JSON/README.md b/src/test/resources/rml-core/RMLTC0008c-JSON/README.md index cb8103a7..fd07d456 100644 --- a/src/test/resources/rml-core/RMLTC0008c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0008c-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0009a-JSON/README.md b/src/test/resources/rml-core/RMLTC0009a-JSON/README.md index 49bbe110..6bb9aef6 100644 --- a/src/test/resources/rml-core/RMLTC0009a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0009a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test foreign key relationships among logical tables" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -24,6 +26,19 @@ ``` +**Input 1** +``` +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + } + ] +} + +``` + **Mapping** ``` @prefix foaf: . diff --git a/src/test/resources/rml-core/RMLTC0009b-JSON/README.md b/src/test/resources/rml-core/RMLTC0009b-JSON/README.md index 0d6849fb..051d9bb5 100644 --- a/src/test/resources/rml-core/RMLTC0009b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0009b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test that results from distinct parts of the mapping can be directed to different target graphs." +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -24,6 +26,19 @@ ``` +**Input 1** +``` +{ + "sports": [ + { + "ID": 100, + "Name": "Tennis" + } + ] +} + +``` + **Mapping** ``` @prefix foaf: . diff --git a/src/test/resources/rml-core/RMLTC0010a-JSON/README.md b/src/test/resources/rml-core/RMLTC0010a-JSON/README.md index 37bc7686..f465982b 100644 --- a/src/test/resources/rml-core/RMLTC0010a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0010a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests a template with blank space in column value" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0010b-JSON/README.md b/src/test/resources/rml-core/RMLTC0010b-JSON/README.md index f2d50d64..a91ee546 100644 --- a/src/test/resources/rml-core/RMLTC0010b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0010b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests a template with special chars in column value" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0010c-JSON/README.md b/src/test/resources/rml-core/RMLTC0010c-JSON/README.md index 67b87e59..62298579 100644 --- a/src/test/resources/rml-core/RMLTC0010c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0010c-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests a template with special chars in reference value and backslash escapes in string templates" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0011b-JSON/README.md b/src/test/resources/rml-core/RMLTC0011b-JSON/README.md index d9577b18..9383be71 100644 --- a/src/test/resources/rml-core/RMLTC0011b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0011b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests, M to M relations, by using an additional Triples Map" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -18,6 +20,31 @@ ``` +**Input 1** +``` +{ + "sports": [ + {"ID":110, "Description":"Tennis"}, + {"ID":111, "Description":"Football"}, + {"ID":112, "Description":"Formula1"} + ] +} + +``` + +**Input 2** +``` +{ + "links": [ + {"ID_Student":10, "ID_Sport":110}, + {"ID_Student":11, "ID_Sport":111}, + {"ID_Student":11, "ID_Sport":112}, + {"ID_Student":12, "ID_Sport":111} + ] +} + +``` + **Mapping** ``` @prefix ex: . diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/README.md b/src/test/resources/rml-core/RMLTC0012a-JSON/README.md index 94dbd97c..810939a8 100644 --- a/src/test/resources/rml-core/RMLTC0012a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0012a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests that blank nodes can be generated by referencing multiple columns" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0012b-JSON/README.md b/src/test/resources/rml-core/RMLTC0012b-JSON/README.md index e3256c38..8f51b221 100644 --- a/src/test/resources/rml-core/RMLTC0012b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0012b-JSON/README.md @@ -4,8 +4,34 @@ **Description**: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent." +**Default Base IRI**: http://example.com/ + **Error expected?** No +**Input** +``` +{ + "lives": [ + {"fname":"Bob","lname":"Smith","city":"London"}, + {"fname":"Sue","lname":"Jones","city":"Madrid"}, + {"fname":"Bob","lname":"Smith","city":"London"} + ] +} + +``` + +**Input 1** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20}, + {"fname":"Bob","lname":"Smith","amount":30} + ] +} + +``` + **Mapping** ``` @prefix ex: . diff --git a/src/test/resources/rml-core/RMLTC0012c-JSON/README.md b/src/test/resources/rml-core/RMLTC0012c-JSON/README.md index 47befcf4..c65174cf 100644 --- a/src/test/resources/rml-core/RMLTC0012c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0012c-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests a RML with missing information, TriplesMap without subjectMap." +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0012d-JSON/README.md b/src/test/resources/rml-core/RMLTC0012d-JSON/README.md index 54555564..3b3dfa90 100644 --- a/src/test/resources/rml-core/RMLTC0012d-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0012d-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests a RML with wrong information, TriplesMap with two subjectMap." +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0013a-JSON/README.md b/src/test/resources/rml-core/RMLTC0013a-JSON/README.md index e8a3ee14..8a42b808 100644 --- a/src/test/resources/rml-core/RMLTC0013a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0013a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests if null values in JSON files are handled correctly." +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0015a-JSON/README.md b/src/test/resources/rml-core/RMLTC0015a-JSON/README.md index 6724525b..89812126 100644 --- a/src/test/resources/rml-core/RMLTC0015a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0015a-JSON/README.md @@ -4,14 +4,16 @@ **Description**: "Generation of language tags from a table with language information" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** ``` { "countries": [ - {"Code": "BO", "Name": "Bolivia, Plurinational State of"}, - {"Code": "IE", "Name": "Ireland"} + {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"}, + {"Code": "IE", "Name": "Irlanda"} ] } diff --git a/src/test/resources/rml-core/RMLTC0015b-JSON/README.md b/src/test/resources/rml-core/RMLTC0015b-JSON/README.md index 77492a08..006c0dba 100644 --- a/src/test/resources/rml-core/RMLTC0015b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0015b-JSON/README.md @@ -4,14 +4,16 @@ **Description**: "Tests a term map with an invalid rml:language value, which is an error" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** ``` { "countries": [ - {"Code": "BO", "Name": "Bolivia, Plurinational State of"}, - {"Code": "IE", "Name": "Ireland"} + {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"}, + {"Code": "IE", "Name": "Irlanda"} ] } diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/README.md b/src/test/resources/rml-core/RMLTC0019a-JSON/README.md index 6c906c7d..eb11b856 100644 --- a/src/test/resources/rml-core/RMLTC0019a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0019a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test the generation of triples by using IRI value in attributes" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -54,7 +56,7 @@ **Output** ``` "http://example.com/ns#Jhon" . - "Carlos" . + "Carlos" . ``` diff --git a/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq index d07559d8..4a97fdf0 100644 --- a/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0019a-JSON/output.nq @@ -1,2 +1,2 @@ "http://example.com/ns#Jhon" . - "Carlos" . + "Carlos" . diff --git a/src/test/resources/rml-core/RMLTC0019b-JSON/README.md b/src/test/resources/rml-core/RMLTC0019b-JSON/README.md index 73dcd7b4..768c29dd 100644 --- a/src/test/resources/rml-core/RMLTC0019b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0019b-JSON/README.md @@ -4,22 +4,14 @@ **Description**: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)" -**Error expected?** No +**Default Base IRI**: http://example.com/ + +**Error expected?** Yes **Input** ``` { "persons": [ - { - "ID": 10, - "FirstName": "http://example.com/ns#Jhon", - "LastName": "Smith" - }, - { - "ID": 20, - "FirstName": "Carlos", - "LastName": "Mendoza" - }, { "ID": 30, "FirstName": "Juan Daniel", @@ -56,8 +48,3 @@ ``` -**Output** -``` - -``` - diff --git a/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json index ba1e6036..87c4f146 100644 --- a/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json +++ b/src/test/resources/rml-core/RMLTC0019b-JSON/persons.json @@ -1,15 +1,5 @@ { "persons": [ - { - "ID": 10, - "FirstName": "http://example.com/ns#Jhon", - "LastName": "Smith" - }, - { - "ID": 20, - "FirstName": "Carlos", - "LastName": "Mendoza" - }, { "ID": 30, "FirstName": "Juan Daniel", diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/README.md b/src/test/resources/rml-core/RMLTC0020a-JSON/README.md index 1458831b..bfbd4be7 100644 --- a/src/test/resources/rml-core/RMLTC0020a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0020a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test the generation of triples by using IRI value in attributes" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -48,11 +50,11 @@ **Output** ``` - . - . - . - . - . + . + . + . + . + . ``` diff --git a/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq index 65071a55..d2b4b5f9 100644 --- a/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0020a-JSON/output.nq @@ -1,5 +1,5 @@ - . - . - . - . - . + . + . + . + . + . diff --git a/src/test/resources/rml-core/RMLTC0021a-JSON/README.md b/src/test/resources/rml-core/RMLTC0021a-JSON/README.md index b5511f29..ac2bc65d 100644 --- a/src/test/resources/rml-core/RMLTC0021a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0021a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Tests the mapping specification referencing object map with same logical source and join condition" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** diff --git a/src/test/resources/rml-core/RMLTC0022a-JSON/README.md b/src/test/resources/rml-core/RMLTC0022a-JSON/README.md index 514bc3dd..31d47a23 100644 --- a/src/test/resources/rml-core/RMLTC0022a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0022a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test triples with a fixed constant datatype" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** @@ -11,7 +13,8 @@ { "students": [{ "ID": 10, - "Name":"Venus" + "Name":"Venus", + "Age": 21 }] } diff --git a/src/test/resources/rml-core/RMLTC0022a-JSON/student.json b/src/test/resources/rml-core/RMLTC0022a-JSON/student.json index 0f6f797f..b51a0d81 100644 --- a/src/test/resources/rml-core/RMLTC0022a-JSON/student.json +++ b/src/test/resources/rml-core/RMLTC0022a-JSON/student.json @@ -1,6 +1,7 @@ { "students": [{ "ID": 10, - "Name":"Venus" + "Name":"Venus", + "Age": 21 }] } diff --git a/src/test/resources/rml-core/RMLTC0022b-JSON/README.md b/src/test/resources/rml-core/RMLTC0022b-JSON/README.md index 4f280921..7fe506f0 100644 --- a/src/test/resources/rml-core/RMLTC0022b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0022b-JSON/README.md @@ -4,16 +4,16 @@ **Description**: "Test triples with a XSD datatype generated from the data" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** ``` -{ - "students": [{ - "ID": 10, - "Name":"Venus" - }] -} +[ + { "FOO": 1, "BAR": "string"}, + { "FOO": 2, "BAR": "int"} +] ``` @@ -25,7 +25,7 @@ a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; + rml:iterator "$[*]"; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; rml:path "data.json" diff --git a/src/test/resources/rml-core/RMLTC0022b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0022b-JSON/mapping.ttl index dec8c244..0f519282 100644 --- a/src/test/resources/rml-core/RMLTC0022b-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0022b-JSON/mapping.ttl @@ -4,7 +4,7 @@ a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; + rml:iterator "$[*]"; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; rml:path "data.json" diff --git a/src/test/resources/rml-core/RMLTC0022c-JSON/README.md b/src/test/resources/rml-core/RMLTC0022c-JSON/README.md index 81444a3d..72870ba6 100644 --- a/src/test/resources/rml-core/RMLTC0022c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0022c-JSON/README.md @@ -4,16 +4,16 @@ **Description**: "Test triples with a custom datype from the data" +**Default Base IRI**: http://example.com/ + **Error expected?** No **Input** ``` -{ - "students": [{ - "ID": 10, - "Name":"Venus" - }] -} +[ + { "FOO": 1, "BAR": "string"}, + { "FOO": 2, "BAR": "int"} +] ``` @@ -25,7 +25,7 @@ a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; + rml:iterator "$[*]"; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; rml:path "data.json" @@ -48,8 +48,8 @@ **Output** ``` - "1"^^ . - "2"^^ . + "1"^^ . + "2"^^ . ``` diff --git a/src/test/resources/rml-core/RMLTC0022c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0022c-JSON/mapping.ttl index c76b54ee..3bc1cd72 100644 --- a/src/test/resources/rml-core/RMLTC0022c-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0022c-JSON/mapping.ttl @@ -4,7 +4,7 @@ a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; + rml:iterator "$[*]"; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; rml:path "data.json" diff --git a/src/test/resources/rml-core/RMLTC0022c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0022c-JSON/output.nq index 0e3c60c4..dcca5d82 100644 --- a/src/test/resources/rml-core/RMLTC0022c-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0022c-JSON/output.nq @@ -1,2 +1,2 @@ - "1"^^ . - "2"^^ . + "1"^^ . + "2"^^ . diff --git a/src/test/resources/rml-core/RMLTC0023a-JSON/README.md b/src/test/resources/rml-core/RMLTC0023a-JSON/README.md index d117d362..e44908d6 100644 --- a/src/test/resources/rml-core/RMLTC0023a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0023a-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test handling of invalid IRI template" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0023b-JSON/README.md b/src/test/resources/rml-core/RMLTC0023b-JSON/README.md index ac69aec3..4419f9cf 100644 --- a/src/test/resources/rml-core/RMLTC0023b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0023b-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test handling of invalid IRI template" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0023c-JSON/README.md b/src/test/resources/rml-core/RMLTC0023c-JSON/README.md index 2b7b103d..88366050 100644 --- a/src/test/resources/rml-core/RMLTC0023c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0023c-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test handling of invalid IRI template" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0023d-JSON/README.md b/src/test/resources/rml-core/RMLTC0023d-JSON/README.md index c3073f9c..d042bb20 100644 --- a/src/test/resources/rml-core/RMLTC0023d-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0023d-JSON/README.md @@ -4,6 +4,8 @@ **Description**: "Test handling of invalid IRI template" +**Default Base IRI**: http://example.com/ + **Error expected?** Yes **Input** diff --git a/src/test/resources/rml-core/RMLTC0023e-JSON/README.md b/src/test/resources/rml-core/RMLTC0023e-JSON/README.md index d5504619..3b070852 100644 --- a/src/test/resources/rml-core/RMLTC0023e-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0023e-JSON/README.md @@ -4,7 +4,9 @@ **Description**: "Test handling of invalid IRI template" -**Error expected?** No +**Default Base IRI**: http://example.com/ + +**Error expected?** Yes **Input** ``` @@ -32,16 +34,10 @@ ] ]; rml:subjectMap [ - rml:template "http://example.com/{\\{Name\\}}"; + rml:template "http://example.com/{\\\\{Name\\\\}}"; rml:class foaf:Person; ] . ``` -**Output** -``` - . - -``` - diff --git a/src/test/resources/rml-core/RMLTC0023e-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0023e-JSON/mapping.ttl index 6a619068..4d56d8ab 100644 --- a/src/test/resources/rml-core/RMLTC0023e-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0023e-JSON/mapping.ttl @@ -11,7 +11,7 @@ ] ]; rml:subjectMap [ - rml:template "http://example.com/{\\{Name\\}}"; + rml:template "http://example.com/{\\\\{Name\\\\}}"; rml:class foaf:Person; ] . diff --git a/src/test/resources/rml-core/RMLTC0023f-JSON/README.md b/src/test/resources/rml-core/RMLTC0023f-JSON/README.md index 167724e5..806cd208 100644 --- a/src/test/resources/rml-core/RMLTC0023f-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0023f-JSON/README.md @@ -4,7 +4,9 @@ **Description**: "Test handling of invalid IRI template" -**Error expected?** No +**Default Base IRI**: http://example.com/ + +**Error expected?** Yes **Input** ``` @@ -38,9 +40,3 @@ ``` -**Output** -``` - . - -``` - diff --git a/src/test/resources/rml-core/RMLTC0023g-JSON/README.md b/src/test/resources/rml-core/RMLTC0023g-JSON/README.md new file mode 100644 index 00000000..7900c40d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023g-JSON/README.md @@ -0,0 +1,48 @@ +## RMLTC0023g-JSON + +**Title**: "Valid IRI template with backslash-escape" + +**Description**: "Test handling of a valid IRI template using backslash-escape" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "students": [{ + "ID": 10, + "{Name}":"Venus" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{\\{Name\\}}"; + rml:class foaf:Person; + ] . + + +``` + +**Output** +``` + . +``` + diff --git a/src/test/resources/rml-core/RMLTC0023g-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0023g-JSON/mapping.ttl new file mode 100644 index 00000000..6a619068 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023g-JSON/mapping.ttl @@ -0,0 +1,17 @@ +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:referenceFormulation rml:JSONPath; + rml:iterator "$.students[*]"; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:subjectMap [ + rml:template "http://example.com/{\\{Name\\}}"; + rml:class foaf:Person; + ] . + diff --git a/src/test/resources/rml-core/RMLTC0023g-JSON/output.nq b/src/test/resources/rml-core/RMLTC0023g-JSON/output.nq new file mode 100644 index 00000000..aa54753b --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023g-JSON/output.nq @@ -0,0 +1 @@ + . \ No newline at end of file diff --git a/src/test/resources/rml-core/RMLTC0023g-JSON/student.json b/src/test/resources/rml-core/RMLTC0023g-JSON/student.json new file mode 100644 index 00000000..2aa21689 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0023g-JSON/student.json @@ -0,0 +1,6 @@ +{ + "students": [{ + "ID": 10, + "{Name}":"Venus" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0024a-JSON/README.md b/src/test/resources/rml-core/RMLTC0024a-JSON/README.md new file mode 100644 index 00000000..142a5bef --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0024a-JSON/README.md @@ -0,0 +1,51 @@ +## RMLTC0024a-JSON + +**Title**: "Usage of constant term maps in combination with explicitly defined term types" + +**Description**: "Tests the usage of constant term maps in combination with explicitly defined term types" + +**Default Base IRI**: http://example.com/ + +**Error expected?** Yes + +**Input** +``` +{ + "students": [{ + "Name":"Venus" + }, + { + "Name":"Julio" + }] +} + +``` + +**Mapping** +``` +@prefix foaf: . +@prefix rml: . +@prefix ex: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:student + ]; + rml:subjectMap [ + rml:constant "School"; + rml:termType rml:BlankNode + ] . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0024a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0024a-JSON/mapping.ttl new file mode 100644 index 00000000..387a3943 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0024a-JSON/mapping.ttl @@ -0,0 +1,23 @@ +@prefix foaf: . +@prefix rml: . +@prefix ex: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.students[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "student.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.Name" + ]; + rml:predicate ex:student + ]; + rml:subjectMap [ + rml:constant "School"; + rml:termType rml:BlankNode + ] . diff --git a/src/test/resources/rml-core/RMLTC0024a-JSON/student.json b/src/test/resources/rml-core/RMLTC0024a-JSON/student.json new file mode 100644 index 00000000..10ebb2e1 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0024a-JSON/student.json @@ -0,0 +1,8 @@ +{ + "students": [{ + "Name":"Venus" + }, + { + "Name":"Julio" + }] +} diff --git a/src/test/resources/rml-core/RMLTC0025a-JSON/README.md b/src/test/resources/rml-core/RMLTC0025a-JSON/README.md index 5bf2ee67..7ecf2ddd 100644 --- a/src/test/resources/rml-core/RMLTC0025a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0025a-JSON/README.md @@ -1,53 +1,55 @@ ## RMLTC0025a-JSON -**Title**: "Generation of triples with constant blank node " +**Title**: "Generation of triples from arrays" -**Description**: "Tests the generation of triples with a constant blank node" +**Description**: "Tests the generation of triples from array input data structures" + +**Default Base IRI**: http://example.com/ **Error expected?** No **Input** ``` { - "students": [{ - "Name":"Venus" - }, - { - "Name":"Julio" - }] + "persons": [ + {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + ] } ``` **Mapping** ``` +@prefix ex: . @prefix foaf: . @prefix rml: . -@prefix ex: . a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; + rml:iterator "$.persons[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "student.json" + rml:path "persons.json" ] ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.Name" + rml:reference "$.amounts[*]" ]; - rml:predicate ex:student + rml:predicate ex:amount ]; - rml:subject _:School . + rml:subjectMap [ + rml:template "http://example.com/Student/{$.fname}/{$.lname}" + ] . ``` **Output** ``` -_:School "Julio" . -_:School "Venus" . + "30"^^ . + "40"^^ . + "50"^^ . ``` diff --git a/src/test/resources/rml-core/RMLTC0025a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0025a-JSON/mapping.ttl index fb1a85a8..ea839cde 100644 --- a/src/test/resources/rml-core/RMLTC0025a-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0025a-JSON/mapping.ttl @@ -1,20 +1,22 @@ +@prefix ex: . @prefix foaf: . @prefix rml: . -@prefix ex: . a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; + rml:iterator "$.persons[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "student.json" + rml:path "persons.json" ] ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.Name" + rml:reference "$.amounts[*]" ]; - rml:predicate ex:student + rml:predicate ex:amount ]; - rml:subject _:School . + rml:subjectMap [ + rml:template "http://example.com/Student/{$.fname}/{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0025a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0025a-JSON/output.nq index 0c848cda..e1bc9a43 100644 --- a/src/test/resources/rml-core/RMLTC0025a-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0025a-JSON/output.nq @@ -1,2 +1,3 @@ -_:School "Julio" . -_:School "Venus" . + "30"^^ . + "40"^^ . + "50"^^ . diff --git a/src/test/resources/rml-core/RMLTC0025a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0025a-JSON/persons.json new file mode 100644 index 00000000..705406a9 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025a-JSON/persons.json @@ -0,0 +1,5 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0025b-JSON/README.md b/src/test/resources/rml-core/RMLTC0025b-JSON/README.md index d2bb61be..30a3a751 100644 --- a/src/test/resources/rml-core/RMLTC0025b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0025b-JSON/README.md @@ -1,49 +1,47 @@ ## RMLTC0025b-JSON -**Title**: "Usage of constant term maps in combination with explicitly defined term types" +**Title**: "Generation of triples from arrays with wrong reference" -**Description**: "Tests the usage of constant term maps in combination with explicitly defined term types" +**Description**: "Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array" + +**Default Base IRI**: http://example.com/ **Error expected?** Yes **Input** ``` { - "students": [{ - "Name":"Venus" - }, - { - "Name":"Julio" - }] + "persons": [ + {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + ] } ``` **Mapping** ``` +@prefix ex: . @prefix foaf: . @prefix rml: . -@prefix ex: . a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; + rml:iterator "$.persons[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "student.json" + rml:path "persons.json" ] ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.Name" + rml:reference "$.amounts" ]; - rml:predicate ex:student + rml:predicate ex:amount ]; rml:subjectMap [ - rml:constant "School"; - rml:termType rml:BlankNode - ] . + rml:template "http://example.com/Student/{$.fname}/{$.lname}" + ] . ``` diff --git a/src/test/resources/rml-core/RMLTC0025b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0025b-JSON/mapping.ttl index 387a3943..780bd99a 100644 --- a/src/test/resources/rml-core/RMLTC0025b-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0025b-JSON/mapping.ttl @@ -1,23 +1,22 @@ +@prefix ex: . @prefix foaf: . @prefix rml: . -@prefix ex: . a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; + rml:iterator "$.persons[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "student.json" + rml:path "persons.json" ] ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.Name" + rml:reference "$.amounts" ]; - rml:predicate ex:student + rml:predicate ex:amount ]; rml:subjectMap [ - rml:constant "School"; - rml:termType rml:BlankNode - ] . + rml:template "http://example.com/Student/{$.fname}/{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0025b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0025b-JSON/persons.json new file mode 100644 index 00000000..705406a9 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025b-JSON/persons.json @@ -0,0 +1,5 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0025c-JSON/README.md b/src/test/resources/rml-core/RMLTC0025c-JSON/README.md new file mode 100644 index 00000000..3472e637 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025c-JSON/README.md @@ -0,0 +1,58 @@ +## RMLTC0025c-JSON + +**Title**: "Generation of triples from arrays in subject and object" + +**Description**: "Tests the generation of triples from array input data structures in subject and object" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"names":["Bob", "Smith"],"amounts":[30, 40, 50]} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amounts[*]" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.names[*]}" + ] . + +``` + +**Output** +``` + "30"^^ . + "40"^^ . + "50"^^ . + "30"^^ . + "40"^^ . + "50"^^ . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0025c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0025c-JSON/mapping.ttl new file mode 100644 index 00000000..e498664c --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025c-JSON/mapping.ttl @@ -0,0 +1,22 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amounts[*]" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/Student/{$.names[*]}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0025c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0025c-JSON/output.nq new file mode 100644 index 00000000..8fc12789 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025c-JSON/output.nq @@ -0,0 +1,6 @@ + "30"^^ . + "40"^^ . + "50"^^ . + "30"^^ . + "40"^^ . + "50"^^ . diff --git a/src/test/resources/rml-core/RMLTC0025c-JSON/persons.json b/src/test/resources/rml-core/RMLTC0025c-JSON/persons.json new file mode 100644 index 00000000..6b67d59f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0025c-JSON/persons.json @@ -0,0 +1,5 @@ +{ + "persons": [ + {"names":["Bob", "Smith"],"amounts":[30, 40, 50]} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/README.md b/src/test/resources/rml-core/RMLTC0026a-JSON/README.md index 85e87a24..b2201854 100644 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/README.md @@ -1,8 +1,10 @@ ## RMLTC0026a-JSON -**Title**: "Generation of triples from arrays" +**Title**: "Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs" -**Description**: "Tests the generation of triples from array input data structures" +**Description**: "Tests the generation of triples from relative IRIs using base IRI" + +**Default Base IRI**: http://example.com/ **Error expected?** No @@ -10,7 +12,8 @@ ``` { "persons": [ - {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} ] } @@ -23,6 +26,26 @@ @prefix rml: . a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; rml:iterator "$.persons[*]"; rml:referenceFormulation rml:JSONPath; @@ -33,21 +56,22 @@ ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.amounts" + rml:reference "$.amount" ]; rml:predicate ex:amount ]; rml:subjectMap [ - rml:template "http://example.com/Student/{$.fname}/{$.lname}" + rml:template "http://example.com/{$.lname}" ] . ``` **Output** ``` - "30" . - "40" . - "50" . + "30"^^ . + "20"^^ . + "30"^^ . + "20"^^ . ``` diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl index e20151e4..41ed54da 100644 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/mapping.ttl @@ -3,6 +3,7 @@ @prefix rml: . a rml:TriplesMap; + rml:baseIRI ; rml:logicalSource [ a rml:LogicalSource; rml:iterator "$.persons[*]"; rml:referenceFormulation rml:JSONPath; @@ -13,10 +14,29 @@ ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.amounts.*" + rml:reference "$.amount" ]; rml:predicate ex:amount ]; rml:subjectMap [ - rml:template "http://example.com/Student/{$.fname}/{$.lname}" + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "http://example.com/{$.lname}" ] . diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq index 3b8e09fb..e6eee90f 100644 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/output.nq @@ -1,3 +1,4 @@ - "30" . - "40" . - "50" . + "30"^^ . + "20"^^ . + "30"^^ . + "20"^^ . diff --git a/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json b/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json index 705406a9..b7f1a04f 100644 --- a/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json +++ b/src/test/resources/rml-core/RMLTC0026a-JSON/persons.json @@ -1,5 +1,6 @@ { "persons": [ - {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} ] } diff --git a/src/test/resources/rml-core/RMLTC0026b-JSON/README.md b/src/test/resources/rml-core/RMLTC0026b-JSON/README.md index 264033c5..618503df 100644 --- a/src/test/resources/rml-core/RMLTC0026b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0026b-JSON/README.md @@ -1,16 +1,19 @@ -## RMLTC0026a-JSON +## RMLTC0026b-JSON -**Title**: "Generation of triples from arrays with wrong reference." +**Title**: "Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter" -**Description**: "Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array." +**Description**: "Tests the generation of triples from relative IRI using base IRI parameter" -**Error expected?** Yes +**Default Base IRI**: http://example.com/ + +**Error expected?** No **Input** ``` { "persons": [ - {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} ] } @@ -23,6 +26,7 @@ @prefix rml: . a rml:TriplesMap; + rml:baseIRI ; rml:logicalSource [ a rml:LogicalSource; rml:iterator "$.persons[*]"; rml:referenceFormulation rml:JSONPath; @@ -33,12 +37,41 @@ ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.amounts" + rml:reference "$.amount" ]; rml:predicate ex:amount ]; rml:subjectMap [ - rml:template "http://example.com/Student/{$.fname}/{$.lname}" + rml:template "{$.fname}" ] . -``` \ No newline at end of file + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . + +``` + +**Output** +``` + "30"^^ . + "20"^^ . + "30"^^ . + "20"^^ . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0026b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0026b-JSON/mapping.ttl index 780bd99a..040d95d4 100644 --- a/src/test/resources/rml-core/RMLTC0026b-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0026b-JSON/mapping.ttl @@ -3,6 +3,7 @@ @prefix rml: . a rml:TriplesMap; + rml:baseIRI ; rml:logicalSource [ a rml:LogicalSource; rml:iterator "$.persons[*]"; rml:referenceFormulation rml:JSONPath; @@ -13,10 +14,29 @@ ]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.amounts" + rml:reference "$.amount" ]; rml:predicate ex:amount ]; rml:subjectMap [ - rml:template "http://example.com/Student/{$.fname}/{$.lname}" + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" ] . diff --git a/src/test/resources/rml-core/RMLTC0026b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0026b-JSON/output.nq new file mode 100644 index 00000000..9a447010 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026b-JSON/output.nq @@ -0,0 +1,4 @@ + "30"^^ . + "20"^^ . + "30"^^ . + "20"^^ . diff --git a/src/test/resources/rml-core/RMLTC0026b-JSON/persons.json b/src/test/resources/rml-core/RMLTC0026b-JSON/persons.json index 705406a9..b7f1a04f 100644 --- a/src/test/resources/rml-core/RMLTC0026b-JSON/persons.json +++ b/src/test/resources/rml-core/RMLTC0026b-JSON/persons.json @@ -1,5 +1,6 @@ { "persons": [ - {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]} + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} ] } diff --git a/src/test/resources/rml-core/RMLTC0026c-JSON/README.md b/src/test/resources/rml-core/RMLTC0026c-JSON/README.md new file mode 100644 index 00000000..d07991fa --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026c-JSON/README.md @@ -0,0 +1,78 @@ +## RMLTC0026c-JSON + +**Title**: "Two triples maps, both with rml:baseIRI defined" + +**Description**: "Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . + +``` + +**Output** +``` + "30"^^ . + "20"^^ . + "30"^^ . + "20"^^ . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0026c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0026c-JSON/mapping.ttl new file mode 100644 index 00000000..d2825418 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026c-JSON/mapping.ttl @@ -0,0 +1,43 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0026c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0026c-JSON/output.nq new file mode 100644 index 00000000..e6eee90f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026c-JSON/output.nq @@ -0,0 +1,4 @@ + "30"^^ . + "20"^^ . + "30"^^ . + "20"^^ . diff --git a/src/test/resources/rml-core/RMLTC0026c-JSON/persons.json b/src/test/resources/rml-core/RMLTC0026c-JSON/persons.json new file mode 100644 index 00000000..b7f1a04f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026c-JSON/persons.json @@ -0,0 +1,6 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0026d-JSON/README.md b/src/test/resources/rml-core/RMLTC0026d-JSON/README.md new file mode 100644 index 00000000..d799d4e5 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026d-JSON/README.md @@ -0,0 +1,78 @@ +## RMLTC0026d-JSON + +**Title**: "Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined" + +**Description**: "Tests the generation of triples by with base IRIs different than the base IRI parameter" + +**Default Base IRI**: http://example.com/ + +**Error expected?** No + +**Input** +``` +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} + +``` + +**Mapping** +``` +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . + +``` + +**Output** +``` + "30"^^ . + "20"^^ . + "30"^^ . + "20"^^ . + +``` + diff --git a/src/test/resources/rml-core/RMLTC0026d-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0026d-JSON/mapping.ttl new file mode 100644 index 00000000..387c6254 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026d-JSON/mapping.ttl @@ -0,0 +1,43 @@ +@prefix ex: . +@prefix foaf: . +@prefix rml: . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.fname}" + ] . + + a rml:TriplesMap; + rml:baseIRI ; + rml:logicalSource [ a rml:LogicalSource; + rml:iterator "$.persons[*]"; + rml:referenceFormulation rml:JSONPath; + rml:source [ a rml:RelativePathSource; + rml:root rml:MappingDirectory; + rml:path "persons.json" + ] + ]; + rml:predicateObjectMap [ + rml:objectMap [ + rml:reference "$.amount" + ]; + rml:predicate ex:amount + ]; + rml:subjectMap [ + rml:template "{$.lname}" + ] . diff --git a/src/test/resources/rml-core/RMLTC0026d-JSON/output.nq b/src/test/resources/rml-core/RMLTC0026d-JSON/output.nq new file mode 100644 index 00000000..a6a4afac --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026d-JSON/output.nq @@ -0,0 +1,4 @@ + "30"^^ . + "20"^^ . + "30"^^ . + "20"^^ . diff --git a/src/test/resources/rml-core/RMLTC0026d-JSON/persons.json b/src/test/resources/rml-core/RMLTC0026d-JSON/persons.json new file mode 100644 index 00000000..b7f1a04f --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0026d-JSON/persons.json @@ -0,0 +1,6 @@ +{ + "persons": [ + {"fname":"Bob","lname":"Smith","amount":30}, + {"fname":"Sue","lname":"Jones","amount":20} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0027a-JSON/README.md b/src/test/resources/rml-core/RMLTC0027a-JSON/README.md index f1710ce8..7aed1582 100644 --- a/src/test/resources/rml-core/RMLTC0027a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0027a-JSON/README.md @@ -1,17 +1,22 @@ ## RMLTC0027a-JSON -**Title**: "Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs" +**Title**: "Generation of triples using the URI term type" -**Description**: "Tests the generation of triples from relative IRIs using base IRI" +**Description**: "Tests the generation of triples with a URI term type in the subject or object" + +**Default Base IRI**: http://example.com/ **Error expected?** No **Input** ``` { - "persons": [ - {"fname":"Bob","lname":"Smith","amount":30}, - {"fname":"Sue","lname":"Jones","amount":20} + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} ] } @@ -19,57 +24,37 @@ **Mapping** ``` -@prefix ex: . @prefix foaf: . +@prefix rdf: . @prefix rml: . a rml:TriplesMap; - rml:baseIRI ; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{$.fname}" - ] . - - a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; + rml:iterator "$.students[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "persons.json" + rml:path "student.json" ] ]; rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount + rml:object foaf:Person; + rml:predicate rdf:type ]; rml:subjectMap [ - rml:template "http://example.com/{$.lname}" + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:URI ] . ``` **Output** ``` - "30" . - "20" . - "30" . - "20" . + . + . + . + . + . ``` diff --git a/src/test/resources/rml-core/RMLTC0027a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0027a-JSON/mapping.ttl index 41ed54da..2d873b5a 100644 --- a/src/test/resources/rml-core/RMLTC0027a-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0027a-JSON/mapping.ttl @@ -1,42 +1,21 @@ -@prefix ex: . @prefix foaf: . +@prefix rdf: . @prefix rml: . a rml:TriplesMap; - rml:baseIRI ; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; + rml:iterator "$.students[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "persons.json" + rml:path "student.json" ] ]; rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount + rml:object foaf:Person; + rml:predicate rdf:type ]; rml:subjectMap [ - rml:template "{$.fname}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "http://example.com/{$.lname}" + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:URI ] . diff --git a/src/test/resources/rml-core/RMLTC0027a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0027a-JSON/output.nq index 0fbfa129..0d4f5564 100644 --- a/src/test/resources/rml-core/RMLTC0027a-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0027a-JSON/output.nq @@ -1,4 +1,5 @@ - "30" . - "20" . - "30" . - "20" . + . + . + . + . + . diff --git a/src/test/resources/rml-core/RMLTC0027a-JSON/student.json b/src/test/resources/rml-core/RMLTC0027a-JSON/student.json new file mode 100644 index 00000000..c1c6e961 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027a-JSON/student.json @@ -0,0 +1,9 @@ +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0027b-JSON/README.md b/src/test/resources/rml-core/RMLTC0027b-JSON/README.md index 0caf95be..748971f2 100644 --- a/src/test/resources/rml-core/RMLTC0027b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0027b-JSON/README.md @@ -1,17 +1,22 @@ ## RMLTC0027b-JSON -**Title**: "Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter" +**Title**: "Generation of triples using the UnsafeURI term type" -**Description**: "Tests the generation of triples from relative IRI using base IRI parameter" +**Description**: "Tests the generation of triples with a UnsafeURI term type in the subject or object" + +**Default Base IRI**: http://example.com/ **Error expected?** No **Input** ``` { - "persons": [ - {"fname":"Bob","lname":"Smith","amount":30}, - {"fname":"Sue","lname":"Jones","amount":20} + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} ] } @@ -19,58 +24,37 @@ **Mapping** ``` -@prefix ex: . @prefix foaf: . +@prefix rdf: . @prefix rml: . -@base . a rml:TriplesMap; - rml:baseIRI ; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{$.fname}" - ] . - - a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; + rml:iterator "$.students[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "persons.json" + rml:path "student.json" ] ]; rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount + rml:object foaf:Person; + rml:predicate rdf:type ]; rml:subjectMap [ - rml:template "{$.lname}" + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:UnsafeURI ] . ``` **Output** ``` - "30" . - "20" . - "30" . - "20" . + . + . + . + . + . ``` diff --git a/src/test/resources/rml-core/RMLTC0027b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0027b-JSON/mapping.ttl index bf2b788c..803c17e1 100644 --- a/src/test/resources/rml-core/RMLTC0027b-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0027b-JSON/mapping.ttl @@ -1,43 +1,21 @@ -@prefix ex: . @prefix foaf: . +@prefix rdf: . @prefix rml: . -@base . a rml:TriplesMap; - rml:baseIRI ; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; + rml:iterator "$.students[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "persons.json" + rml:path "student.json" ] ]; rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount + rml:object foaf:Person; + rml:predicate rdf:type ]; rml:subjectMap [ - rml:template "{$.fname}" - ] . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{$.lname}" + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:UnsafeURI ] . diff --git a/src/test/resources/rml-core/RMLTC0027b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0027b-JSON/output.nq index 0fbfa129..0d4f5564 100644 --- a/src/test/resources/rml-core/RMLTC0027b-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0027b-JSON/output.nq @@ -1,4 +1,5 @@ - "30" . - "20" . - "30" . - "20" . + . + . + . + . + . diff --git a/src/test/resources/rml-core/RMLTC0027b-JSON/student.json b/src/test/resources/rml-core/RMLTC0027b-JSON/student.json new file mode 100644 index 00000000..c1c6e961 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027b-JSON/student.json @@ -0,0 +1,9 @@ +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0027c-JSON/README.md b/src/test/resources/rml-core/RMLTC0027c-JSON/README.md index b93968e1..9d6d04b2 100644 --- a/src/test/resources/rml-core/RMLTC0027c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0027c-JSON/README.md @@ -1,17 +1,22 @@ ## RMLTC0027c-JSON -**Title**: "Two triples maps, both with rml:baseIRI defined" +**Title**: "Generation of triples using the UnsafeIRI term type" -**Description**: "Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter" +**Description**: "Tests the generation of triples with a UnsafeIRI term type in the subject or object" + +**Default Base IRI**: http://example.com/ **Error expected?** No **Input** ``` { - "persons": [ - {"fname":"Bob","lname":"Smith","amount":30}, - {"fname":"Sue","lname":"Jones","amount":20} + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} ] } @@ -19,58 +24,37 @@ **Mapping** ``` -@prefix ex: . @prefix foaf: . +@prefix rdf: . @prefix rml: . a rml:TriplesMap; - rml:baseIRI ; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{$.fname}" - ] . - - a rml:TriplesMap; - rml:baseIRI ; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; + rml:iterator "$.students[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "persons.json" + rml:path "student.json" ] ]; rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount + rml:object foaf:Person; + rml:predicate rdf:type ]; rml:subjectMap [ - rml:template "{$.lname}" + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:UnsafeIRI ] . ``` **Output** ``` - "30" . - "20" . - "30" . - "20" . + . + . + . + . + . ``` diff --git a/src/test/resources/rml-core/RMLTC0027c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0027c-JSON/mapping.ttl index d2825418..4a03ab54 100644 --- a/src/test/resources/rml-core/RMLTC0027c-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0027c-JSON/mapping.ttl @@ -1,43 +1,21 @@ -@prefix ex: . @prefix foaf: . +@prefix rdf: . @prefix rml: . a rml:TriplesMap; - rml:baseIRI ; rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; + rml:iterator "$.students[*]"; rml:referenceFormulation rml:JSONPath; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; - rml:path "persons.json" + rml:path "student.json" ] ]; rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount + rml:object foaf:Person; + rml:predicate rdf:type ]; rml:subjectMap [ - rml:template "{$.fname}" - ] . - - a rml:TriplesMap; - rml:baseIRI ; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.persons[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "persons.json" - ] - ]; - rml:predicateObjectMap [ - rml:objectMap [ - rml:reference "$.amount" - ]; - rml:predicate ex:amount - ]; - rml:subjectMap [ - rml:template "{$.lname}" + rml:template "http://example.com/Person/{$.Name}"; + rml:termType rml:UnsafeIRI ] . diff --git a/src/test/resources/rml-core/RMLTC0027c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0027c-JSON/output.nq index 0fbfa129..0d4f5564 100644 --- a/src/test/resources/rml-core/RMLTC0027c-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0027c-JSON/output.nq @@ -1,4 +1,5 @@ - "30" . - "20" . - "30" . - "20" . + . + . + . + . + . diff --git a/src/test/resources/rml-core/RMLTC0027c-JSON/student.json b/src/test/resources/rml-core/RMLTC0027c-JSON/student.json new file mode 100644 index 00000000..c1c6e961 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0027c-JSON/student.json @@ -0,0 +1,9 @@ +{ + "students": [ + {"Name": "Alice"}, + {"Name": "Bob"}, + {"Name": "Bob/Charles"}, + {"Name": "Danny"}, + {"Name": "Emily Smith"} + ] +} diff --git a/src/test/resources/rml-core/RMLTC0028a-JSON/README.md b/src/test/resources/rml-core/RMLTC0028a-JSON/README.md index 533278be..ab0a21f2 100644 --- a/src/test/resources/rml-core/RMLTC0028a-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0028a-JSON/README.md @@ -1,58 +1,44 @@ ## RMLTC0028a-JSON -**Title**: "Generation of triples using the URI term type" +**Title**: "Generation of the right datatype for a constant in the mapping" -**Description**: "Tests the generation of triples with a URI term type in the subject or object" +**Description**: "Test the honoring of the datatype specified by the constant term in the mapping" + +**Default Base IRI**: http://example.com/ **Error expected?** No **Input** ``` -{ - "students": [ - {"Name": "Alice"}, - {"Name": "Bob"}, - {"Name": "Bob/Charles"}, - {"Name": "Danny"}, - {"Name": "Emily Smith"} - ] -} +[ { "id": "0", "foo": "bar" } ] ``` **Mapping** ``` -@prefix foaf: . -@prefix rdf: . @prefix rml: . - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] + [ + a rml:TriplesMap; + rml:logicalSource [ + rml:source "data.json" ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]"; + ]; + rml:subjectMap [ + rml:template "https://example.org/instances/{id}"; ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type + rml:predicateObjectMap [ + rml:predicate ; + rml:object true ; # datatype is boolean ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{$.Name}"; - rml:termType rml:URI - ] . + ] . ``` **Output** ``` - . - . - . - . - . + "true"^^ . ``` diff --git a/src/test/resources/rml-core/RMLTC0028a-JSON/data.json b/src/test/resources/rml-core/RMLTC0028a-JSON/data.json new file mode 100644 index 00000000..64a11ae8 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028a-JSON/data.json @@ -0,0 +1 @@ +[ { "id": "0", "foo": "bar" } ] diff --git a/src/test/resources/rml-core/RMLTC0028a-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0028a-JSON/mapping.ttl index 2d873b5a..f5bff344 100644 --- a/src/test/resources/rml-core/RMLTC0028a-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0028a-JSON/mapping.ttl @@ -1,21 +1,17 @@ -@prefix foaf: . -@prefix rdf: . @prefix rml: . - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] + [ + a rml:TriplesMap; + rml:logicalSource [ + rml:source "data.json" ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]"; ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type + rml:subjectMap [ + rml:template "https://example.org/instances/{id}"; ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{$.Name}"; - rml:termType rml:URI - ] . + rml:predicateObjectMap [ + rml:predicate ; + rml:object true ; # datatype is boolean + ]; + ] . diff --git a/src/test/resources/rml-core/RMLTC0028a-JSON/output.nq b/src/test/resources/rml-core/RMLTC0028a-JSON/output.nq index 0d4f5564..ed7a2cd1 100644 --- a/src/test/resources/rml-core/RMLTC0028a-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0028a-JSON/output.nq @@ -1,5 +1 @@ - . - . - . - . - . + "true"^^ . diff --git a/src/test/resources/rml-core/RMLTC0028b-JSON/README.md b/src/test/resources/rml-core/RMLTC0028b-JSON/README.md index 8622292f..c7dc2e02 100644 --- a/src/test/resources/rml-core/RMLTC0028b-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0028b-JSON/README.md @@ -1,58 +1,50 @@ ## RMLTC0028b-JSON -**Title**: "Generation of triples using the UnsafeURI term type" +**Title**: "Generation of all named graphs when rml:defaultGraph is involved" -**Description**: "Tests the generation of triples with a UnsafeURI term type in the subject or object" +**Description**: "Test if the default graph is also generated correctly." + +**Default Base IRI**: http://example.com/ **Error expected?** No **Input** ``` -{ - "students": [ - {"Name": "Alice"}, - {"Name": "Bob"}, - {"Name": "Bob/Charles"}, - {"Name": "Danny"}, - {"Name": "Emily Smith"} - ] -} +[ { "id": "0", "name": "Alice" } ] ``` **Mapping** ``` -@prefix foaf: . -@prefix rdf: . @prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] +@prefix s: . + + [ + a rml:TriplesMap; + rml:logicalSource [ + rml:source "data.json" ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]"; + ]; + rml:subjectMap [ + rml:template "https://example.org/instances/{id}"; + rml:class s:Person ; + rml:graph ; ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type + rml:predicateObjectMap [ + rml:predicate s:givenName ; + rml:objectMap [ rml:reference "name" ] ; + rml:graph rml:defaultGraph ; ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{$.Name}"; - rml:termType rml:UnsafeURI - ] . + ] . ``` **Output** ``` - . - . - . - . - . + "Alice". + "Alice" . + . ``` diff --git a/src/test/resources/rml-core/RMLTC0028b-JSON/data.json b/src/test/resources/rml-core/RMLTC0028b-JSON/data.json new file mode 100644 index 00000000..4087270d --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028b-JSON/data.json @@ -0,0 +1 @@ +[ { "id": "0", "name": "Alice" } ] diff --git a/src/test/resources/rml-core/RMLTC0028b-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0028b-JSON/mapping.ttl index 803c17e1..fa1d20fc 100644 --- a/src/test/resources/rml-core/RMLTC0028b-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0028b-JSON/mapping.ttl @@ -1,21 +1,21 @@ -@prefix foaf: . -@prefix rdf: . @prefix rml: . +@prefix s: . - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] + [ + a rml:TriplesMap; + rml:logicalSource [ + rml:source "data.json" ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]"; ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type + rml:subjectMap [ + rml:template "https://example.org/instances/{id}"; + rml:class s:Person ; + rml:graph ; ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{$.Name}"; - rml:termType rml:UnsafeURI - ] . + rml:predicateObjectMap [ + rml:predicate s:givenName ; + rml:objectMap [ rml:reference "name" ] ; + rml:graph rml:defaultGraph ; + ]; + ] . diff --git a/src/test/resources/rml-core/RMLTC0028b-JSON/output.nq b/src/test/resources/rml-core/RMLTC0028b-JSON/output.nq index 0d4f5564..8e306356 100644 --- a/src/test/resources/rml-core/RMLTC0028b-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0028b-JSON/output.nq @@ -1,5 +1,3 @@ - . - . - . - . - . + "Alice". + "Alice" . + . diff --git a/src/test/resources/rml-core/RMLTC0028c-JSON/README.md b/src/test/resources/rml-core/RMLTC0028c-JSON/README.md index 45998be4..1e4cbfdf 100644 --- a/src/test/resources/rml-core/RMLTC0028c-JSON/README.md +++ b/src/test/resources/rml-core/RMLTC0028c-JSON/README.md @@ -1,58 +1,43 @@ ## RMLTC0028c-JSON -**Title**: "Generation of triples using the UnsafeIRI term type" +**Title**: "Generation of the right language tag for a constant in the mapping" -**Description**: "Tests the generation of triples with a UnsafeIRI term type in the subject or object" +**Description**: "Test the honoring of the language tag specified by the constant term in the mapping" + +**Default Base IRI**: http://example.com/ **Error expected?** No **Input** ``` -{ - "students": [ - {"Name": "Alice"}, - {"Name": "Bob"}, - {"Name": "Bob/Charles"}, - {"Name": "Danny"}, - {"Name": "Emily Smith"} - ] -} +[ { "id": "0", "foo": "bar" } ] ``` **Mapping** ``` -@prefix foaf: . -@prefix rdf: . @prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] + [ + a rml:TriplesMap; + rml:logicalSource [ + rml:source "data.json" ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]"; + ]; + rml:subjectMap [ + rml:template "https://example.org/instances/{id}"; ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type + rml:predicateObjectMap [ + rml:predicate ; + rml:object "train"@en ; ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{$.Name}"; - rml:termType rml:UnsafeIRI - ] . + ] . ``` **Output** ``` - . - . - . - . - . + "train"@en . ``` diff --git a/src/test/resources/rml-core/RMLTC0028c-JSON/data.json b/src/test/resources/rml-core/RMLTC0028c-JSON/data.json new file mode 100644 index 00000000..64a11ae8 --- /dev/null +++ b/src/test/resources/rml-core/RMLTC0028c-JSON/data.json @@ -0,0 +1 @@ +[ { "id": "0", "foo": "bar" } ] diff --git a/src/test/resources/rml-core/RMLTC0028c-JSON/mapping.ttl b/src/test/resources/rml-core/RMLTC0028c-JSON/mapping.ttl index 4a03ab54..e04ee573 100644 --- a/src/test/resources/rml-core/RMLTC0028c-JSON/mapping.ttl +++ b/src/test/resources/rml-core/RMLTC0028c-JSON/mapping.ttl @@ -1,21 +1,16 @@ -@prefix foaf: . -@prefix rdf: . @prefix rml: . - - a rml:TriplesMap; - rml:logicalSource [ a rml:LogicalSource; - rml:iterator "$.students[*]"; - rml:referenceFormulation rml:JSONPath; - rml:source [ a rml:RelativePathSource; - rml:root rml:MappingDirectory; - rml:path "student.json" - ] + [ + a rml:TriplesMap; + rml:logicalSource [ + rml:source "data.json" ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$[*]"; ]; - rml:predicateObjectMap [ - rml:object foaf:Person; - rml:predicate rdf:type + rml:subjectMap [ + rml:template "https://example.org/instances/{id}"; ]; - rml:subjectMap [ - rml:template "http://example.com/Person/{$.Name}"; - rml:termType rml:UnsafeIRI - ] . + rml:predicateObjectMap [ + rml:predicate ; + rml:object "train"@en ; + ]; + ] . diff --git a/src/test/resources/rml-core/RMLTC0028c-JSON/output.nq b/src/test/resources/rml-core/RMLTC0028c-JSON/output.nq index 0d4f5564..55246cc3 100644 --- a/src/test/resources/rml-core/RMLTC0028c-JSON/output.nq +++ b/src/test/resources/rml-core/RMLTC0028c-JSON/output.nq @@ -1,5 +1 @@ - . - . - . - . - . + "train"@en . diff --git a/src/test/resources/rml-core/config.js b/src/test/resources/rml-core/config.js index 04c4caa8..8bc9b13b 100644 --- a/src/test/resources/rml-core/config.js +++ b/src/test/resources/rml-core/config.js @@ -40,6 +40,13 @@ var respecConfig = { company: "IDLab – Ghent University – imec", orcid: "0000-0002-7195-9935", companyURL: "https://knows.idlab.ugent.be/" + }, + { + name: "David Chaves-Fraga", + url: "https://davidchavesfraga.com", + company: "CiTIUS – University of Santiago de Compostela", + orcid: "0000-0003-3236-2789", + companyURL: "https://citius.gal" } ], formerEditors: [ diff --git a/src/test/resources/rml-core/descriptions.csv b/src/test/resources/rml-core/descriptions.csv index a291d76e..507a492e 100644 --- a/src/test/resources/rml-core/descriptions.csv +++ b/src/test/resources/rml-core/descriptions.csv @@ -1,437 +1,65 @@ -ID,Title,Purpose,"Error -expected?",Input ,"Output -default","Output -1","Output -2","Output -3",Comment -RMLTC0000-CSV,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, -RMLTC0000-JSON,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, -RMLTC0000-XML,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, -RMLTC0000-MySQL,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, -RMLTC0000-PostgreSQL,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, -RMLTC0000-SQLServer,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, -RMLTC0000-SPARQL,Empty dataset,Test if an empty dataset produces an empty RDF graph,no,,,,,, -RMLTC0001a-CSV,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, -RMLTC0001a-JSON,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, -RMLTC0001a-XML,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, -RMLTC0001a-MySQL,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, -RMLTC0001a-PostgreSQL,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, -RMLTC0001a-SQLServer,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, -RMLTC0001a-SPARQL,"One tripple mapping, subject URI generation by using rml:template",Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one tripple to one property,no,,,,,, -RMLTC0001b-CSV,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, -RMLTC0001b-JSON,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, -RMLTC0001b-XML,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, -RMLTC0001b-MySQL,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, -RMLTC0001b-PostgreSQL,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, -RMLTC0001b-SQLServer,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, -RMLTC0001b-SPARQL,"One tripple mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one tripple to one property,no,,,,,, -RMLTC0002a-CSV,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, -RMLTC0002a-JSON,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, -RMLTC0002a-XML,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, -RMLTC0002a-MySQL,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, -RMLTC0002a-PostgreSQL,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, -RMLTC0002a-SQLServer,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, -RMLTC0002a-SPARQL,"Two tripples mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two tripple mapping, no primary key; (2) subject URI generated by the concatenation of two tripple object values; (3) one tripple object to one property",no,,,,,, -RMLTC0002b-CSV,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, -RMLTC0002b-JSON,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, -RMLTC0002b-XML,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, -RMLTC0002b-MySQL,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, -RMLTC0002b-PostgreSQL,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, -RMLTC0002b-SQLServer,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, -RMLTC0002b-SPARQL,"Two tripples maping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two tripple mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one triple to one property",no,,,,,, -RMLTC0002c-CSV,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, -RMLTC0002c-JSON,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, -RMLTC0002c-XML,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, -RMLTC0002c-MySQL,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, -RMLTC0002c-PostgreSQL,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, -RMLTC0002c-SQLServer,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, -RMLTC0002d-MySQL,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, -RMLTC0002d-PostgreSQL,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, -RMLTC0002d-SQLServer,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, -RMLTC0002e-CSV,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, -RMLTC0002e-JSON,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, -RMLTC0002e-XML,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, -RMLTC0002e-MySQL,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, -RMLTC0002e-PostgreSQL,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, -RMLTC0002e-SQLServer,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, -RMLTC0002f-MySQL,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, -RMLTC0002f-PostgreSQL,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, -RMLTC0002f-SQLServer,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, -RMLTC0002g-JSON,"Two columns mapping, invalid JSONPath",Test the presence of an invalid JSONPath,yes,,,,,, -RMLTC0002g-MySQL,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, -RMLTC0002g-PostgreSQL,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, -RMLTC0002g-SQLServer,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, -RMLTC0002g-SPARQL,"Two tripples mapping, invalid SPARQL query",Tests the presence of an invalid SPARQL query,yes,,,,,, -RMLTC0002h-MySQL,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, -RMLTC0002h-PostgreSQL,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, -RMLTC0002h-SQLServer,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, -RMLTC0002h-SPARQL,"Two tripples mapping, duplicate variable name in SELECT",Tests the presence of duplicate variable names in the SELECT list of the SPARQL query,yes,,,,,, -RMLTC0002i-MySQL,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, -RMLTC0002i-PostgreSQL,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, -RMLTC0002i-SQLServer,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, -RMLTC0002j-MySQL,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, -RMLTC0002j-PostgreSQL,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, -RMLTC0002j-SQLServer,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, -RMLTC0003a-MySQL,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, -RMLTC0003a-PostgreSQL,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, -RMLTC0003a-SQLServer,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, -RMLTC0003b-MySQL,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, -RMLTC0003b-PostgreSQL,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, -RMLTC0003b-SQLServer,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, -RMLTC0003c-CSV,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, -RMLTC0003c-JSON,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, -RMLTC0003c-XML,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, -RMLTC0003c-MySQL,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, -RMLTC0003c-PostgreSQL,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, -RMLTC0003c-SQLServer,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, -RMLTC0003c-SPARQL,"Three tripple mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, -RMLTC0004a-CSV,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, -RMLTC0004a-JSON,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, -RMLTC0004a-XML,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, -RMLTC0004a-MySQL,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, -RMLTC0004a-PostgreSQL,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, -RMLTC0004a-SQLServer,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, -RMLTC0004a-SPARQL,"Two BlankNodes mapping, from one object to two different triples","Tests: (1) two BlankNodes mapping, (2) subject URI generated by a tripple object value; (3) from one BlankNode to two different triples (4) typing by using rml:class",no,,,,,, -RMLTC0004b-CSV,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, -RMLTC0004b-JSON,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, -RMLTC0004b-XML,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, -RMLTC0004b-MySQL,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, -RMLTC0004b-PostgreSQL,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, -RMLTC0004b-SQLServer,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, -RMLTC0004b-SPARQL,"One tripple mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, -RMLTC0005a-CSV,Typing of resources,Tests the typing of resources,no,,,,,, -RMLTC0005a-JSON,Typing of resources,Tests the typing of resources,no,,,,,, -RMLTC0005a-XML,Typing of resources,Tests the typing of resources,no,,,,,, -RMLTC0005a-MySQL,Typing of resources,Tests the typing of resources,no,,,,,, -RMLTC0005a-PostgreSQL,Typing of resources,Tests the typing of resources,no,,,,,, -RMLTC0005a-SQLServer,Typing of resources,Tests the typing of resources,no,,,,,, -RMLTC0005b-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, -RMLTC0005b-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, -RMLTC0005b-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, -RMLTC0006a-CSV,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, -RMLTC0006a-JSON,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, -RMLTC0006a-XML,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, -RMLTC0006a-MySQL,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, -RMLTC0006a-PostgreSQL,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, -RMLTC0006a-SQLServer,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, -RMLTC0006a-SPARQL,"rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, -RMLTC0007a-CSV,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, -RMLTC0007a-JSON,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, -RMLTC0007a-XML,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, -RMLTC0007a-MySQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, -RMLTC0007a-PostgreSQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, -RMLTC0007a-SQLServer,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, -RMLTC0007a-SPARQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, -RMLTC0007b-CSV,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, -RMLTC0007b-JSON,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, -RMLTC0007b-XML,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, -RMLTC0007b-MySQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, -RMLTC0007b-PostgreSQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, -RMLTC0007b-SQLServer,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, -RMLTC0007b-SPARQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, -RMLTC0007c-CSV,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, -RMLTC0007c-JSON,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, -RMLTC0007c-XML,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, -RMLTC0007c-MySQL,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, -RMLTC0007c-PostgreSQL,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, -RMLTC0007c-SQLServer,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, -RMLTC0007c-SPARQL,"One object mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, -RMLTC0007d-CSV,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, -RMLTC0007d-JSON,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, -RMLTC0007d-XML,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, -RMLTC0007d-MySQL,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, -RMLTC0007d-PostgreSQL,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, -RMLTC0007d-SQLServer,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, -RMLTC0007d-SPARQL,"One object mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, -RMLTC0007e-CSV,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, -RMLTC0007e-JSON,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, -RMLTC0007e-XML,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, -RMLTC0007e-MySQL,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, -RMLTC0007e-PostgreSQL,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, -RMLTC0007e-SQLServer,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, -RMLTC0007e-SPARQL,"One object mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, -RMLTC0007f-CSV,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, -RMLTC0007f-JSON,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, -RMLTC0007f-XML,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, -RMLTC0007f-MySQL,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, -RMLTC0007f-PostgreSQL,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, -RMLTC0007f-SQLServer,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, -RMLTC0007f-SPARQL,"One object mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, -RMLTC0007g-CSV,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, -RMLTC0007g-JSON,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, -RMLTC0007g-XML,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, -RMLTC0007g-MySQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, -RMLTC0007g-PostgreSQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, -RMLTC0007g-SQLServer,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, -RMLTC0007g-SPARQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, -RMLTC0007h-CSV,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, -RMLTC0007h-JSON,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, -RMLTC0007h-XML,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, -RMLTC0007h-MySQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, -RMLTC0007h-PostgreSQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, -RMLTC0007h-SQLServer,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, -RMLTC0007h-SPARQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, -RMLTC0008a-CSV,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, -RMLTC0008a-JSON,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, -RMLTC0008a-XML,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, -RMLTC0008a-MySQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, -RMLTC0008a-PostgreSQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, -RMLTC0008a-SQLServer,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, -RMLTC0008a-SPARQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, -RMLTC0008b-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, -RMLTC0008b-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, -RMLTC0008b-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, -RMLTC0008b-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, -RMLTC0008b-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, -RMLTC0008b-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, -RMLTC0008b-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, -RMLTC0008c-CSV,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, -RMLTC0008c-JSON,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, -RMLTC0008c-XML,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, -RMLTC0008c-MySQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, -RMLTC0008c-PostgreSQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, -RMLTC0008c-SQLServer,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, -RMLTC0008c-SPARQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, -RMLTC0009a-CSV,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, -RMLTC0009a-JSON,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, -RMLTC0009a-XML,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, -RMLTC0009a-MySQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, -RMLTC0009a-PostgreSQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, -RMLTC0009a-SQLServer,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, -RMLTC0009a-SPARQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, -RMLTC0009b-CSV,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, -RMLTC0009b-JSON,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, -RMLTC0009b-XML,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, -RMLTC0009b-MySQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, -RMLTC0009b-PostgreSQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, -RMLTC0009b-SQLServer,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, -RMLTC0009b-SPARQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, -RMLTC0009c-MySQL,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, -RMLTC0009c-PostgreSQL,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, -RMLTC0009c-SQLServer,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, -RMLTC0009d-MySQL,Named column in logical table,Test a logical table named column.,no,,,,,, -RMLTC0009d-PostgreSQL,Named column in logical table,Test a logical table named column.,no,,,,,, -RMLTC0009d-SQLServer,Named column in logical table,Test a logical table named column.,no,,,,,, -RMLTC0010a-CSV,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, -RMLTC0010a-JSON,Template with table column with blank space,Tests a template with blank space in column value,no,,,,,, -RMLTC0010a-MySQL,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, -RMLTC0010a-PostgreSQL,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, -RMLTC0010a-SQLServer,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, -RMLTC0010b-CSV,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, -RMLTC0010b-JSON,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, -RMLTC0010b-XML,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, -RMLTC0010b-MySQL,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, -RMLTC0010b-PostgreSQL,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, -RMLTC0010b-SQLServer,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, -RMLTC0010c-CSV,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, -RMLTC0010c-JSON,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, -RMLTC0010c-XML,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, -RMLTC0010c-MySQL,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, -RMLTC0010c-PostgreSQL,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, -RMLTC0010c-SQLServer,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, -RMLTC0011a-MySQL,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, -RMLTC0011a-PostgreSQL,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, -RMLTC0011a-SQLServer,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, -RMLTC0011b-CSV,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, -RMLTC0011b-JSON,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, -RMLTC0011b-XML,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, -RMLTC0011b-MySQL,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, -RMLTC0011b-PostgreSQL,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, -RMLTC0011b-SQLServer,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, -RMLTC0012a-CSV,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012a-JSON,Blank node referencing multiple columns,Tests that blank nodes can be generated by referencing multiple columns,no,,,,,, -RMLTC0012a-XML,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012a-MySQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012a-PostgreSQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012a-SQLServer,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012a-SPARQL,Duplicate triples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012b-CSV,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012b-JSON,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012b-XML,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012b-MySQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012b-PostgreSQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012b-SQLServer,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012b-SPARQL,Duplicate triples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, -RMLTC0012c-CSV,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, -RMLTC0012c-JSON,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, -RMLTC0012c-XML,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, -RMLTC0012c-MySQL,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, -RMLTC0012c-PostgreSQL,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, -RMLTC0012c-SQLServer,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, -RMLTC0012d-CSV,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012d-JSON,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012d-XML,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012d-MySQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012d-PostgreSQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012d-SQLServer,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012e-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, -RMLTC0012e-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, -RMLTC0012e-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, -RMLTC0013a-JSON,Null value in JSON file,Tests if null values in JSON files are handled correctly.,no,,,,,, -RMLTC0013a-MySQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, -RMLTC0013a-PostgreSQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, -RMLTC0013a-SQLServer,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, -"Inverse expression can only be used for run-time optimizations, i.e., if you use it it will only affect performance, but not the resulting RDF. Therefore, I would suggest to skip those.",Subjectmap with rr:inverseExpression,Tests a rml:subjectMap with rr:inverseExpression,no,,,,,, -,Triplesmaps with rr:inverseExpression and rr:joinCondition,"Test two triplesmaps, one with a rr:inverseExpression and the other with a rr:joinCondition for foerign key relations",no,,,,,, -,"Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps","Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps",no,,,,,, -RMLTC0014d-MySQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, -RMLTC0014d-PostgreSQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, -RMLTC0014d-SQLServer,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, -RMLTC0015a-CSV,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-JSON,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-XML,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-MySQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-PostgreSQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-SQLServer,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015b-CSV,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-JSON,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-XML,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-MySQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-PostgreSQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-SQLServer,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0016a-MySQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, -RMLTC0016a-PostgreSQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, -RMLTC0016a-SQLServer,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, -RMLTC0016b-MySQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, -RMLTC0016b-PostgreSQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, -RMLTC0016b-SQLServer,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, -RMLTC0016c-MySQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, -RMLTC0016c-PostgreSQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, -RMLTC0016c-SQLServer,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, -RMLTC0016d-MySQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, -RMLTC0016d-PostgreSQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, -RMLTC0016d-SQLServer,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, -RMLTC0016e-MySQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, -RMLTC0016e-PostgreSQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, -RMLTC0016e-SQLServer,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, -RMLTC0018a-MySQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, -RMLTC0018a-PostgreSQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, -RMLTC0018a-SQLServer,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, -RMLTC0019a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0019a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, -RMLTC0019a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, -RMLTC0019a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0019a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0019a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0019b-CSV,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-JSON,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-XML,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in elements, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-MySQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-PostgreSQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-SQLServer,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0020a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0020a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, -RMLTC0020a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, -RMLTC0020a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0020a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0020a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0020b-CSV,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-JSON,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-XML,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-MySQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-PostgreSQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-SQLServer,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0021a-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0012d-MySQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012d-PostgreSQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012d-SQLServer,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, -RMLTC0012e-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, -RMLTC0012e-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, -RMLTC0012e-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, -RMLTC0013a-JSON,Null value in JSON file,Tests if null values in JSON files are handled correctly.,no,,,,,, -RMLTC0013a-MySQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, -RMLTC0013a-PostgreSQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, -RMLTC0013a-SQLServer,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, -"Inverse expression can only be used for run-time optimizations, i.e., if you use it it will only affect performance, but not the resulting RDF. Therefore, I would suggest to skip those.",Subjectmap with rr:inverseExpression,Tests a rml:subjectMap with rr:inverseExpression,no,,,,,, -,Triplesmaps with rr:inverseExpression and rr:joinCondition,"Test two triplesmaps, one with a rr:inverseExpression and the other with a rr:joinCondition for foerign key relations",no,,,,,, -,"Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps","Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps",no,,,,,, -RMLTC0014d-MySQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, -RMLTC0014d-PostgreSQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, -RMLTC0014d-SQLServer,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, -RMLTC0015a-CSV,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-JSON,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-XML,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-MySQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-PostgreSQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015a-SQLServer,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, -RMLTC0015b-CSV,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-JSON,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-XML,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-MySQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-PostgreSQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0015b-SQLServer,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, -RMLTC0016a-MySQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, -RMLTC0016a-PostgreSQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, -RMLTC0016a-SQLServer,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, -RMLTC0016b-MySQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, -RMLTC0016b-PostgreSQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, -RMLTC0016b-SQLServer,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, -RMLTC0016c-MySQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, -RMLTC0016c-PostgreSQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, -RMLTC0016c-SQLServer,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, -RMLTC0016d-MySQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, -RMLTC0016d-PostgreSQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, -RMLTC0016d-SQLServer,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, -RMLTC0016e-MySQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, -RMLTC0016e-PostgreSQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, -RMLTC0016e-SQLServer,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, -RMLTC0018a-MySQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, -RMLTC0018a-PostgreSQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, -RMLTC0018a-SQLServer,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, -RMLTC0019a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0019a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, -RMLTC0019a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, -RMLTC0019a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0019a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0019a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0019b-CSV,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-JSON,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-XML,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in elements, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-MySQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-PostgreSQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0019b-SQLServer,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, -RMLTC0020a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0020a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, -RMLTC0020a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, -RMLTC0020a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0020a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0020a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, -RMLTC0020b-CSV,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-JSON,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-XML,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-MySQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-PostgreSQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0020b-SQLServer,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, -RMLTC0021a-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0021a-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, -RMLTC0022a-JSON,Generating of triples with constant datatype,Test triples with a fixed constant datatype,no,,,,,, -RMLTC0022b-JSON,Generating of triples with datatypeMap,Test triples with a XSD datatype generated from the data,no,,,,,, -RMLTC0022c-JSON,Generating of triples with datatypeMap with custom datatype,Test triples with a custom datype from the data,no,,,,,, -,,,,,,,,, -RMLTC0023a-JSON,Invalid IRI template 1,Test handling of invalid IRI template,yes,,,,,, -RMLTC0023b-JSON,Invalid IRI template 2,Test handling of invalid IRI template,yes,,,,,, -RMLTC0023c-JSON,Invalid IRI template 3,Test handling of invalid IRI template,yes,,,,,, -RMLTC0023d-JSON,Invalid IRI template 4,Test handling of invalid IRI template,yes,,,,,, -RMLTC0023e-JSON,Invalid IRI template 5,Test handling of invalid IRI template,yes,,,,,, -RMLTC0023f-JSON,Invalid IRI template 6,Test handling of invalid IRI template,yes,,,,,, -RMLTC0025a-JSON,Generation of triples with constant blank node ,Tests the generation of triples with a constant blank node,no,,,,,, -RMLTC0025b-JSON,Usage of constant term maps in combination with explicitly defined term types,Tests the usage of constant term maps in combination with explicitly defined term types,yes,,,,,, -RMLTC0026a-JSON,Generation of triples from arrays,Tests the generation of triples from array input data structures,no,,,,,, -RMLTC0027a-JSON,"Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs",Tests the generation of triples from relative IRIs using base IRI,no,,,,,, -RMLTC0027b-JSON,"Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter",Tests the generation of triples from relative IRI using base IRI parameter,no,,,,,, -RMLTC0027c-JSON,"Two triples maps, both with rml:baseIRI defined","Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter",no,,,,,, -RMLTC0027d-JSON,"Two triples maps,both with rml:bseIRI defined overwritten by baseIRI parameter",Tests the generation of triples by with base IRIs different than the base IRI parameter,no,,,,,, -RMLTC0028a-JSON,Generation of triples using the URI term type,Tests the generation of triples with a URI term type in the subject or object,no,,,,,, -RMLTC0028b-JSON,Generation of triples using the UnsafeURI term type,Tests the generation of triples with a UnsafeURI term type in the subject or object,no,,,,,, -RMLTC0028c-JSON,Generation of triples using the UnsafeIRI term type,Tests the generation of triples with a UnsafeIRI term type in the subject or object,no,,,,,, \ No newline at end of file +ID,title,description +RMLTC0000-JSON,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph +RMLTC0001a-JSON,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property +RMLTC0001b-JSON,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property +RMLTC0002a-JSON,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property" +RMLTC0002b-JSON,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property" +RMLTC0002e-JSON,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path +RMLTC0002g-JSON,"Two columns mapping, invalid JSONPath",Test the presence of an invalid JSONPath +RMLTC0003c-JSON,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal +RMLTC0004a-JSON,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class" +RMLTC0004b-JSON,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid" +RMLTC0005a-JSON,Typing of resources,Tests the typing of resources +RMLTC0006a-JSON,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap" +RMLTC0007a-JSON,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate +RMLTC0007b-JSON,Assigning triples to Named Graphs,Tests the generation of triples to a named graph +RMLTC0007c-JSON,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class" +RMLTC0007d-JSON,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type" +RMLTC0007e-JSON,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class +RMLTC0007f-JSON,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type +RMLTC0007g-JSON,Assigning triples to the default graph,Tests the generation of triples to the default graph +RMLTC0007h-JSON,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error" +RMLTC0008a-JSON,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template +RMLTC0008b-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map without join +RMLTC0008c-JSON,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap +RMLTC0009a-JSON,Generation of triples from foreign key relations,Test foreign key relationships among logical tables +RMLTC0009b-JSON,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs. +RMLTC0010a-JSON,Template with table column with blank space,Tests a template with blank space in column value +RMLTC0010b-JSON,Template with table columns with special chars,Tests a template with special chars in column value +RMLTC0010c-JSON,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates +RMLTC0011b-JSON,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map" +RMLTC0012a-JSON,Blank node referencing multiple columns,Tests that blank nodes can be generated by referencing multiple columns +RMLTC0012b-JSON,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent. +RMLTC0012c-JSON,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap." +RMLTC0012d-JSON,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap." +RMLTC0013a-JSON,Null value in JSON file,Tests if null values in JSON files are handled correctly. +RMLTC0015a-JSON,Generation of language tags from a table with language information,Generation of language tags from a table with language information +RMLTC0015b-JSON,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error" +RMLTC0019a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes +RMLTC0019b-JSON,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)" +RMLTC0020a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes +RMLTC0021a-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition +RMLTC0022a-JSON,Generating of triples with constant datatype,Test triples with a fixed constant datatype +RMLTC0022b-JSON,Generating of triples with datatypeMap,Test triples with a XSD datatype generated from the data +RMLTC0022c-JSON,Generating of triples with datatypeMap with custom datatype,Test triples with a custom datype from the data +RMLTC0023a-JSON,Invalid IRI template 1,Test handling of invalid IRI template +RMLTC0023b-JSON,Invalid IRI template 2,Test handling of invalid IRI template +RMLTC0023c-JSON,Invalid IRI template 3,Test handling of invalid IRI template +RMLTC0023d-JSON,Invalid IRI template 4,Test handling of invalid IRI template +RMLTC0023e-JSON,Invalid IRI template 5,Test handling of invalid IRI template +RMLTC0023f-JSON,Invalid IRI template 6,Test handling of invalid IRI template +RMLTC0023g-JSON,Valid IRI template with backslash-escape,Test handling of a valid IRI template using backslash-escape +RMLTC0024a-JSON,Usage of constant term maps in combination with explicitly defined term types,Tests the usage of constant term maps in combination with explicitly defined term types +RMLTC0025a-JSON,Generation of triples from arrays,Tests the generation of triples from array input data structures +RMLTC0025b-JSON,Generation of triples from arrays with wrong reference,Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array +RMLTC0025c-JSON,Generation of triples from arrays in subject and object,Tests the generation of triples from array input data structures in subject and object +RMLTC0026a-JSON,"Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs",Tests the generation of triples from relative IRIs using base IRI +RMLTC0026b-JSON,"Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter",Tests the generation of triples from relative IRI using base IRI parameter +RMLTC0026c-JSON,"Two triples maps, both with rml:baseIRI defined","Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter" +RMLTC0026d-JSON,"Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined",Tests the generation of triples by with base IRIs different than the base IRI parameter +RMLTC0027a-JSON,Generation of triples using the URI term type,Tests the generation of triples with a URI term type in the subject or object +RMLTC0027b-JSON,Generation of triples using the UnsafeURI term type,Tests the generation of triples with a UnsafeURI term type in the subject or object +RMLTC0027c-JSON,Generation of triples using the UnsafeIRI term type,Tests the generation of triples with a UnsafeIRI term type in the subject or object +RMLTC0028a-JSON,Generation of the right datatype for a constant in the mapping,Test the honoring of the datatype specified by the constant term in the mapping +RMLTC0028b-JSON,Generation of all named graphs when rml:defaultGraph is involved,Test if the default graph is also generated correctly. +RMLTC0028c-JSON,Generation of the right language tag for a constant in the mapping,Test the honoring of the language tag specified by the constant term in the mapping diff --git a/src/test/resources/rml-core/descriptions_old.csv b/src/test/resources/rml-core/descriptions_old.csv new file mode 100644 index 00000000..a80465eb --- /dev/null +++ b/src/test/resources/rml-core/descriptions_old.csv @@ -0,0 +1,426 @@ +ID,Title,Purpose,"Error expected?",Input ,"Output default","Output 1","Output 2","Output 3",Comment +RMLTC0000-CSV,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-JSON,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-XML,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-MySQL,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-PostgreSQL,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-SQLServer,"one table, one column, zero rows",Tests if an empty table produces an empty RDF graph,no,,,,,, +RMLTC0000-SPARQL,Empty dataset,Test if an empty dataset produces an empty RDF graph,no,,,,,, +RMLTC0001a-CSV,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-JSON,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-XML,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-MySQL,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-PostgreSQL,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-SQLServer,"One column mapping, subject URI generation by using rml:template",Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property,no,,,,,, +RMLTC0001a-SPARQL,"One tripple mapping, subject URI generation by using rml:template",Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one tripple to one property,no,,,,,, +RMLTC0001b-CSV,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-JSON,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-XML,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-MySQL,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-PostgreSQL,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-SQLServer,"One column mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property,no,,,,,, +RMLTC0001b-SPARQL,"One tripple mapping, generation of a BlankNode subject by using rml:termType",Tests: (1) one tripple mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one tripple to one property,no,,,,,, +RMLTC0002a-CSV,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-JSON,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-XML,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-MySQL,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-PostgreSQL,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-SQLServer,"Two columns mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property",no,,,,,, +RMLTC0002a-SPARQL,"Two tripples mapping, generation of a subject URI by the concatenation of two column values","Tests: (1) two tripple mapping, no primary key; (2) subject URI generated by the concatenation of two tripple object values; (3) one tripple object to one property",no,,,,,, +RMLTC0002b-CSV,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-JSON,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-XML,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-MySQL,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-PostgreSQL,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-SQLServer,"Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property",no,,,,,, +RMLTC0002b-SPARQL,"Two tripples maping, generation of a BlankNode subject by using rml:template and rml:termType","Tests: (1) two tripple mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one triple to one property",no,,,,,, +RMLTC0002c-CSV,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-XML,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-MySQL,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-PostgreSQL,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002c-SQLServer,"Two columns mapping, an undefined SQL identifier / logical reference",Tests the presence of an undefined SQL identifier / logical reference,yes,,,,,, +RMLTC0002d-MySQL,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, +RMLTC0002d-PostgreSQL,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, +RMLTC0002d-SQLServer,"Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns","Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property",no,,,,,, +RMLTC0002e-CSV,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-JSON,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-XML,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-MySQL,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-PostgreSQL,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002e-SQLServer,"Two columns mapping, an undefined rml:path",Tests the presence of an undefined rml:path,yes,,,,,, +RMLTC0002f-MySQL,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, +RMLTC0002f-PostgreSQL,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, +RMLTC0002f-SQLServer,"Two columns mapping, delimited identifiers referenced as regular identifiers","Tests the presence of delimited identifiers referenced as regular identifiers. Within rml:template ID is ok, but Name is not",yes,,,,,, +RMLTC0002g-JSON,"Two columns mapping, invalid JSONPath",Test the presence of an invalid JSONPath,yes,,,,,, +RMLTC0002g-MySQL,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, +RMLTC0002g-PostgreSQL,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, +RMLTC0002g-SQLServer,"Two columns mapping, invalid SQL query",Tests the presence of an invalid SQL query,yes,,,,,, +RMLTC0002g-SPARQL,"Two tripples mapping, invalid SPARQL query",Tests the presence of an invalid SPARQL query,yes,,,,,, +RMLTC0002h-MySQL,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, +RMLTC0002h-PostgreSQL,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, +RMLTC0002h-SQLServer,"Two columns mapping, duplicate column name in SELECT",Tests the presence of duplicate column names in the SELECT list of the SQL query,yes,,,,,, +RMLTC0002h-SPARQL,"Two tripples mapping, duplicate variable name in SELECT",Tests the presence of duplicate variable names in the SELECT list of the SPARQL query,yes,,,,,, +RMLTC0002i-MySQL,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, +RMLTC0002i-PostgreSQL,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, +RMLTC0002i-SQLServer,"Two columns mapping, SQL Version identifier",Tests the presence of a SQL Version identifier ,no,,,,,, +RMLTC0002j-MySQL,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, +RMLTC0002j-PostgreSQL,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, +RMLTC0002j-SQLServer,"Two columns mapping, qualified column names",Tests the presence of qualified column names in the SELECT list of the SQL query,no,,,,,, +RMLTC0003a-MySQL,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, +RMLTC0003a-PostgreSQL,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, +RMLTC0003a-SQLServer,"Three columns mapping, undefined SQL Version identifier",Tests the presence of an undefined SQL Version identifier,yes,,,,,, +RMLTC0003b-MySQL,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, +RMLTC0003b-PostgreSQL,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, +RMLTC0003b-SQLServer,"Three columns mapping, concatenation of columns, by using a rml:SQL2008Query to produce literal","Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rml:SQL2008Query",no,,,,,, +RMLTC0003c-CSV,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-JSON,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-XML,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-MySQL,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-PostgreSQL,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-SQLServer,"Three columns mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0003c-SPARQL,"Three tripple mapping, by using a rml:template to produce literal",Tests: (1) three column mapping; and (2) the use of rml:template to produce literal,no,,,,,, +RMLTC0004a-CSV,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-JSON,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-XML,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-MySQL,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-PostgreSQL,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-SQLServer,"Two column mapping, from one row table to two different triples","Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004a-SPARQL,"Two BlankNodes mapping, from one object to two different triples","Tests: (1) two BlankNodes mapping, (2) subject URI generated by a tripple object value; (3) from one BlankNode to two different triples (4) typing by using rml:class",no,,,,,, +RMLTC0004b-CSV,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-JSON,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-XML,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-MySQL,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-PostgreSQL,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-SQLServer,"One column mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0004b-SPARQL,"One tripple mapping, presence of rml:termType rml:Literal on rml:subjectMap","Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid",yes,,,,,, +RMLTC0005a-CSV,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-JSON,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-XML,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-MySQL,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-PostgreSQL,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005a-SQLServer,Typing of resources,Tests the typing of resources,no,,,,,, +RMLTC0005b-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, +RMLTC0005b-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, +RMLTC0005b-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key,no,,,,,, +RMLTC0006a-CSV,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-JSON,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-XML,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-MySQL,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-PostgreSQL,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-SQLServer,"Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0006a-SPARQL,"rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap","Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap",no,,,,,, +RMLTC0007a-CSV,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-JSON,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-XML,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-MySQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-PostgreSQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-SQLServer,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007a-SPARQL,Typing resources by relying on rdf:type predicate,Tests the typing resources by relying on rdf:type predicate,no,,,,,, +RMLTC0007b-CSV,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-JSON,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-XML,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-MySQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-PostgreSQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-SQLServer,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007b-SPARQL,Assigning triples to Named Graphs,Tests the generation of triples to a named graph,no,,,,,, +RMLTC0007c-CSV,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-JSON,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-XML,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-MySQL,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-PostgreSQL,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-SQLServer,"One row mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007c-SPARQL,"One object mapping, using rml:class","Tests subjectmap with more than one class IRIs, rml:class",no,,,,,, +RMLTC0007d-CSV,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-JSON,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-XML,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-MySQL,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-PostgreSQL,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-SQLServer,"One column mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007d-SPARQL,"One object mapping, specifying an rml:predicateObjectMap with rdf:type","Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type",no,,,,,, +RMLTC0007e-CSV,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-JSON,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-XML,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-MySQL,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-PostgreSQL,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-SQLServer,"One column mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007e-SPARQL,"One object mapping, using rml:graphMap and rml:class",Tests subjectmap with rml:graphMap and rml:class,no,,,,,, +RMLTC0007f-CSV,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-JSON,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-XML,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-MySQL,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-PostgreSQL,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-SQLServer,"One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007f-SPARQL,"One object mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type",Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type,no,,,,,, +RMLTC0007g-CSV,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-JSON,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-XML,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-MySQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-PostgreSQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-SQLServer,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007g-SPARQL,Assigning triples to the default graph,Tests the generation of triples to the default graph,no,,,,,, +RMLTC0007h-CSV,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-JSON,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-XML,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-MySQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-PostgreSQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-SQLServer,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0007h-SPARQL,Assigning triples to a non-IRI named graph,"Tests the generation of triples to a non-IRI named graph, which is an error",yes,,,,,, +RMLTC0008a-CSV,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-JSON,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-XML,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-MySQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-PostgreSQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-SQLServer,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008a-SPARQL,Generation of triples to a target graph by using rml:graphMap and rml:template,Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template,no,,,,,, +RMLTC0008b-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008b-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map without join,no,,,,,, +RMLTC0008c-CSV,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-JSON,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-XML,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-MySQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-PostgreSQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-SQLServer,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0008c-SPARQL,Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap,no,,,,,, +RMLTC0009a-CSV,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-JSON,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-XML,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-MySQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-PostgreSQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-SQLServer,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009a-SPARQL,Generation of triples from foreign key relations,Test foreign key relationships among logical tables,no,,,,,, +RMLTC0009b-CSV,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-JSON,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-XML,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-MySQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-PostgreSQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-SQLServer,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009b-SPARQL,Generation of triples to multiple graphs,Test that results from distinct parts of the mapping can be directed to different target graphs.,no,,,,,, +RMLTC0009c-MySQL,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, +RMLTC0009c-PostgreSQL,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, +RMLTC0009c-SQLServer,Unnamed column in a logical table,Test a logical table with unnamed column.,no,,,,,, +RMLTC0009d-MySQL,Named column in logical table,Test a logical table named column.,no,,,,,, +RMLTC0009d-PostgreSQL,Named column in logical table,Test a logical table named column.,no,,,,,, +RMLTC0009d-SQLServer,Named column in logical table,Test a logical table named column.,no,,,,,, +RMLTC0010a-CSV,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010a-JSON,Template with table column with blank space,Tests a template with blank space in column value,no,,,,,, +RMLTC0010a-MySQL,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010a-PostgreSQL,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010a-SQLServer,Template with table column with special chars,Tests a template with blank space in column value,no,,,,,, +RMLTC0010b-CSV,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-JSON,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-XML,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-MySQL,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-PostgreSQL,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010b-SQLServer,Template with table columns with special chars,Tests a template with special chars in column value,no,,,,,, +RMLTC0010c-CSV,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-JSON,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-XML,Template with table columns with special chars and backslashes,Tests a template with special chars in reference value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-MySQL,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-PostgreSQL,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, +RMLTC0010c-SQLServer,Template with table columns with special chars and backslashes,Tests a template with special chars in column value and backslash escapes in string templates,no,,,,,, +RMLTC0011a-MySQL,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, +RMLTC0011a-PostgreSQL,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, +RMLTC0011a-SQLServer,"M to M relation, by using a SQL query","Tests, M to M relations, by using a SQL query",no,,,,,, +RMLTC0011b-CSV,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-JSON,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-XML,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-MySQL,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-PostgreSQL,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0011b-SQLServer,"M to M relation, by using an additional Triples Map","Tests, M to M relations, by using an additional Triples Map",no,,,,,, +RMLTC0012a-CSV,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-JSON,Blank node referencing multiple columns,Tests that blank nodes can be generated by referencing multiple columns,no,,,,,, +RMLTC0012a-XML,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-MySQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-PostgreSQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-SQLServer,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012a-SPARQL,Duplicate triples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-CSV,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-JSON,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-XML,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-MySQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-PostgreSQL,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-SQLServer,Duplicate tuples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012b-SPARQL,Duplicate triples generate same blank node,Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.,no,,,,,, +RMLTC0012c-CSV,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-JSON,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-XML,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-MySQL,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-PostgreSQL,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012c-SQLServer,TriplesMap without subjectMap,"Tests a RML with missing information, TriplesMap without subjectMap.",yes,,,,,, +RMLTC0012d-CSV,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-JSON,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-XML,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-MySQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-PostgreSQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-SQLServer,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012e-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0012e-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0012e-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0013a-JSON,Null value in JSON file,Tests if null values in JSON files are handled correctly.,no,,,,,, +RMLTC0013a-MySQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +RMLTC0013a-PostgreSQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +RMLTC0013a-SQLServer,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +"Inverse expression can only be used for run-time optimizations, i.e., if you use it it will only affect performance, but not the resulting RDF. Therefore, I would suggest to skip those.",Subjectmap with rr:inverseExpression,Tests a rml:subjectMap with rr:inverseExpression,no,,,,,, +,Triplesmaps with rr:inverseExpression and rr:joinCondition,"Test two triplesmaps, one with a rr:inverseExpression and the other with a rr:joinCondition for foerign key relations",no,,,,,, +,"Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps","Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps",no,,,,,, +RMLTC0014d-MySQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0014d-PostgreSQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0014d-SQLServer,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0015a-CSV,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-JSON,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-XML,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-MySQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-PostgreSQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-SQLServer,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015b-CSV,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-JSON,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-XML,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-MySQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-PostgreSQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-SQLServer,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0016a-MySQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016a-PostgreSQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016a-SQLServer,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016b-MySQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016b-PostgreSQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016b-SQLServer,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016c-MySQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016c-PostgreSQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016c-SQLServer,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016d-MySQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016d-PostgreSQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016d-SQLServer,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016e-MySQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0016e-PostgreSQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0016e-SQLServer,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0018a-MySQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0018a-PostgreSQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0018a-SQLServer,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0019a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, +RMLTC0019a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, +RMLTC0019a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019b-CSV,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-JSON,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-XML,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in elements, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-MySQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-PostgreSQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-SQLServer,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0020a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-JSON,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in attributes,no,,,,,, +RMLTC0020a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, +RMLTC0020a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020b-CSV,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-JSON,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-XML,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-MySQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-PostgreSQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-SQLServer,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0021a-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-JSON,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0012d-MySQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-PostgreSQL,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012d-SQLServer,TriplesMap with two subjectMap,"Tests a RML with wrong information, TriplesMap with two subjectMap.",yes,,,,,, +RMLTC0012e-MySQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0012e-PostgreSQL,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0012e-SQLServer,Default mapping,Tests the generation of a default mapping for tables without a primary key.,no,,,,,, +RMLTC0013a-MySQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +RMLTC0013a-PostgreSQL,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +RMLTC0013a-SQLServer,Generation of empty triples from referenced columns that have null values,Tests the generation of empty triples from referenced columns that have null values,no,,,,,, +"Inverse expression can only be used for run-time optimizations, i.e., if you use it it will only affect performance, but not the resulting RDF. Therefore, I would suggest to skip those.",Subjectmap with rr:inverseExpression,Tests a rml:subjectMap with rr:inverseExpression,no,,,,,, +,Triplesmaps with rr:inverseExpression and rr:joinCondition,"Test two triplesmaps, one with a rr:inverseExpression and the other with a rr:joinCondition for foerign key relations",no,,,,,, +,"Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps","Triplesmaps with rr:inverseExpression, rr:joinCondition, and referencing object maps",no,,,,,, +RMLTC0014d-MySQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0014d-PostgreSQL,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0014d-SQLServer,"three tables, one primary key, one foreign key",Test the translation of database type codes to IRIs,no,,,,,, +RMLTC0015a-CSV,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-XML,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-MySQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-PostgreSQL,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015a-SQLServer,Generation of language tags from a table with language information,Generation of language tags from a table with language information,no,,,,,, +RMLTC0015b-CSV,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-XML,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-MySQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-PostgreSQL,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0015b-SQLServer,"Generation of language tags from a table with language information, and a term map with invalid rml:language value","Tests a term map with an invalid rml:language value, which is an error",yes,,,,,, +RMLTC0016a-MySQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016a-PostgreSQL,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016a-SQLServer,Table with datatypes: string and integer,Tests the rml:termType and datatype conversions: string and integer,no,,,,,, +RMLTC0016b-MySQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016b-PostgreSQL,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016b-SQLServer,Table with datatypes: real and float,Tests the rml:termType and datatype conversions: real and float,no,,,,,, +RMLTC0016c-MySQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016c-PostgreSQL,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016c-SQLServer,Table with datatypes: date and timestamp,Tests the rml:termType and datatype conversions: date and timestamp,no,,,,,, +RMLTC0016d-MySQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016d-PostgreSQL,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016d-SQLServer,"Table with datatypes, boolean conversions",Tests the rml:termType and datatype conversions: boolean,no,,,,,, +RMLTC0016e-MySQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0016e-PostgreSQL,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0016e-SQLServer,"Table with datatypes, binary column",Tests the rml:termType and datatype conversions: binary,no,,,,,, +RMLTC0018a-MySQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0018a-PostgreSQL,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0018a-SQLServer,Generation of triples by using CHAR datatype column,"Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.",no,,,,,, +RMLTC0019a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, +RMLTC0019a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0019b-CSV,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-XML,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in elements, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-MySQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-PostgreSQL,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0019b-SQLServer,"Generation of triples by using IRI value in columns, with data error","Test the generation of triples by using IRI value in columns, conforming RML mapping with data error (and limited results)",no,,,,,, +RMLTC0020a-CSV,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-XML,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in elements,no,,,,,, +RMLTC0020a-MySQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-PostgreSQL,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020a-SQLServer,Generation of triples by using IRI value in columns,Test the generation of triples by using IRI value in columns,no,,,,,, +RMLTC0020b-CSV,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-XML,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-MySQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-PostgreSQL,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0020b-SQLServer,"Generation of triples by using IRI value in columns, with data errors","Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)",no,,,,,, +RMLTC0021a-CSV,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-XML,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-MySQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-PostgreSQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-SQLServer,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0021a-SPARQL,Generation of triples referencing object map,Tests the mapping specification referencing object map with same logical source and join condition,no,,,,,, +RMLTC0022a-JSON,Generating of triples with constant datatype,Test triples with a fixed constant datatype,no,,,,,, +RMLTC0022b-JSON,Generating of triples with datatypeMap,Test triples with a XSD datatype generated from the data,no,,,,,, +RMLTC0022c-JSON,Generating of triples with datatypeMap with custom datatype,Test triples with a custom datype from the data,no,,,,,, +RMLTC0023a-JSON,Invalid IRI template 1,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023b-JSON,Invalid IRI template 2,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023c-JSON,Invalid IRI template 3,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023d-JSON,Invalid IRI template 4,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023e-JSON,Invalid IRI template 5,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023f-JSON,Invalid IRI template 6,Test handling of invalid IRI template,yes,,,,,, +RMLTC0023g-JSON,Valid IRI template with backslash-escape,no,,,,,, +RMLTC0025b-JSON,Usage of constant term maps in combination with explicitly defined term types,Tests the usage of constant term maps in combination with explicitly defined term types,yes,,,,,, +RMLTC0026a-JSON,Generation of triples from arrays,Tests the generation of triples from array input data structures,no,,,,,, +RMLTC0026b-JSON,Generation of triples from arrays with wrong reference,Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array,yes,,,,,, +RMLTC0027a-JSON,"Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs",Tests the generation of triples from relative IRIs using base IRI,no,,,,,, +RMLTC0027b-JSON,"Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter",Tests the generation of triples from relative IRI using base IRI parameter,no,,,,,, +RMLTC0027c-JSON,"Two triples maps, both with rml:baseIRI defined","Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter",no,,,,,, +RMLTC0027d-JSON,"Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined",Tests the generation of triples by with base IRIs different than the base IRI parameter,no,,,,,, +RMLTC0028a-JSON,Generation of triples using the URI term type,Tests the generation of triples with a URI term type in the subject or object,no,,,,,, +RMLTC0028b-JSON,Generation of triples using the UnsafeURI term type,Tests the generation of triples with a UnsafeURI term type in the subject or object,no,,,,,, +RMLTC0028c-JSON,Generation of triples using the UnsafeIRI term type,Tests the generation of triples with a UnsafeIRI term type in the subject or object,no,,,,,, +RMLTC0029a-JSON,Generation of the right datatype for a constant in the mapping,Test the honoring of the datatype specified by the constant term in the mapping,no,,,,,, +RMLTC0029b-JSON,Generation of all named graphs when rml:defaultGraph is involved,Test if the default graph is also generated correctly.,no,,,,,, +RMLTC0029c-JSON,Generation of the right language tag for a constant in the mapping,Test the honoring of the language tag specified by the constant term in the mapping,no,,,,,, \ No newline at end of file diff --git a/src/test/resources/rml-core/dev.html b/src/test/resources/rml-core/dev.html index cf34fc5f..f43f6cb5 100644 --- a/src/test/resources/rml-core/dev.html +++ b/src/test/resources/rml-core/dev.html @@ -143,9 +143,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/resources/rml-core/docs/20250908/index.html b/src/test/resources/rml-core/docs/20250908/index.html new file mode 100644 index 00000000..ba5fb3da --- /dev/null +++ b/src/test/resources/rml-core/docs/20250908/index.html @@ -0,0 +1,3906 @@ + + + + + + +RML-Core: Test Cases + + + + + + + + + + + + + + + + + + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rml:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

6. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rml:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

7. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

8. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

9. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rml:path"

+

Description: "Tests the presence of an undefined rml:path"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

10. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

11. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rml:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

12. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

13. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

14. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

15. RMLTC0006a-JSON

+

Title: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Description: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

16. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

17. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

18. RMLTC0007c-JSON

+

Title: "One row mapping, using rml:class"

+

Description: "Tests subjectmap with more than one class IRIs, rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

19. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

20. RMLTC0007e-JSON

+

Title: "One column mapping, using rml:graphMap and rml:class"

+

Description: "Tests subjectmap with rml:graphMap and rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

21. RMLTC0007f-JSON

+

Title: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

22. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

23. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.ID";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

24. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rml:graphMap and rml:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

25. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

26. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

27. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {
+      "ID": 100,
+      "Name": "Tennis"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

28. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {
+      "ID": 100,
+      "Name": "Tennis"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

29. RMLTC0010a-JSON

+

Title: "Template with table column with blank space"

+

Description: "Tests a template with blank space in column value"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

30. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

31. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

32. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {"ID":110, "Description":"Tennis"},
+    {"ID":111, "Description":"Football"},
+    {"ID":112, "Description":"Formula1"}
+  ]
+}
+
+

Input 2

+
{
+  "links": [
+    {"ID_Student":10, "ID_Sport":110},
+    {"ID_Student":11, "ID_Sport":111},
+    {"ID_Student":11, "ID_Sport":112},
+    {"ID_Student":12, "ID_Sport":111}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110" .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111" .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112" .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

33. RMLTC0012a-JSON

+

Title: "Blank node referencing multiple columns"

+

Description: "Tests that blank nodes can be generated by referencing multiple columns"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

34. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "lives": [
+    {"fname":"Bob","lname":"Smith","city":"London"},
+    {"fname":"Sue","lname":"Jones","city":"Madrid"},
+    {"fname":"Bob","lname":"Smith","city":"London"}
+  ]
+}
+
+

Input 1

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

35. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

36. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

37. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

38. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"},
+    {"Code": "IE", "Name": "Irlanda"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

39. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rml:language value"

+

Description: "Tests a term map with an invalid rml:language value, which is an error"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"},
+    {"Code": "IE", "Name": "Irlanda"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

40. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

41. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+
+

42. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

43. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

44. RMLTC0022a-JSON

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus",
+    "Age": 21
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "$.Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

45. RMLTC0022b-JSON

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[
+    { "FOO": 1, "BAR": "string"},
+    { "FOO": 2, "BAR": "int"}
+]
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

46. RMLTC0022c-JSON

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[
+    { "FOO": 1, "BAR": "string"},
+    { "FOO": 2, "BAR": "int"}
+]
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://example.com/datatype#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://example.com/datatype#int> .
+
+
+

47. RMLTC0023a-JSON

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{NON_EXISTING_COLUMN}";
+      rml:class foaf:Person;
+    ] .
+
+
+

48. RMLTC0023b-JSON

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

49. RMLTC0023c-JSON

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

50. RMLTC0023d-JSON

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

51. RMLTC0023e-JSON

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\\\{Name\\\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

52. RMLTC0023f-JSON

+

Title: "Invalid IRI template 6"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+

53. RMLTC0023g-JSON

+

Title: "Valid IRI template with backslash-escape"

+

Description: "Test handling of a valid IRI template using backslash-escape"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

54. RMLTC0024a-JSON

+

Title: "Usage of constant term maps in combination with explicitly defined term types"

+

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subjectMap [
+      rml:constant "School";
+      rml:termType rml:BlankNode
+  ] .
+
+
+

55. RMLTC0025a-JSON

+

Title: "Generation of triples from arrays"

+

Description: "Tests the generation of triples from array input data structures"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts[*]"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Student/Bob/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

56. RMLTC0025b-JSON

+

Title: "Generation of triples from arrays with wrong reference"

+

Description: "Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+
+

57. RMLTC0025c-JSON

+

Title: "Generation of triples from arrays in subject and object"

+

Description: "Tests the generation of triples from array input data structures in subject and object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"names":["Bob", "Smith"],"amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts[*]"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.names[*]}"
+    ] .
+
+

Output

+
<http://example.com/Student/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Smith> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

58. RMLTC0026a-JSON

+

Title: "Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs"

+

Description: "Tests the generation of triples from relative IRIs using base IRI"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

59. RMLTC0026b-JSON

+

Title: "Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter"

+

Description: "Tests the generation of triples from relative IRI using base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://tp1.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://tp1.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://tp1.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

60. RMLTC0026c-JSON

+

Title: "Two triples maps, both with rml:baseIRI defined"

+

Description: "Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

61. RMLTC0026d-JSON

+

Title: "Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined"

+

Description: "Tests the generation of triples by with base IRIs different than the base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example2.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:baseIRI <http://example2.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://example2.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

62. RMLTC0027a-JSON

+

Title: "Generation of triples using the URI term type"

+

Description: "Tests the generation of triples with a URI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:URI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

63. RMLTC0027b-JSON

+

Title: "Generation of triples using the UnsafeURI term type"

+

Description: "Tests the generation of triples with a UnsafeURI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:UnsafeURI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

64. RMLTC0027c-JSON

+

Title: "Generation of triples using the UnsafeIRI term type"

+

Description: "Tests the generation of triples with a UnsafeIRI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:UnsafeIRI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

65. RMLTC0028a-JSON

+

Title: "Generation of the right datatype for a constant in the mapping"

+

Description: "Test the honoring of the datatype specified by the constant term in the mapping"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "foo": "bar"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+
+ [
+    a rml:TriplesMap;
+    rml:logicalSource [
+      rml:source "data.json" ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+    ];
+    rml:predicateObjectMap [
+      rml:predicate <http://example.org/ns/p> ;
+      rml:object true ; # datatype is boolean
+    ];
+  ] .
+
+

Output

+
<https://example.org/instances/0> <http://example.org/ns/p> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

66. RMLTC0028b-JSON

+

Title: "Generation of all named graphs when rml:defaultGraph is involved"

+

Description: "Test if the default graph is also generated correctly."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "name": "Alice"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix s: <http://schema.org/> .
+
+ [
+    a rml:TriplesMap;
+    rml:logicalSource [
+      rml:source "data.json" ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+      rml:class s:Person ;
+      rml:graph <graph:1> ;
+    ];
+    rml:predicateObjectMap [
+      rml:predicate s:givenName ;
+      rml:objectMap [ rml:reference "name" ] ;
+      rml:graph rml:defaultGraph ;
+    ];
+  ] .
+
+

Output

+
<https://example.org/instances/0> <http://schema.org/givenName> "Alice".
+<https://example.org/instances/0> <http://schema.org/givenName> "Alice" <graph:1> .
+<https://example.org/instances/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> <graph:1> .
+
+
+

67. RMLTC0028c-JSON

+

Title: "Generation of the right language tag for a constant in the mapping"

+

Description: "Test the honoring of the language tag specified by the constant term in the mapping"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "foo": "bar"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+ [
+    a rml:TriplesMap;
+    rml:logicalSource [
+      rml:source "data.json" ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+    ];
+    rml:predicateObjectMap [
+      rml:predicate <http://example.org/ns/p> ;
+      rml:object "train"@en ;
+    ];
+  ] .
+
+

Output

+
<https://example.org/instances/0> <http://example.org/ns/p> "train"@en .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/docs/index.html b/src/test/resources/rml-core/docs/index.html index d298e7e3..ba5fb3da 100644 --- a/src/test/resources/rml-core/docs/index.html +++ b/src/test/resources/rml-core/docs/index.html @@ -1,6 +1,6 @@ - + + + + + (CiTIUS – University of Santiago de Compostela)
Author:
@@ -315,7 +351,7 @@

RML-Core: Test Cases

discussion of this specification. -

+

1. Introduction

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). @@ -351,6 +387,7 @@

RML-Core: Test Cases

4. RMLTC0000-JSON

Title: "one table, one column, zero rows"

Description: "Tests if an empty table produces an empty RDF graph"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -381,12 +418,13 @@ 

RML-Core: Test Cases

] .

Output

-
# empty database
+
# empty database
 

5. RMLTC0001a-JSON

Title: "One column mapping, subject URI generation by using rml:template"

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -426,6 +464,7 @@ 

RML-Core: Test Cases

6. RMLTC0001b-JSON

Title: "One column mapping, generation of a BlankNode subject by using rml:termType"

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -466,6 +505,7 @@ 

RML-Core: Test Cases

7. RMLTC0002a-JSON

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -506,15 +546,16 @@ 

RML-Core: Test Cases

] .

Output

-
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
-<http://example.com/10/Venus> <http://example.com/id> "10" .
-<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
 
 

8. RMLTC0002b-JSON

Title: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType"

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -556,6 +597,7 @@ 

RML-Core: Test Cases

9. RMLTC0002e-JSON

Title: "Two columns mapping, an undefined rml:path"

Description: "Tests the presence of an undefined rml:path"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -592,6 +634,7 @@ 

RML-Core: Test Cases

10. RMLTC0002g-JSON

Title: "Two columns mapping, invalid JSONPath"

Description: "Test the presence of an invalid JSONPath"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -628,6 +671,7 @@ 

RML-Core: Test Cases

11. RMLTC0003c-JSON

Title: "Three columns mapping, by using a rml:template to produce literal"

Description: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -669,6 +713,7 @@ 

RML-Core: Test Cases

12. RMLTC0004a-JSON

Title: "Two column mapping, from one row table to two different triples"

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -734,6 +779,7 @@ 

RML-Core: Test Cases

13. RMLTC0004b-JSON

Title: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap"

Description: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -770,6 +816,7 @@ 

RML-Core: Test Cases

14. RMLTC0005a-JSON

Title: "Typing of resources"

Description: "Tests the typing of resources"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -828,6 +875,7 @@ 

RML-Core: Test Cases

15. RMLTC0006a-JSON

Title: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

Description: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -873,6 +921,7 @@ 

RML-Core: Test Cases

16. RMLTC0007a-JSON

Title: "Typing resources by relying on rdf:type predicate"

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -913,6 +962,7 @@ 

RML-Core: Test Cases

17. RMLTC0007b-JSON

Title: "Assigning triples to Named Graphs"

Description: "Tests the generation of triples to a named graph"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -961,6 +1011,7 @@ 

RML-Core: Test Cases

18. RMLTC0007c-JSON

Title: "One row mapping, using rml:class"

Description: "Tests subjectmap with more than one class IRIs, rml:class"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1002,16 +1053,17 @@ 

RML-Core: Test Cases

] .

Output

-
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
-<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
-<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
 
-
+

19. RMLTC0007d-JSON

Title: "One column mapping, specifying an rml:predicateObjectMap with rdf:type"

Description: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1059,16 +1111,17 @@ 

RML-Core: Test Cases

] .

Output

-
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
-<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
-<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
 
-
+

20. RMLTC0007e-JSON

Title: "One column mapping, using rml:graphMap and rml:class"

Description: "Tests subjectmap with rml:graphMap and rml:class"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1110,7 +1163,7 @@ 

RML-Core: Test Cases

] .

Output

-
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
 <http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
 
@@ -1119,6 +1172,7 @@ 

RML-Core: Test Cases

21. RMLTC0007f-JSON

Title: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type"

Description: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1166,13 +1220,14 @@ 

RML-Core: Test Cases

Output

<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
 <http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
-<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
 
-
+

22. RMLTC0007g-JSON

Title: "Assigning triples to the default graph"

Description: "Tests the generation of triples to the default graph"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1215,6 +1270,7 @@ 

RML-Core: Test Cases

23. RMLTC0007h-JSON

Title: "Assigning triples to a non-IRI named graph"

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -1256,6 +1312,7 @@ 

RML-Core: Test Cases

24. RMLTC0008a-JSON

Title: "Generation of triples to a target graph by using rml:graphMap and rml:template"

Description: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1318,6 +1375,7 @@ 

RML-Core: Test Cases

25. RMLTC0008b-JSON

Title: "Generation of triples referencing object map"

Description: "Tests the mapping specification referencing object map without join"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1398,6 +1456,7 @@ 

RML-Core: Test Cases

26. RMLTC0008c-JSON

Title: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

Description: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1441,6 +1500,7 @@ 

RML-Core: Test Cases

27. RMLTC0009a-JSON

Title: "Generation of triples from foreign key relations"

Description: "Test foreign key relationships among logical tables"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1457,6 +1517,16 @@ 

RML-Core: Test Cases

] }
+

Input 1

+
{
+  "sports": [
+    {
+      "ID": 100,
+      "Name": "Tennis"
+    }
+  ]
+}
+

Mapping

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -1519,6 +1589,7 @@ 

RML-Core: Test Cases

28. RMLTC0009b-JSON

Title: "Generation of triples to multiple graphs"

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1535,6 +1606,16 @@ 

RML-Core: Test Cases

] }
+

Input 1

+
{
+  "sports": [
+    {
+      "ID": 100,
+      "Name": "Tennis"
+    }
+  ]
+}
+

Mapping

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -1607,6 +1688,7 @@ 

RML-Core: Test Cases

29. RMLTC0010a-JSON

Title: "Template with table column with blank space"

Description: "Tests a template with blank space in column value"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1658,6 +1740,7 @@ 

RML-Core: Test Cases

30. RMLTC0010b-JSON

Title: "Template with table columns with special chars"

Description: "Tests a template with special chars in column value"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1709,6 +1792,7 @@ 

RML-Core: Test Cases

31. RMLTC0010c-JSON

Title: "Template with table columns with special chars and backslashes"

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1761,6 +1845,7 @@ 

RML-Core: Test Cases

32. RMLTC0011b-JSON

Title: "M to M relation, by using an additional Triples Map"

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1771,6 +1856,25 @@ 

RML-Core: Test Cases

] }
+

Input 1

+
{
+  "sports": [
+    {"ID":110, "Description":"Tennis"},
+    {"ID":111, "Description":"Football"},
+    {"ID":112, "Description":"Formula1"}
+  ]
+}
+
+

Input 2

+
{
+  "links": [
+    {"ID_Student":10, "ID_Sport":110},
+    {"ID_Student":11, "ID_Sport":111},
+    {"ID_Student":11, "ID_Sport":112},
+    {"ID_Student":12, "ID_Sport":111}
+  ]
+}
+

Mapping

@prefix ex: <http://example.com/> .
 @prefix rml: <http://w3id.org/rml/> .
@@ -1865,6 +1969,7 @@ 

RML-Core: Test Cases

33. RMLTC0012a-JSON

Title: "Blank node referencing multiple columns"

Description: "Tests that blank nodes can be generated by referencing multiple columns"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -1917,7 +2022,26 @@ 

RML-Core: Test Cases

34. RMLTC0012b-JSON

Title: "Duplicate tuples generate same blank node"

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Default Base IRI: http://example.com/

Error expected? No

+

Input

+
{
+  "lives": [
+    {"fname":"Bob","lname":"Smith","city":"London"},
+    {"fname":"Sue","lname":"Jones","city":"Madrid"},
+    {"fname":"Bob","lname":"Smith","city":"London"}
+  ]
+}
+
+

Input 1

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+

Mapping

@prefix ex: <http://example.com/> .
 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
@@ -1975,6 +2099,7 @@ 

RML-Core: Test Cases

35. RMLTC0012c-JSON

Title: "TriplesMap without subjectMap"

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -2016,6 +2141,7 @@ 

RML-Core: Test Cases

36. RMLTC0012d-JSON

Title: "TriplesMap with two subjectMap"

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -2064,6 +2190,7 @@ 

RML-Core: Test Cases

37. RMLTC0013a-JSON

Title: "Null value in JSON file"

Description: "Tests if null values in JSON files are handled correctly."

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -2103,12 +2230,13 @@ 

RML-Core: Test Cases

38. RMLTC0015a-JSON

Title: "Generation of language tags from a table with language information"

Description: "Generation of language tags from a table with language information"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
   "countries": [
-    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
-    {"Code": "IE", "Name": "Ireland"}
+    {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"},
+    {"Code": "IE", "Name": "Irlanda"}
   ]
 }
 
@@ -2168,12 +2296,13 @@

RML-Core: Test Cases

39. RMLTC0015b-JSON

Title: "Generation of language tags from a table with language information, and a term map with invalid rml:language value"

Description: "Tests a term map with an invalid rml:language value, which is an error"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
   "countries": [
-    {"Code": "BO", "Name": "Bolivia, Plurinational State of"},
-    {"Code": "IE", "Name": "Ireland"}
+    {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"},
+    {"Code": "IE", "Name": "Irlanda"}
   ]
 }
 
@@ -2225,6 +2354,7 @@

RML-Core: Test Cases

40. RMLTC0019a-JSON

Title: "Generation of triples by using IRI value in columns"

Description: "Test the generation of triples by using IRI value in attributes"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -2267,26 +2397,17 @@ 

RML-Core: Test Cases

Output

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
-<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+<http://example.com/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
 

41. RMLTC0019b-JSON

Title: "Generation of triples by using IRI value in columns, with data error"

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

-

Error expected? No

+

Default Base IRI: http://example.com/

+

Error expected? Yes

Input

{
   "persons": [
-    {
-      "ID": 10,
-      "FirstName": "http://example.com/ns#Jhon",
-      "LastName": "Smith"
-    },
-    {
-      "ID": 20,
-      "FirstName": "Carlos",
-      "LastName": "Mendoza"
-    },
     {
       "ID": 30,
       "FirstName": "Juan Daniel",
@@ -2318,13 +2439,11 @@ 

RML-Core: Test Cases

rml:reference "$.FirstName" ] .
-

Output

-

-

42. RMLTC0020a-JSON

Title: "Generation of triples by using IRI value in columns"

Description: "Test the generation of triples by using IRI value in attributes"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -2361,16 +2480,17 @@ 

RML-Core: Test Cases

] .

Output

-
<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
<http://example.com/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
 

43. RMLTC0021a-JSON

Title: "Generation of triples referencing object map"

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -2432,12 +2552,14 @@ 

RML-Core: Test Cases

44. RMLTC0022a-JSON

Title: "Generating of triples with constant datatype"

Description: "Test triples with a fixed constant datatype"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
   "students": [{
     "ID": 10,
-    "Name":"Venus"
+    "Name":"Venus",
+    "Age": 21
   }]
 }
 
@@ -2481,14 +2603,13 @@

RML-Core: Test Cases

45. RMLTC0022b-JSON

Title: "Generating of triples with datatypeMap"

Description: "Test triples with a XSD datatype generated from the data"

+

Default Base IRI: http://example.com/

Error expected? No

Input

-
{
-  "students": [{
-    "ID": 10,
-    "Name":"Venus"
-  }]
-}
+
[
+    { "FOO": 1, "BAR": "string"},
+    { "FOO": 2, "BAR": "int"}
+]
 

Mapping

@prefix ex: <http://example.com/> .
@@ -2497,7 +2618,7 @@ 

RML-Core: Test Cases

<http://example.com/base/TriplesMap1> a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; + rml:iterator "$[*]"; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; rml:path "data.json" @@ -2525,14 +2646,13 @@

RML-Core: Test Cases

46. RMLTC0022c-JSON

Title: "Generating of triples with datatypeMap with custom datatype"

Description: "Test triples with a custom datype from the data"

+

Default Base IRI: http://example.com/

Error expected? No

Input

-
{
-  "students": [{
-    "ID": 10,
-    "Name":"Venus"
-  }]
-}
+
[
+    { "FOO": 1, "BAR": "string"},
+    { "FOO": 2, "BAR": "int"}
+]
 

Mapping

@prefix ex: <http://example.com/> .
@@ -2541,7 +2661,7 @@ 

RML-Core: Test Cases

<http://example.com/base/TriplesMap1> a rml:TriplesMap; rml:logicalSource [ a rml:LogicalSource; rml:referenceFormulation rml:JSONPath; - rml:iterator "$.[*]"; + rml:iterator "$[*]"; rml:source [ a rml:RelativePathSource; rml:root rml:MappingDirectory; rml:path "data.json" @@ -2561,13 +2681,14 @@

RML-Core: Test Cases

] .

Output

-
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
-<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
<http://example.com/1> <http://example.com/x> "1"^^<http://example.com/datatype#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://example.com/datatype#int> .
 

47. RMLTC0023a-JSON

Title: "Invalid IRI template 1"

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -2599,6 +2720,7 @@ 

RML-Core: Test Cases

48. RMLTC0023b-JSON

Title: "Invalid IRI template 2"

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -2630,6 +2752,7 @@ 

RML-Core: Test Cases

49. RMLTC0023c-JSON

Title: "Invalid IRI template 3"

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -2662,6 +2785,7 @@ 

RML-Core: Test Cases

50. RMLTC0023d-JSON

Title: "Invalid IRI template 4"

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -2694,7 +2818,8 @@ 

RML-Core: Test Cases

51. RMLTC0023e-JSON

Title: "Invalid IRI template 5"

Description: "Test handling of invalid IRI template"

-

Error expected? No

+

Default Base IRI: http://example.com/

+

Error expected? Yes

Input

{
   "students": [{
@@ -2717,19 +2842,17 @@ 

RML-Core: Test Cases

] ]; rml:subjectMap [ - rml:template "http://example.com/{\\{Name\\}}"; + rml:template "http://example.com/{\\\\{Name\\\\}}"; rml:class foaf:Person; ] . -
-

Output

-
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
 

52. RMLTC0023f-JSON

Title: "Invalid IRI template 6"

Description: "Test handling of invalid IRI template"

-

Error expected? No

+

Default Base IRI: http://example.com/

+

Error expected? Yes

Input

{
   "students": [{
@@ -2756,54 +2879,47 @@ 

RML-Core: Test Cases

rml:class foaf:Person; ] .
-

Output

-
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-
-

53. RMLTC0025a-JSON

-

Title: "Generation of triples with constant blank node "

-

Description: "Tests the generation of triples with a constant blank node"

+

53. RMLTC0023g-JSON

+

Title: "Valid IRI template with backslash-escape"

+

Description: "Test handling of a valid IRI template using backslash-escape"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
   "students": [{
-    "Name":"Venus"
-  },
-  {
-    "Name":"Julio"
+    "ID": 10,
+    "{Name}":"Venus"
   }]
 }
 

Mapping

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
 @prefix rml: <http://w3id.org/rml/> .
-@prefix ex: <http://example.com/>.
 
 <http://example.com/base/TriplesMap1> a rml:TriplesMap;
   rml:logicalSource [ a rml:LogicalSource;
-      rml:iterator "$.students[*]";
-      rml:referenceFormulation rml:JSONPath;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
       rml:source [ a rml:RelativePathSource;
           rml:root rml:MappingDirectory;
           rml:path "student.json"
         ]
     ];
-  rml:predicateObjectMap [
-      rml:objectMap [
-          rml:reference "$.Name"
-        ];
-      rml:predicate ex:student
-    ];
-  rml:subject _:School .
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
 

Output

-
_:School <http://example.com/student> "Julio" .
-_:School <http://example.com/student> "Venus" .
+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
 
-

54. RMLTC0025b-JSON

+

54. RMLTC0024a-JSON

Title: "Usage of constant term maps in combination with explicitly defined term types"

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

+

Default Base IRI: http://example.com/

Error expected? Yes

Input

{
@@ -2841,9 +2957,10 @@ 

RML-Core: Test Cases

] .
-

55. RMLTC0026a-JSON

+

55. RMLTC0025a-JSON

Title: "Generation of triples from arrays"

Description: "Tests the generation of triples from array input data structures"

+

Default Base IRI: http://example.com/

Error expected? No

Input

{
@@ -2868,7 +2985,7 @@ 

RML-Core: Test Cases

]; rml:predicateObjectMap [ rml:objectMap [ - rml:reference "$.amounts" + rml:reference "$.amounts[*]" ]; rml:predicate ex:amount ]; @@ -2877,18 +2994,694 @@

RML-Core: Test Cases

] .

Output

-
<http://example.com/Student/Bob/Smith> <http://example.com/amount> "30" .
-<http://example.com/Student/Bob/Smith> <http://example.com/amount> "40" .
-<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50" .
+
<http://example.com/Student/Bob/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

56. RMLTC0025b-JSON

+

Title: "Generation of triples from arrays with wrong reference"

+

Description: "Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
 
+

57. RMLTC0025c-JSON

+

Title: "Generation of triples from arrays in subject and object"

+

Description: "Tests the generation of triples from array input data structures in subject and object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"names":["Bob", "Smith"],"amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
 
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts[*]"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.names[*]}"
+    ] .
+
+

Output

+
<http://example.com/Student/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Smith> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

58. RMLTC0026a-JSON

+

Title: "Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs"

+

Description: "Tests the generation of triples from relative IRIs using base IRI"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
 
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
 
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

59. RMLTC0026b-JSON

+

Title: "Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter"

+

Description: "Tests the generation of triples from relative IRI using base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
 
-
\ No newline at end of file
+})()
\ No newline at end of file
diff --git a/src/test/resources/rml-core/list.sh b/src/test/resources/rml-core/list.sh
old mode 100644
new mode 100755
diff --git a/src/test/resources/rml-core/make-metadata.py b/src/test/resources/rml-core/make-metadata.py
old mode 100644
new mode 100755
index f42be7f8..48374aac
--- a/src/test/resources/rml-core/make-metadata.py
+++ b/src/test/resources/rml-core/make-metadata.py
@@ -17,17 +17,19 @@ def get_title_description(testcase: str):
 def main(spec: str):
     with open ('metadata.csv', 'w') as csvfile:
         writer = csv.writer(csvfile)
-        writer.writerow(['ID', 'title', 'description', 'specification',
+        writer.writerow(['ID', 'title', 'description', 'specification','base_iri',
                          'mapping', 'input_format1', 'input_format2',
                          'input_format3', 'output_format1', 'output_format2',
                          'output_format3', 'input1', 'input2', 'input3',
                          'output1', 'output2', 'output3', 'error'])
-        for testcase in glob.glob('RML*'):
-            print(testcase)
+        testcases = sorted(glob.glob("RML*"))
+        for testcase in testcases:
+            print(f'Generating the description of {testcase}')
             title, description = get_title_description(testcase)
             title = '"' + title + '"'
             description = '"' + description + '"'
             error = 'false'
+            base_iri = 'http://example.org/'
             input1 = ''
             input2 = ''
             input3 = ''
@@ -45,140 +47,44 @@ def main(spec: str):
             if os.path.exists(os.path.join(testcase, 'student.json')):
                 input1 = 'student.json'
                 input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'student_sport.json')):
-                if testcase == 'RMLTC0009a-JSON' or testcase == 'RMLTC0009b-JSON':
+            
+            if os.path.exists(os.path.join(testcase, 'student_sport.json')):
+                if testcase == 'RMLTC0009a-JSON' or testcase == 'RMLTC0009b-JSON' or testcase == 'RMLTC0011b-JSON':
                     input3 = 'student_sport.json'
                     input_format3 = 'application/json'
                 else:
                     input1 = 'student_sport.json'
                     input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'sport.json')):
+            if os.path.exists(os.path.join(testcase, 'sport.json')):
                 input2 = 'sport.json'
                 input_format2 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'ious.json')):
+            if os.path.exists(os.path.join(testcase, 'ious.json')):
                 input1 = 'ious.json'
                 input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'country_info.json')):
+            if os.path.exists(os.path.join(testcase, 'country_info.json')):
                 input1 = 'country_info.json'
                 input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'persons.json')):
+            if os.path.exists(os.path.join(testcase, 'persons.json')):
                 if testcase == 'RMLTC0012b-JSON':
                     input2 = 'persons.json'
                     input_format2 = 'application/json'
                 else:
                     input1 = 'persons.json'
                     input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'country_en.json')):
+            if os.path.exists(os.path.join(testcase, 'country_en.json')):
                 input1 = 'country_en.json'
                 input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'country_es.json')):
+            if os.path.exists(os.path.join(testcase, 'country_es.json')):
                 input1 = 'country_es.json'
                 input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'data.json')):
+            if os.path.exists(os.path.join(testcase, 'data.json')):
                 input1 = 'data.json'
                 input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'lives.json')):
+            if os.path.exists(os.path.join(testcase, 'lives.json')):
                 input1 = 'lives.json'
                 input_format1 = 'application/json'
-            elif os.path.exists(os.path.join(testcase, 'student.xml')):
-                input1 = 'student.xml'
-                input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'student_sport.xml')):
-                if testcase == 'RMLTC0009a-XML' or testcase == 'RMLTC0009b-XML':
-                    input3 = 'student_sport.xml'
-                    input_format3 = 'text/xml'
-                else:
-                    input1 = 'student_sport.xml'
-                    input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'sport.xml')):
-                input2 = 'sport.xml'
-                input_format2 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'ious.xml')):
-                input1 = 'ious.xml'
-                input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'country_info.xml')):
-                input1 = 'country_info.xml'
-                input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'persons.xml')):
-                if testcase == 'RMLTC0012b-XML':
-                    input2 = 'persons.xml'
-                    input_format2 = 'text/xml'
-                else:
-                    input1 = 'persons.xml'
-                    input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'country_en.xml')):
-                input1 = 'country_en.xml'
-                input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'country_es.xml')):
-                input1 = 'country_es.xml'
-                input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'data.xml')):
-                input1 = 'data.xml'
-                input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'lives.xml')):
-                input1 = 'lives.xml'
-                input_format1 = 'text/xml'
-            elif os.path.exists(os.path.join(testcase, 'student.csv')):
-                input1 = 'student.csv'
-                input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'student_sport.csv')):
-                if testcase == 'RMLTC0009a-CSV' or testcase == 'RMLTC0009b-CSV':
-                    input3 = 'student_sport.csv'
-                    input_format3 = 'text/csv'
-                else:
-                    input1 = 'student_sport.csv'
-                    input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'sport.csv')):
-                input2 = 'sport.csv'
-                input_format2 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'ious.csv')):
-                input1 = 'ious.csv'
-                input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'country_info.csv')):
-                input1 = 'country_info.csv'
-                input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'persons.csv')):
-                if testcase == 'RMLTC0012b-CSV':
-                    input2 = 'persons.csv'
-                    input_format2 = 'text/csv'
-                else:
-                    input1 = 'persons.csv'
-                    input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'country_en.csv')):
-                input1 = 'country_en.csv'
-                input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'country_es.csv')):
-                input1 = 'country_es.csv'
-                input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'data.csv')):
-                input1 = 'data.csv'
-                input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'lives.csv')):
-                input1 = 'lives.csv'
-                input_format1 = 'text/csv'
-            elif os.path.exists(os.path.join(testcase, 'resource.sql')):
-                input1 = 'resource.sql'
-                if 'MySQL' in testcase:
-                    input_format1 = 'application/sql+mysql'
-                elif 'PostgreSQL' in testcase:
-                    input_format1 = 'application/sql+postgresql'
-                elif 'SQLServer' in testcase:
-                    input_format1 = 'application/sql+sqlserver'
-                elif 'MariaDB' in testcase:
-                    input_format1 = 'application/sql+mariadb'
-                elif 'SQLite' in testcase:
-                    input_format1 = 'application/sql+sqlite'
-                else:
-                    input_format1 = 'application/sql'
-            elif os.path.exists(os.path.join(testcase, 'resource.ttl')):
-                input1 = 'resource.ttl'
-                input_format1 = 'text/turtle'
-            elif os.path.exists(os.path.join(testcase, 'resource1.ttl')):
-                input1 = 'resource1.ttl'
-                input_format1 = 'text/turtle'
-            elif os.path.exists(os.path.join(testcase, 'resource2.ttl')):
-                input2 = 'resource2.ttl'
-                input_format2 = 'text/turtle'
+
+            #print(input1, input2, input3)
 
             # Mapping file
             if os.path.exists(os.path.join(testcase, 'mapping.ttl')):
@@ -191,9 +97,9 @@ def main(spec: str):
                 output1 = 'output.nq'
                 output_format1 = 'application/n-quads'
             else:
-                error = 'true';
+                error = 'true'
 
-            writer.writerow([testcase, title, description, spec, mapping_file,
+            writer.writerow([testcase, title, description, spec, base_iri, mapping_file,
                              input_format1, input_format2, input_format3,
                              output_format1, output_format2, output_format3,
                              input1, input2, input3, output1, output2,
@@ -203,6 +109,7 @@ def main(spec: str):
             lines.append(f'## {testcase}\n\n')
             lines.append(f'**Title**: {title}\n\n')
             lines.append(f'**Description**: {description}\n\n')
+            lines.append(f'**Default Base IRI**: http://example.com/\n\n')
             if error == 'true':
                 error_html = 'Yes'
             else:
diff --git a/src/test/resources/rml-core/manifest.rml.ttl b/src/test/resources/rml-core/manifest.rml.ttl
index 864f3ba9..9f6175d1 100644
--- a/src/test/resources/rml-core/manifest.rml.ttl
+++ b/src/test/resources/rml-core/manifest.rml.ttl
@@ -48,6 +48,13 @@ _:source
     ];
   ];
 
+  rml:predicateObjectMap [
+    rml:predicate rmltest:defaultBaseIRI;
+    rml:objectMap [
+      rml:constant ;
+    ];
+  ];
+
   rml:predicateObjectMap [
     rml:predicate rmltest:input;
     rml:objectMap [ a rml:RefObjectMap;
diff --git a/src/test/resources/rml-core/manifest.ttl b/src/test/resources/rml-core/manifest.ttl
index 27148320..5762cdd9 100644
--- a/src/test/resources/rml-core/manifest.ttl
+++ b/src/test/resources/rml-core/manifest.ttl
@@ -1,56 +1,88 @@
+  "student_sport.json" .
+  "application/json" .
+   .
+  "sport.json" .
+  "application/json" .
+   .
+  "data.json" .
+  "application/json" .
+   .
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
   "RMLTC0026a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
+  "RMLTC0026d-JSON" .
+   .
+   .
+  "false"^^ .
+  "mapping.ttl" .
+   .
+   .
   "RMLTC0028c-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
+  "student.json" .
+  "application/json" .
+   .
   "RMLTC0013a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
+  "persons.json" .
+  "application/json" .
+   .
+  "data.json" .
+  "application/json" .
+   .
   "RMLTC0002g-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0028b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
   "RMLTC0004b-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
   "RMLTC0015b-JSON" .
+   .
+   .
   "true"^^ .
-   .
+  "mapping.ttl" .
    .
   "output.nq" .
   "application/n-quads" .
@@ -61,29 +93,31 @@
   "output.nq" .
   "application/n-quads" .
    .
-  "student.json" .
-  "application/json" .
-   .
+  "output.nq" .
+  "application/n-quads" .
+   .
   "persons.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0004a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
   "RMLTC0019b-JSON" .
-  "false"^^ .
-   .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
-  "mapping.ttl" .
   "RMLTC0000-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "ious.json" .
   "application/json" .
@@ -94,11 +128,12 @@
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
   "RMLTC0008a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "output.nq" .
   "application/n-quads" .
@@ -106,18 +141,12 @@
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
   "RMLTC0023f-JSON" .
-  "false"^^ .
-   .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
-  "student.json" .
-  "application/json" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
   "student.json" .
   "application/json" .
    .
@@ -127,32 +156,36 @@
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
   "RMLTC0023b-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
-  "mapping.ttl" .
   "RMLTC0023e-JSON" .
-  "false"^^ .
-   .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
-  "mapping.ttl" .
   "RMLTC0010b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
   "RMLTC0023a-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
-  "mapping.ttl" .
   "RMLTC0012d-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
   "student.json" .
   "application/json" .
@@ -163,92 +196,98 @@
   "output.nq" .
   "application/n-quads" .
    .
+  "RMLTC0025c-JSON" .
+   .
+   .
+  "false"^^ .
+  "mapping.ttl" .
+   .
+   .
   "output.nq" .
   "application/n-quads" .
    .
-  "persons.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0010a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
   "RMLTC0012c-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
   "country_info.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0025b-JSON" .
+   .
+   .
   "true"^^ .
-   .
+  "mapping.ttl" .
    .
-  "mapping.ttl" .
   "RMLTC0027a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
-  "RMLTC0027d-JSON" .
-  "false"^^ .
-   .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "mapping.ttl" .
   "RMLTC0001b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
    .
+  "student.json" .
+  "application/json" .
+   .
   "student.json" .
   "application/json" .
    .
-  "student.json" .
-  "application/json" .
-   .
-  "mapping.ttl" .
   "RMLTC0007h-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
+  "student.json" .
+  "application/json" .
+   .
   "output.nq" .
   "application/n-quads" .
    .
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
   "RMLTC0001a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
+  "output.nq" .
+  "application/n-quads" .
+   .
   "RMLTC0003c-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "output.nq" .
   "application/n-quads" .
@@ -256,29 +295,41 @@
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
   "RMLTC0007g-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
+  "persons.json" .
+  "application/json" .
+   .
+  "sport.json" .
+  "application/json" .
+   .
   "student.json" .
   "application/json" .
    .
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0005a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
+  "student.json" .
+  "application/json" .
+   .
   "RMLTC0007c-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
@@ -292,41 +343,49 @@
   "persons.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0007b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
+  "country_es.json" .
+  "application/json" .
+   .
+   .
   "RMLTC0009a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
    .
-  "student.json" .
-  "application/json" .
-   .
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
+  "student.json" .
+  "application/json" .
+   .
   "RMLTC0020a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0022c-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "output.nq" .
   "application/n-quads" .
@@ -334,12 +393,6 @@
   "persons.json" .
   "application/json" .
    .
-  "country_en.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
   "student.json" .
   "application/json" .
    .
@@ -349,36 +402,57 @@
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
+   .
+   .
   "RMLTC0011b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "persons.json" .
-  "application/json" .
-   .
+  "RMLTC0024a-JSON" .
+   .
+   .
+  "true"^^ .
+  "mapping.ttl" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "RMLTC0026c-JSON" .
+   .
+   .
+  "false"^^ .
+  "mapping.ttl" .
+   .
+   .
   "student.json" .
   "application/json" .
    .
   "student.json" .
   "application/json" .
    .
-  "student.json" .
-  "application/json" .
-   .
+  "RMLTC0026b-JSON" .
+   .
+   .
+  "false"^^ .
+  "mapping.ttl" .
+   .
+   .
   "persons.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0028a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "persons.json" .
-  "application/json" .
-   .
+  "output.nq" .
+  "application/n-quads" .
+   .
   "student.json" .
   "application/json" .
    .
@@ -388,28 +462,28 @@
   "output.nq" .
   "application/n-quads" .
    .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "mapping.ttl" .
+  "persons.json" .
+  "application/json" .
+   .
   "RMLTC0002b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "persons.json" .
-  "application/json" .
-   .
-  "mapping.ttl" .
   "RMLTC0002e-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
-  "mapping.ttl" .
   "RMLTC0015a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
@@ -423,26 +497,31 @@
   "output.nq" .
   "application/n-quads" .
    .
+  "country_es.json" .
+  "application/json" .
+   .
   "student.json" .
   "application/json" .
    .
-  "student.json" .
-  "application/json" .
-   .
-  "mapping.ttl" .
+  "output.nq" .
+  "application/n-quads" .
+   .
   "RMLTC0002a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "persons.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0019a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
@@ -453,44 +532,49 @@
   "student.json" .
   "application/json" .
    .
-  "country_en.json" .
-  "application/json" .
-   .
-  "mapping.ttl" .
   "RMLTC0006a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "student.json" .
-  "application/json" .
-   .
-  "mapping.ttl" .
+  "lives.json" .
+  "application/json" .
+   .
   "RMLTC0008c-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
    .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "mapping.ttl" .
   "RMLTC0008b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "country_info.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0023d-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
+  "RMLTC0023g-JSON" .
+   .
+   .
+  "false"^^ .
+  "mapping.ttl" .
+   .
+   .
   "student.json" .
   "application/json" .
    .
@@ -506,16 +590,18 @@
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0021a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
   "RMLTC0023c-JSON" .
-  "true"^^ .
+   .
    .
+  "true"^^ .
+  "mapping.ttl" .
    .
   "output.nq" .
   "application/n-quads" .
@@ -523,35 +609,49 @@
   "output.nq" .
   "application/n-quads" .
    .
+  "data.json" .
+  "application/json" .
+   .
+  "sport.json" .
+  "application/json" .
+   .
   "persons.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0010c-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
+   .
   "RMLTC0012b-JSON" .
+   .
+   .
   "false"^^ .
-   .
+  "mapping.ttl" .
    .
    .
   "student_sport.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0025a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
+  "data.json" .
+  "application/json" .
+   .
   "RMLTC0027c-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
@@ -559,33 +659,42 @@
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0012a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0027b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
+  "data.json" .
+  "application/json" .
+   .
   "student.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0007f-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "student.json" .
   "application/json" .
    .
+  "persons.json" .
+  "application/json" .
+   .
   "output.nq" .
   "application/n-quads" .
    .
@@ -598,44 +707,56 @@
   "country_info.json" .
   "application/json" .
    .
-  "mapping.ttl" .
   "RMLTC0007e-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
   "RMLTC0007a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
   "RMLTC0007d-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
   "output.nq" .
   "application/n-quads" .
    .
-  "persons.json" .
-  "application/json" .
-   .
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
+  "persons.json" .
+  "application/json" .
+   .
+   .
   "RMLTC0009b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
-  "mapping.ttl" .
   "RMLTC0022b-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
   "output.nq" .
   "application/n-quads" .
@@ -646,15 +767,22 @@
   "output.nq" .
   "application/n-quads" .
    .
-  "output.nq" .
-  "application/n-quads" .
-   .
+  "output.nq" .
+  "application/n-quads" .
+   .
   "output.nq" .
   "application/n-quads" .
    .
-  "mapping.ttl" .
   "RMLTC0022a-JSON" .
+   .
+   .
   "false"^^ .
+  "mapping.ttl" .
    .
-   .
    .
+  "persons.json" .
+  "application/json" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
diff --git a/src/test/resources/rml-core/metadata.csv b/src/test/resources/rml-core/metadata.csv
index 185e440b..a47dc6d4 100644
--- a/src/test/resources/rml-core/metadata.csv
+++ b/src/test/resources/rml-core/metadata.csv
@@ -1,61 +1,65 @@
-ID,title,description,specification,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error
-RMLTC0000-JSON,"""one table, one column, zero rows""","""Tests if an empty table produces an empty RDF graph""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0001a-JSON,"""One column mapping, subject URI generation by using rml:template""","""Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0001b-JSON,"""One column mapping, generation of a BlankNode subject by using rml:termType""","""Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0002a-JSON,"""Two columns mapping, generation of a subject URI by the concatenation of two column values""","""Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0002b-JSON,"""Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType""","""Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0002e-JSON,"""Two columns mapping, an undefined rml:path""","""Tests the presence of an undefined rml:path""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0002g-JSON,"""Two columns mapping, invalid JSONPath""","""Test the presence of an invalid JSONPath""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0003c-JSON,"""Three columns mapping, by using a rml:template to produce literal""","""Tests: (1) three column mapping; and (2) the use of rml:template to produce literal""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0004a-JSON,"""Two column mapping, from one row table to two different triples""","""Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student_sport.json,,,output.nq,,,false
-RMLTC0004b-JSON,"""One column mapping, presence of rml:termType rml:Literal on rml:subjectMap""","""Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0005a-JSON,"""Typing of resources""","""Tests the typing of resources""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,ious.json,,,output.nq,,,false
-RMLTC0006a-JSON,"""Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""","""Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007a-JSON,"""Typing resources by relying on rdf:type predicate""","""Tests the typing resources by relying on rdf:type predicate""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007b-JSON,"""Assigning triples to Named Graphs""","""Tests the generation of triples to a named graph""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007c-JSON,"""One row mapping, using rml:class""","""Tests subjectmap with more than one class IRIs, rml:class""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007d-JSON,"""One column mapping, specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007e-JSON,"""One column mapping, using rml:graphMap and rml:class""","""Tests subjectmap with rml:graphMap and rml:class""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007f-JSON,"""One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007g-JSON,"""Assigning triples to the default graph""","""Tests the generation of triples to the default graph""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007h-JSON,"""Assigning triples to a non-IRI named graph""","""Tests the generation of triples to a non-IRI named graph, which is an error""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0008a-JSON,"""Generation of triples to a target graph by using rml:graphMap and rml:template""","""Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0008b-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map without join""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0008c-JSON,"""Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""","""Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0009a-JSON,"""Generation of triples from foreign key relations""","""Test foreign key relationships among logical tables""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0009b-JSON,"""Generation of triples to multiple graphs""","""Test that results from distinct parts of the mapping can be directed to different target graphs.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0010a-JSON,"""Template with table column with blank space""","""Tests a template with blank space in column value""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
-RMLTC0010b-JSON,"""Template with table columns with special chars""","""Tests a template with special chars in column value""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
-RMLTC0010c-JSON,"""Template with table columns with special chars and backslashes""","""Tests a template with special chars in reference value and backslash escapes in string templates""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
-RMLTC0011b-JSON,"""M to M relation, by using an additional Triples Map""","""Tests, M to M relations, by using an additional Triples Map""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0012a-JSON,"""Blank node referencing multiple columns""","""Tests that blank nodes can be generated by referencing multiple columns""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0012b-JSON,"""Duplicate tuples generate same blank node""","""Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.""",http://w3id.org/rml/core/,mapping.ttl,,application/json,,application/n-quads,,,,persons.json,,output.nq,,,false
-RMLTC0012c-JSON,"""TriplesMap without subjectMap""","""Tests a RML with missing information, TriplesMap without subjectMap.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
-RMLTC0012d-JSON,"""TriplesMap with two subjectMap""","""Tests a RML with wrong information, TriplesMap with two subjectMap.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
-RMLTC0013a-JSON,"""Null value in JSON file""","""Tests if null values in JSON files are handled correctly.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0015a-JSON,"""Generation of language tags from a table with language information""","""Generation of language tags from a table with language information""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,country_en.json,,,output.nq,,,false
-RMLTC0015b-JSON,"""Generation of language tags from a table with language information, and a term map with invalid rml:language value""","""Tests a term map with an invalid rml:language value, which is an error""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,country_en.json,,,,,,true
-RMLTC0019a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0019b-JSON,"""Generation of triples by using IRI value in columns, with data error""","""Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0020a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0021a-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map with same logical source and join condition""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0022a-JSON,"""Generating of triples with constant datatype""","""Test triples with a fixed constant datatype""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0022b-JSON,"""Generating of triples with datatypeMap""","""Test triples with a XSD datatype generated from the data""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0022c-JSON,"""Generating of triples with datatypeMap with custom datatype""","""Test triples with a custom datype from the data""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0023a-JSON,"""Invalid IRI template 1""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023b-JSON,"""Invalid IRI template 2""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023c-JSON,"""Invalid IRI template 3""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023d-JSON,"""Invalid IRI template 4""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023e-JSON,"""Invalid IRI template 5""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0023f-JSON,"""Invalid IRI template 6""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0025a-JSON,"""Generation of triples with constant blank node ""","""Tests the generation of triples with a constant blank node""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0025b-JSON,"""Usage of constant term maps in combination with explicitly defined term types""","""Tests the usage of constant term maps in combination with explicitly defined term types""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0026a-JSON,"""Generation of triples from arrays""","""Tests the generation of triples from array input data structures""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0026b-JSON,"""Generation of triples from arrays with wrong reference.""","""Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array.""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,,,,true
-RMLTC0027a-JSON,"""Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs""","""Tests the generation of triples from relative IRIs using base IRI""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0027b-JSON,"""Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter""","""Tests the generation of triples from relative IRI using base IRI parameter""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0027c-JSON,"""Two triples maps, both with rml:baseIRI defined""","""Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0027d-JSON,"""Two triples maps,both with rml:bseIRI defined overwritten by baseIRI parameter""","""Tests the generation of triples by with base IRIs different than the base IRI parameter""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0028a-JSON,"""Generation of triples using the URI term type""","""Tests the generation of triples with a URI term type in the subject or object""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0028b-JSON,"""Generation of triples using the UnsafeURI term type""","""Tests the generation of triples with a UnsafeURI term type in the subject or object""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0028c-JSON,"""Generation of triples using the UnsafeIRI term type""","""Tests the generation of triples with a UnsafeIRI term type in the subject or object""",http://w3id.org/rml/core/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+ID,title,description,specification,base_iri,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error
+RMLTC0000-JSON,"""one table, one column, zero rows""","""Tests if an empty table produces an empty RDF graph""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0001a-JSON,"""One column mapping, subject URI generation by using rml:template""","""Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0001b-JSON,"""One column mapping, generation of a BlankNode subject by using rml:termType""","""Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0002a-JSON,"""Two columns mapping, generation of a subject URI by the concatenation of two column values""","""Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0002b-JSON,"""Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType""","""Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0002e-JSON,"""Two columns mapping, an undefined rml:path""","""Tests the presence of an undefined rml:path""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0002g-JSON,"""Two columns mapping, invalid JSONPath""","""Test the presence of an invalid JSONPath""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0003c-JSON,"""Three columns mapping, by using a rml:template to produce literal""","""Tests: (1) three column mapping; and (2) the use of rml:template to produce literal""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0004a-JSON,"""Two column mapping, from one row table to two different triples""","""Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student_sport.json,,,output.nq,,,false
+RMLTC0004b-JSON,"""One column mapping, presence of rml:termType rml:Literal on rml:subjectMap""","""Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0005a-JSON,"""Typing of resources""","""Tests the typing of resources""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,ious.json,,,output.nq,,,false
+RMLTC0006a-JSON,"""Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""","""Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007a-JSON,"""Typing resources by relying on rdf:type predicate""","""Tests the typing resources by relying on rdf:type predicate""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007b-JSON,"""Assigning triples to Named Graphs""","""Tests the generation of triples to a named graph""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007c-JSON,"""One row mapping, using rml:class""","""Tests subjectmap with more than one class IRIs, rml:class""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007d-JSON,"""One column mapping, specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007e-JSON,"""One column mapping, using rml:graphMap and rml:class""","""Tests subjectmap with rml:graphMap and rml:class""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007f-JSON,"""One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007g-JSON,"""Assigning triples to the default graph""","""Tests the generation of triples to the default graph""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007h-JSON,"""Assigning triples to a non-IRI named graph""","""Tests the generation of triples to a non-IRI named graph, which is an error""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0008a-JSON,"""Generation of triples to a target graph by using rml:graphMap and rml:template""","""Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0008b-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map without join""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0008c-JSON,"""Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""","""Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0009a-JSON,"""Generation of triples from foreign key relations""","""Test foreign key relationships among logical tables""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false
+RMLTC0009b-JSON,"""Generation of triples to multiple graphs""","""Test that results from distinct parts of the mapping can be directed to different target graphs.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false
+RMLTC0010a-JSON,"""Template with table column with blank space""","""Tests a template with blank space in column value""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
+RMLTC0010b-JSON,"""Template with table columns with special chars""","""Tests a template with special chars in column value""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
+RMLTC0010c-JSON,"""Template with table columns with special chars and backslashes""","""Tests a template with special chars in reference value and backslash escapes in string templates""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
+RMLTC0011b-JSON,"""M to M relation, by using an additional Triples Map""","""Tests, M to M relations, by using an additional Triples Map""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,application/json,application/json,application/n-quads,,,student.json,sport.json,student_sport.json,output.nq,,,false
+RMLTC0012a-JSON,"""Blank node referencing multiple columns""","""Tests that blank nodes can be generated by referencing multiple columns""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0012b-JSON,"""Duplicate tuples generate same blank node""","""Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,lives.json,persons.json,,output.nq,,,false
+RMLTC0012c-JSON,"""TriplesMap without subjectMap""","""Tests a RML with missing information, TriplesMap without subjectMap.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
+RMLTC0012d-JSON,"""TriplesMap with two subjectMap""","""Tests a RML with wrong information, TriplesMap with two subjectMap.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
+RMLTC0013a-JSON,"""Null value in JSON file""","""Tests if null values in JSON files are handled correctly.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0015a-JSON,"""Generation of language tags from a table with language information""","""Generation of language tags from a table with language information""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_es.json,,,output.nq,,,false
+RMLTC0015b-JSON,"""Generation of language tags from a table with language information, and a term map with invalid rml:language value""","""Tests a term map with an invalid rml:language value, which is an error""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,country_es.json,,,,,,true
+RMLTC0019a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0019b-JSON,"""Generation of triples by using IRI value in columns, with data error""","""Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
+RMLTC0020a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0021a-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map with same logical source and join condition""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0022a-JSON,"""Generating of triples with constant datatype""","""Test triples with a fixed constant datatype""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0022b-JSON,"""Generating of triples with datatypeMap""","""Test triples with a XSD datatype generated from the data""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0022c-JSON,"""Generating of triples with datatypeMap with custom datatype""","""Test triples with a custom datype from the data""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0023a-JSON,"""Invalid IRI template 1""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023b-JSON,"""Invalid IRI template 2""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023c-JSON,"""Invalid IRI template 3""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023d-JSON,"""Invalid IRI template 4""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023e-JSON,"""Invalid IRI template 5""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023f-JSON,"""Invalid IRI template 6""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023g-JSON,"""Valid IRI template with backslash-escape""","""Test handling of a valid IRI template using backslash-escape""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0024a-JSON,"""Usage of constant term maps in combination with explicitly defined term types""","""Tests the usage of constant term maps in combination with explicitly defined term types""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0025a-JSON,"""Generation of triples from arrays""","""Tests the generation of triples from array input data structures""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0025b-JSON,"""Generation of triples from arrays with wrong reference""","""Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
+RMLTC0025c-JSON,"""Generation of triples from arrays in subject and object""","""Tests the generation of triples from array input data structures in subject and object""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0026a-JSON,"""Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs""","""Tests the generation of triples from relative IRIs using base IRI""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0026b-JSON,"""Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter""","""Tests the generation of triples from relative IRI using base IRI parameter""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0026c-JSON,"""Two triples maps, both with rml:baseIRI defined""","""Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0026d-JSON,"""Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined""","""Tests the generation of triples by with base IRIs different than the base IRI parameter""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0027a-JSON,"""Generation of triples using the URI term type""","""Tests the generation of triples with a URI term type in the subject or object""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0027b-JSON,"""Generation of triples using the UnsafeURI term type""","""Tests the generation of triples with a UnsafeURI term type in the subject or object""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0027c-JSON,"""Generation of triples using the UnsafeIRI term type""","""Tests the generation of triples with a UnsafeIRI term type in the subject or object""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0028a-JSON,"""Generation of the right datatype for a constant in the mapping""","""Test the honoring of the datatype specified by the constant term in the mapping""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0028b-JSON,"""Generation of all named graphs when rml:defaultGraph is involved""","""Test if the default graph is also generated correctly.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0028c-JSON,"""Generation of the right language tag for a constant in the mapping""","""Test the honoring of the language tag specified by the constant term in the mapping""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
diff --git a/src/test/resources/rml-fnml/README.md b/src/test/resources/rml-fnml/README.md
index 755eeb73..1f7ff703 100644
--- a/src/test/resources/rml-fnml/README.md
+++ b/src/test/resources/rml-fnml/README.md
@@ -1,59 +1,38 @@
-# FNML Test Cases
-
-Each test case is within a subfolder of this folder.
-
-If no output.nq file is present, an error is expected.
-
-All function descriptions are locally available under [functions.ttl](./functions.ttl).
-
-Some test cases are under discussion, proposed alternatives are noted via a suffix `b`.
-
-## Functions that are used in these test cases
-
-`@prefix idlab-fn:  .`
-`@prefix grel:  .`
-
-## Open issues for which there are no test cases
-
-|                              title                              |                                                                  purpose                                                                 |
-|:---------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------:|
-| Function on object, 1 constant parameter                        | Tests if a constant parameter can be used                                                                                                |
-| Function on object, wrong type parameter                        | Tests a function with a wrong type parameter cannot be used                                                                              |
-| Function on object returns null                                 | Tests that no triple should be generated when the result is null.                                                                        |
-| Function on object returns empty string                         | Tests that a triple is generated when the results is an empty string.                                                                    |
-| Function on object, the output termType is Literal              | Tests if the output of the function is assigned the correct termType                                                                     |
-| Function on subject returns invalid IRI                         | Tests that no triples are generated for a subject that gets an invalid IRI as the result from a function.                                |
-| Function on predicate returns invalid IRI                       | Tests that no triples are generated for a predicate that gets an invalid IRI as the result from a function.                              |
-| Nested function - Test B                                        | Tests if a composite function of form f(g(x1),h(x2)) works (i.e., two different inner functions are the arguments of the outer function) |
-| Nested function - Test C                                        | Tests if a composite function of form f(g(h(x1),x2),x3) works (i.e., the inner function is also a composite function)                    |
-| Function on graph, 1 parameter                                  | Tests if a function can be used on a graph                                                                                               |
-| Function on languageMap                                         | Tests that function on LanguageMap is handled                                                                                            |
-| Function on graph returns invalid IRI                           | Tests that no triples are generated for a graph that gets an invalid IRI as the result from a function.                                  |
-| Function using non-constant shortcut property function          | Tests that a non-constant FNML Function map also works                                                                                   |
-| Function using non-constant shortcut property return            | Tests that a non-constant FNML Return map also works                                                                                     |
-| Function as equal join condition                                | Tests that functions can be used similar to R2RML (equal) join conditions                                                                |
-| Function as other type of join condition                        | Tests that functions can be used for other types of join conditions (eg. string_contains or listContainsElement)                         |
-| Function, parameter as array                                    | Tests that list-style parameters are handled                                                                                             |
-| Function, array_get                                             | Tests that list-style of returned data values are handled correctly by FnO                                                               |
-
-## Table
-
-| new_id |                              title                              |                                                            purpose                                                            | data format | error expected? |    input file 1   |
-|:------:|:---------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------:|:-----------:|:---------------:|:-----------------:|
-| 0000   | Function on object, 0 parameters                                | Tests (1) if a function without parameters can be used (FnO) (2) if a function on an object map can be used (Term)            | CSV         |      FALSE      | student.csv       |
-| 0000b  | Function on object, 0 parameters (replaces 0000)                | Tests (1) if a function without parameters can be used (FnO) (2) if a function on an object map can be used (Term)            | CSV         |      FALSE      | student.csv       |
-| 0000   | Function on object, default termType                            | Tests if the output of the function is assigned the correct termType by default                                               |             |                 |                   |
-| 0001   | Function on object, 1 reference parameter                       | Tests: (1) if a function with one parameter can be used, (FnO) (2) a reference parameter can be used (Term)                   | CSV         |      FALSE      | student.csv       |
-| 0001   | Function using non-constant shortcut property parameter         | Tests that a non-constant FNML Parameter map also works                                                                       | CSV         |      FALSE      | student_param.csv |
-| 0002   | Function on object, 1 false reference parameter                 | Tests if a false reference parameters is caught                                                                               | CSV         |       TRUE      | student.csv       |
-| 0003   | Function on object, 1 reference parameter, 1 constant parameter | Tests if a function with multiple parameters can be used                                                                      | CSV         |      FALSE      | student.csv       |
-| 0004   | Function on predicate, 1 parameter                              | Tests if a function can be used on a predicate                                                                                | CSV         |      FALSE      | student.csv       |
-| 0004b  | Function on predicate, 1 parameter (replaces 0004)              | Tests if a function can be used on a predicate                                                                                | CSV         |      FALSE      | student.csv       |
-| 0005   | Function on subject, 1 parameter                                | Tests if a function can be used on a subject                                                                                  | CSV         |      FALSE      | student.csv       |
-| 0005   | Function on subject, default termType                           | Tests if the default termType assigned to the output of the function to be correct                                            |             |                 |                   |
-| 0005b  | Function on subject, default termType (replaces 0005)           | Tests if the default termType assigned to the output of the function to be correct                                            |             |                 |                   |
-| 0006   | Function on object, the output termType is IRI                  | Tests if the output of the function is assigned the correct termType                                                          |             |                 |                   |
-| 0006b  | Function on object, the output termType is IRI (replaces 0006)  | Tests if the output of the function is assigned the correct termType                                                          |             |                 |                   |
-| 0008   | Function on object, 1 template parameter                        | Tests if a function with a template parameter can be used                                                                     | CSV         |      FALSE      | student.csv       |
-| 0009   | Nested function - Test A                                        | Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function) | CSV         |      FALSE      | student.csv       |
-| 0010   | Function on object, specified return output                     | Tests if a specific return output can be used                                                                     | CSV         |       TRUE      | student.csv       |
+# FNML Test Cases
+
+Each test case is within a subfolder of this folder.
+
+If no output.nq file is present, an error is expected.
+
+All function descriptions are locally available under [functions.ttl](./functions.ttl).
+
+A nicely rendered HTML page of all test cases is available at https://w3id.org/rml/fnml/test-cases.
+
+## Functions that are used in these test cases
+
+`@prefix idlab-fn:  .`
+`@prefix grel:  .`
+
+## Updating the metadata
+
+The test cases publication (html pages) can be generated as followed:
+
+1. Add the testcase description in `descriptions.csv` or fetch it from the [Google spreadsheet](https://docs.google.com/spreadsheets/d/1Ui216z2cF8bNAbdZvws-JoAhcjj4M2k_NlfzmCh1jh8/edit?gid=1793408313#gid=1793408313).
+2. Execute the `make-metadata.py` script: `./make-metadata.py http://w3id.org/rml/fnml/`
+   (This is based on the content of the folders with the test cases, and on the file descriptions.csv for the descriptions of the cases)
+3. Download burp: `curl -LO https://github.com/kg-construct/BURP/releases/download/v0.1.1/burp.jar`
+4. Generate the manifest with [Burp](https://github.com/kg-construct/BURP): `java -jar burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/fnml/test/`
+5. Run list.sh and insert output in dev.html
+6. Set the `prevVersion` in config.js
+7. To publish the new HTML verson of the test cases, export `dev.html` as `index.html` in ./docs and in a subfolder with the date of the publication (maybe adapt the publication date)
+
+## Open issues for which there are no test cases
+
+| title | purpose |
+| - | - |
+| Function on object, default termType | Tests if the default termType assigned to the output of the function in an object position to be correct |
+| Function on subject, default termType | Tests if the default termType assigned to the output of the function in a subject position to be correct |
+| Function using non-constant shortcut property function | Tests that a non-constant FNML Function map also works |
+| Function using non-constant shortcut property return | Tests that a non-constant FNML Return map also works |
+| Nested function - Test B | Tests if a composite function of form f(g(x1),h(x2)) works (i.e., two different inner functions are the arguments of the outer function) |
+| Nested function - Test C | Tests if a composite function of form f(g(h(x1),x2),x3) works (i.e., the inner function is also a composite function) |
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl
index 5a332b53..ff9e9cc6 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/mapping.ttl
@@ -1,30 +1,30 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix idlab-fn:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:return idlab-fn:_stringOut
-        ]
-    ] .
-
-<#Execution>
-    rml:function idlab-fn:random .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:random .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/output.nq
index 1ef0cd69..a76f6853 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/output.nq
@@ -1 +1 @@
-  "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" .
+  "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/student.csv
index 052b9915..cb323e96 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0001-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class
-1,Venus,A&B,A
+Id,Name,Comment,Class
+1,Venus,A&B,A
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl
index c789f59c..381bac4d 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/mapping.ttl
@@ -1,37 +1,37 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:return grel:stringOut
-        ]
-    ] .
-
-<#Execution>
-    rml:function grel:toUpperCase ;
-    rml:input
-        [
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:reference "Name" ;
-            ]
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/output.nq
index b0369690..d7e35a25 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/output.nq
@@ -1 +1 @@
-  "VENUS" .
+  "VENUS" .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/student.csv
index 052b9915..cb323e96 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0002-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class
-1,Venus,A&B,A
+Id,Name,Comment,Class
+1,Venus,A&B,A
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl
index ecd4845c..a5538774 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/mapping.ttl
@@ -1,39 +1,39 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-@prefix idlab-fn:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:return idlab-fn:_stringOut ;
-            rml:termType rml:IRI
-        ];
-    ] .
-
-<#Execution>
-    rml:function idlab-fn:toUpperCaseURL ;
-    rml:input
-        [
-            rml:parameter idlab-fn:str ;
-            rml:inputValueMap [
-                rml:reference "url"
-            ];
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut ;
+            rml:termType rml:IRI
+        ];
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/output.nq
index 5556ec5d..617e154d 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/output.nq
@@ -1 +1 @@
-   .
+   .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/student.csv
index 5c20b3cd..97c6fdd2 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0003-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class,url
-1,Venus,A&B,A,http://example.com/venus
+Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl
index 9126464c..91cca314 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/mapping.ttl
@@ -1,37 +1,37 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:return grel:stringOut
-        ]
-    ] .
-
-<#Execution>
-    rml:function grel:toUpperCase ;
-    rml:input
-        [
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:template "Name: {Name}" ;
-            ];
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:template "Name: {Name}" ;
+            ];
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/output.nq
index 9020be0f..dc75d983 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/output.nq
@@ -1 +1 @@
-  "NAME: VENUS" .
+  "NAME: VENUS" .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/student.csv
index 052b9915..cb323e96 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0005-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class
-1,Venus,A&B,A
+Id,Name,Comment,Class
+1,Venus,A&B,A
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl
index 14959d45..79e7738a 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/mapping.ttl
@@ -1,38 +1,38 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-@prefix idlab-fn:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicateMap [
-            rml:functionExecution <#Execution> ;
-            rml:return idlab-fn:_stringOut
-        ];
-        rml:object foaf:name;
-    ] .
-
-<#Execution>
-    rml:function idlab-fn:toUpperCaseURL ;
-    rml:input
-        [
-            rml:parameter idlab-fn:str ;
-            rml:inputValueMap [
-                rml:reference "Name"
-            ];
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicateMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ];
+        rml:object foaf:name;
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/output.nq
index 4aa4759e..42101211 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/output.nq
@@ -1 +1 @@
-   .
+   .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/student.csv
index 052b9915..cb323e96 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0011-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class
-1,Venus,A&B,A
+Id,Name,Comment,Class
+1,Venus,A&B,A
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl
index 3109d708..63b9668c 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/mapping.ttl
@@ -1,41 +1,41 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:return grel:stringOut
-        ]
-    ] .
-
-<#Execution>
-    rml:function grel:escape ;
-    rml:input
-        [
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:reference "Comment"
-            ]
-        ] ,
-        [
-            rml:parameter grel:modeParam  ;
-            rml:inputValue "html"
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:escape ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Comment"
+            ]
+        ] ,
+        [
+            rml:parameter grel:modeParam  ;
+            rml:inputValue "html"
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/output.nq
index af03220c..a51e1c4d 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/output.nq
@@ -1 +1 @@
-  "A&B" .
+  "A&B" .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/student.csv
index 052b9915..cb323e96 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0021-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class
-1,Venus,A&B,A
+Id,Name,Comment,Class
+1,Venus,A&B,A
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl
index dc069b98..20cedd9b 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/mapping.ttl
@@ -1,36 +1,36 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-@prefix idlab-fn:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:functionExecution <#Execution> ;
-        rml:return idlab-fn:_stringOut
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [ rml:reference "Name"]
-    ] .
-
-<#Execution>
-    rml:function idlab-fn:toUpperCaseURL ;
-    rml:input
-        [
-            rml:parameter idlab-fn:str ;
-            rml:inputValueMap [
-                rml:reference "url"
-            ];
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return idlab-fn:_stringOut
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [ rml:reference "Name"]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/output.nq
index 80493637..43ceda18 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/output.nq
@@ -1 +1 @@
-  "Venus" .
+  "Venus" .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/student.csv
index c33048c8..ec727877 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0031-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,url
-1,Venus,www.example.com
+Id,Name,url
+1,Venus,www.example.com
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/README.md
new file mode 100644
index 00000000..69a77e10
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/README.md
@@ -0,0 +1,70 @@
+## RMLFNMLTC0032-CSV
+
+**Title**: Condition on subject
+
+**Description**: Tests that a condition shortcut works
+
+**Error expected?** No
+
+**Input**
+```
+Id,Name,Class
+1,Venus,A
+1,Serena,B
+
+```
+
+**Mapping**
+```
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ] ;
+    rml:subjectMap [
+        rml:condition [
+            rml:functionExecution [
+                rml:function idlab-fn:equal ;
+                rml:input [
+                    rml:parameter grel:valueParam ;
+                    rml:inputValueMap [
+                        rml:reference "Class"
+                    ]
+                ] , [
+                    rml:parameter grel:valueParam2 ;
+                    rml:inputValue "A" ;
+                ] ;
+            ] ;
+            rml:return idlab-fn:_boolOut ;
+        ] ;
+        rml:template "http://example.com/{Name}" ;
+    ] ;
+    rml:predicateObjectMap [
+        rml:predicate foaf:name ;
+        rml:objectMap [
+            rml:reference "Name" ;
+        ] ;
+    ] ;
+.
+
+```
+
+**Output**
+```
+  "Venus" .
+
+```
+
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/mapping.ttl
new file mode 100644
index 00000000..8c482d13
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/mapping.ttl
@@ -0,0 +1,43 @@
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ] ;
+    rml:subjectMap [
+        rml:condition [
+            rml:functionExecution [
+                rml:function idlab-fn:equal ;
+                rml:input [
+                    rml:parameter grel:valueParam ;
+                    rml:inputValueMap [
+                        rml:reference "Class"
+                    ]
+                ] , [
+                    rml:parameter grel:valueParam2 ;
+                    rml:inputValue "A" ;
+                ] ;
+            ] ;
+            rml:return idlab-fn:_boolOut ;
+        ] ;
+        rml:template "http://example.com/{Name}" ;
+    ] ;
+    rml:predicateObjectMap [
+        rml:predicate foaf:name ;
+        rml:objectMap [
+            rml:reference "Name" ;
+        ] ;
+    ] ;
+.
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/output.nq
new file mode 100644
index 00000000..efbb5543
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/output.nq
@@ -0,0 +1 @@
+  "Venus" .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/student.csv
new file mode 100644
index 00000000..01546404
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0032-CSV/student.csv
@@ -0,0 +1,3 @@
+Id,Name,Class
+1,Venus,A
+1,Serena,B
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/README.md
index e3fa3297..0fd04319 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/README.md
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/README.md
@@ -59,7 +59,7 @@ Id,Name,Comment,Class,url
 
 **Output**
 ```
-  "example.com" .
+  "VENUS" .
 
 ```
 
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl
index 99b26995..3669cab8 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/mapping.ttl
@@ -1,39 +1,39 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:returnMap [
-                rml:constant grel:stringOut
-            ]
-        ]
-    ] .
-
-<#Execution>
-    rml:function grel:toUpperCase ;
-    rml:input
-        [
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:reference "Name" ;
-            ]
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:returnMap [
+                rml:constant grel:stringOut
+            ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/output.nq
index 3c0e8a74..d7e35a25 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/output.nq
@@ -1 +1 @@
-  "example.com" .
+  "VENUS" .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/student.csv
index 5c20b3cd..97c6fdd2 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0041-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class,url
-1,Venus,A&B,A,http://example.com/venus
+Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl
index 23d0cf4f..d23fd4d4 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/mapping.ttl
@@ -1,62 +1,62 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-@prefix idlab-fn:  .
-
-@base  .
-
-<#Person_Mapping>
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap <#NameMapping> .
-
-<#NameMapping>
-    rml:predicate foaf:name ;
-    rml:objectMap [
-        rml:functionExecution <#Execution> ;
-        rml:return grel:stringOut
-    ]; .
-
-<#Execution> a rml:FunctionExecution ;
-    rml:function grel:toUpperCase ;
-    rml:input
-        [
-            a rml:Input ;
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:functionExecution <#Execution2> ;
-                rml:return grel:stringOut
-            ]
-        ] .
-
-<#Execution2> a rml:Execution ;
-    rml:function grel:string_replace ;
-    rml:input
-        [
-            a rml:Input ;
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:reference "Name"
-            ]
-        ] ,
-        [
-            a rml:Input ;
-            rml:parameter grel:param_find ;
-            rml:inputValue " "
-        ] ,
-        [
-            a rml:Input ;
-            rml:parameter grel:param_replace  ;
-            rml:inputValue "-"
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+<#Person_Mapping>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap <#NameMapping> .
+
+<#NameMapping>
+    rml:predicate foaf:name ;
+    rml:objectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return grel:stringOut
+    ]; .
+
+<#Execution> a rml:FunctionExecution ;
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:functionExecution <#Execution2> ;
+                rml:return grel:stringOut
+            ]
+        ] .
+
+<#Execution2> a rml:Execution ;
+    rml:function grel:string_replace ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ]
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_find ;
+            rml:inputValue " "
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_replace  ;
+            rml:inputValue "-"
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/output.nq
index c8e15963..5e4ca542 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/output.nq
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/output.nq
@@ -1 +1 @@
-  "M-VENUS" .
+  "M-VENUS" .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/student.csv
index e5f249e9..adfc7a84 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0051-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class
-1,M Venus,A&B,A
+Id,Name,Comment,Class
+1,M Venus,A&B,A
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/README.md
new file mode 100644
index 00000000..3af5a785
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/README.md
@@ -0,0 +1,72 @@
+## RMLFNMLTC0071-CSV
+
+**Title**: Function on datatypeMap, 1 parameter
+
+**Description**: Tests that function on DatatypeMap is handled
+
+**Error expected?** No
+
+**Input**
+```
+Id,Name,Comment,Class,Type
+1,Venus,A&B,A,http://www.w3.org/2001/XMLSchema#string
+
+```
+
+**Mapping**
+```
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:datatypeMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Type"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
+
+```
+
+**Output**
+```
+  "Venus"^^ .
+
+```
+
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/mapping.ttl
new file mode 100644
index 00000000..a78dcba3
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/mapping.ttl
@@ -0,0 +1,46 @@
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:datatypeMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Type"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/output.nq
new file mode 100644
index 00000000..d0740b63
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/output.nq
@@ -0,0 +1 @@
+  "Venus"^^ .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/student.csv
new file mode 100644
index 00000000..d4588918
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0071-CSV/student.csv
@@ -0,0 +1,2 @@
+Id,Name,Comment,Class,Type
+1,Venus,A&B,A,http://www.w3.org/2001/XMLSchema#string
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/README.md b/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/README.md
new file mode 100644
index 00000000..c96d4b23
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/README.md
@@ -0,0 +1,72 @@
+## RMLFNMLTC0081-CSV
+
+**Title**: Function on languageMap, 1 parameter
+
+**Description**: Tests that function on LanguageMap is handled
+
+**Error expected?** No
+
+**Input**
+```
+Id,Name,Comment,Class,Lang
+1,Venus,A&B,A,en
+
+```
+
+**Mapping**
+```
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:languageMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ] ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Lang"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
+
+```
+
+**Output**
+```
+  "Venus"@en .
+
+```
+
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/mapping.ttl
new file mode 100644
index 00000000..ef8573ad
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/mapping.ttl
@@ -0,0 +1,46 @@
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:languageMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ] ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Lang"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/output.nq b/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/output.nq
new file mode 100644
index 00000000..ec2e5497
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/output.nq
@@ -0,0 +1 @@
+  "Venus"@en .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/student.csv
new file mode 100644
index 00000000..56a4e2ad
--- /dev/null
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0081-CSV/student.csv
@@ -0,0 +1,2 @@
+Id,Name,Comment,Class,Lang
+1,Venus,A&B,A,en
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl
index 43dbe427..d7a024ea 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/mapping.ttl
@@ -1,38 +1,38 @@
-@prefix foaf:  .
-@prefix ex:  .
-@prefix xsd:  .
-@prefix rml:  .
-@prefix fno:  .
-@prefix grel:  .
-@prefix idlab-fn:  .
-
-@base  .
-
-
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:return grel:stringOut
-        ]
-    ] .
-
-<#Execution>
-    rml:function grel:toUpperCase ;
-    rml:input
-        [
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:reference "name" ;
-            ]
-        ] .
+@prefix foaf:  .
+@prefix ex:  .
+@prefix xsd:  .
+@prefix rml:  .
+@prefix fno:  .
+@prefix grel:  .
+@prefix idlab-fn:  .
+
+@base  .
+
+
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "name" ;
+            ]
+        ] .
diff --git a/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/student.csv b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/student.csv
index 052b9915..cb323e96 100644
--- a/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/student.csv
+++ b/src/test/resources/rml-fnml/RMLFNMLTC0101-CSV/student.csv
@@ -1,2 +1,2 @@
-Id,Name,Comment,Class
-1,Venus,A&B,A
+Id,Name,Comment,Class
+1,Venus,A&B,A
diff --git a/src/test/resources/rml-fnml/config.js b/src/test/resources/rml-fnml/config.js
index baeb3281..8427457d 100644
--- a/src/test/resources/rml-fnml/config.js
+++ b/src/test/resources/rml-fnml/config.js
@@ -30,6 +30,19 @@ var respecConfig = {
       company: "IDLab – Ghent University – imec",
       orcid: "0000-0002-7195-9935",
       companyURL: "https://knows.idlab.ugent.be/"
+    }, {
+      name: "Ben De Meester",
+      company: "Ghent University – imec – IDLab",
+      url: "https://ben.de-meester.org/#me",
+      orcid: "0000-0003-0248-0987",
+      companyURL: "https://knows.idlab.ugent.be/"
+    }, {
+      name: "Tobias Schweizer"
+    }, {
+      name: "Els de Vleeschauwer",
+      company: "Ghent University – imec – IDLab",
+      orcid: "0000-0002-8630-3947",
+      companyURL: "https://knows.idlab.ugent.be/"
     }
   ],
   edDraftURI: "https://w3id.org/rml/fnml/test-cases/",
@@ -40,6 +53,13 @@ var respecConfig = {
       company: "IDLab – Ghent University – imec",
       orcid: "0000-0002-7195-9935",
       companyURL: "https://knows.idlab.ugent.be/"
+    },
+    {
+      name: "Ben De Meester",
+      company: "Ghent University – imec – IDLab",
+      url: "https://ben.de-meester.org/#me",
+      orcid: "0000-0003-0248-0987",
+      companyURL: "https://knows.idlab.ugent.be/"
     }
   ],
   formerEditors: [
@@ -68,5 +88,6 @@ var respecConfig = {
   // W3C config
   copyrightStart: "2024",
   doJsonLd: true,
+  prevVersion: "https://kg-construct.github.io/rml-fnml/test-cases/docs/20250630/",
   group: "kg-construct",
 };
diff --git a/src/test/resources/rml-fnml/descriptions.csv b/src/test/resources/rml-fnml/descriptions.csv
index 0b67120c..a1915826 100644
--- a/src/test/resources/rml-fnml/descriptions.csv
+++ b/src/test/resources/rml-fnml/descriptions.csv
@@ -1,25 +1,28 @@
-ID,title,description,part of spec,data format,ref. formulation,error expected?,input file 1,input file 2,input file 3,comment
+ID,title,description,part of spec,data format,ref. formulation,error expected?,input file 1,input file 2,input file 3,comment
 RMLFNMLTC0001-CSV,"Function on object, 0 parameters","Tests
 (1) if a function without parameters can be used (FnO)
 (2) if a function on an object map can be used (Term)
-(3) if the output of the function is assigned the correct termType by default",,CSV,CSV,FALSE,student.csv,,,
+(3) if the output of the function is assigned the correct termType by default",,CSV,CSV,FALSE,student.csv,,,
 RMLFNMLTC0002-CSV,"Function on object, 1 reference parameter","Tests:
 (1) if a function with one parameter can be used, (FnO)
-(2) a reference parameter can be used (Term)",,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0003-CSV,"Function on object, 1 reference parameter, the output termType is IRI",Tests if the output of the function is assigned the correct termType,,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0004-CSV,"Function on object, the output termType is Literal",Tests if the output of the function is assigned the correct termType,,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0005-CSV,"Function on object, 1 template parameter",Tests if a function with a template parameter can be used,,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0007-CSV,Function on object returns empty string,Tests that a triple is generated when the results is an empty string.,,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0008-CSV,Function on object returns null,Tests that no triple should be generated when the result is null.,,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0011-CSV,"Function on predicate, 1 parameter",Tests if a function can be used on a predicate,,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0021-CSV,"Function on object, 1 reference parameter, 1 constant parameter",Tests if a function with multiple parameters can be used,,CSV,CSV,FALSE,student.csv,,,
+(2) a reference parameter can be used (Term)",,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0003-CSV,"Function on object, 1 reference parameter, the output termType is IRI",Tests if the output of the function is assigned the correct termType,,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0004-CSV,"Function on object, the output termType is Literal",Tests if the output of the function is assigned the correct termType,,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0005-CSV,"Function on object, 1 template parameter",Tests if a function with a template parameter can be used,,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0007-CSV,Function on object returns empty string,Tests that a triple is generated when the results is an empty string.,,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0008-CSV,Function on object returns null,Tests that no triple should be generated when the result is null.,,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0011-CSV,"Function on predicate, 1 parameter",Tests if a function can be used on a predicate,,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0021-CSV,"Function on object, 1 reference parameter, 1 constant parameter",Tests if a function with multiple parameters can be used,,CSV,CSV,FALSE,student.csv,,,
 RMLFNMLTC0031-CSV,"Function on subject, 1 parameter","Tests if 
 (1) a function can be used on a subject
-(2) Tests if the default termType assigned to the output of the function to be correct",,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0041-CSV,Function using non-constant shortcut property return,Tests that a non-constant FNML Return map also works,,CSV,CSV,FALSE,student.csv,,,"does this can be tested with SHACL? If yes, I think this wouldn't be a test-case"
-RMLFNMLTC0051-CSV,Nested function - Test A,"Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)",,CSV,CSV,FALSE,student.csv,,,
-RMLFNMLTC0061-CSV,"Function on graph, 1 parameter",Tests if a function can be used on a graph,,CSV,CSV,FALSE,student.csv,,,RML example: https://kg-construct.github.io/rml-core/spec/docs/#example-graph-map
-RMLFNMLTC0101-CSV,"Function on object, 1 false reference parameter",Tests if a false reference parameters is caught,,CSV,CSV,TRUE,student.csv,,,
-RMLFNMLTC0102-CSV,"Function on object, wrong function URI",Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine,,CSV,CSV,TRUE,student.csv,,,
-RMLFNMLTC0103-CSV,"Function on object, wrong parameter",Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description,,CSV,CSV,TRUE,student.csv,,,
+(2) Tests if the default termType assigned to the output of the function to be correct",,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0032-CSV,Condition on subject,Tests that a condition shortcut works,,,,,,,,
+RMLFNMLTC0041-CSV,Function using non-constant shortcut property return,Tests that a non-constant FNML Return map also works,,CSV,CSV,FALSE,student.csv,,,"does this can be tested with SHACL? If yes, I think this wouldn't be a test-case"
+RMLFNMLTC0051-CSV,Nested function - Test A,"Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)",,CSV,CSV,FALSE,student.csv,,,
+RMLFNMLTC0061-CSV,"Function on graph, 1 parameter",Tests if a function can be used on a graph,,CSV,CSV,FALSE,student.csv,,,RML example: https://kg-construct.github.io/rml-core/spec/docs/#example-graph-map
+RMLFNMLTC0071-CSV,"Function on datatypeMap, 1 parameter",Tests that function on DatatypeMap is handled,,CSV,CSV,FALSE,student.csv,,,RML example: https://kg-construct.github.io/rml-core/spec/docs/#example-datatype-map
+RMLFNMLTC0081-CSV,"Function on languageMap, 1 parameter",Tests that function on LanguageMap is handled,,CSV,CSV,FALSE,student.csv,,,RML example: https://kg-construct.github.io/rml-core/spec/docs/#example-language-map
+RMLFNMLTC0101-CSV,"Function on object, 1 false reference parameter",Tests if a false reference parameters is caught,,CSV,CSV,TRUE,student.csv,,,
+RMLFNMLTC0102-CSV,"Function on object, wrong function URI",Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine,,CSV,CSV,TRUE,student.csv,,,
+RMLFNMLTC0103-CSV,"Function on object, wrong parameter",Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description,,CSV,CSV,TRUE,student.csv,,,
 RMLFNMLTC0104-CSV,"Function on object, wrong return parameter",Tests that nothing is generated if a function is defined using a return not defined in the FnO description,,CSV,CSV,TRUE,student.csv,,,
\ No newline at end of file
diff --git a/src/test/resources/rml-fnml/dev.html b/src/test/resources/rml-fnml/dev.html
index e1391e96..1b2422a4 100644
--- a/src/test/resources/rml-fnml/dev.html
+++ b/src/test/resources/rml-fnml/dev.html
@@ -104,9 +104,12 @@
 
+
+
+
diff --git a/src/test/resources/rml-fnml/docs/20250630/index.html b/src/test/resources/rml-fnml/docs/20250630/index.html new file mode 100644 index 00000000..67b08896 --- /dev/null +++ b/src/test/resources/rml-fnml/docs/20250630/index.html @@ -0,0 +1,1768 @@ + + + + + + +RML-FNML: Test Cases + + + + + + + + + + + + + + + +
+ +

RML-FNML: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-FNML-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/fnml/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-fnml + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-FNML test cases to the determine the RML-FNML specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-FNML test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-FNML specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-FNML test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLFNMLTC0001-CSV

+

Title: Function on object, 0 parameters

+

Description: Tests +(1) if a function without parameters can be used (FnO) +(2) if a function on an object map can be used (Term) +(3) if the output of the function is assigned the correct termType by default

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:random .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" .
+
+
+

5. RMLFNMLTC0002-CSV

+

Title: Function on object, 1 reference parameter

+

Description: Tests: +(1) if a function with one parameter can be used, (FnO) +(2) a reference parameter can be used (Term)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "VENUS" .
+
+
+

6. RMLFNMLTC0003-CSV

+

Title: Function on object, 1 reference parameter, the output termType is IRI

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut ;
+            rml:termType rml:IRI
+        ];
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

7. RMLFNMLTC0004-CSV

+

Title: Function on object, the output termType is Literal

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:length ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "5"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLFNMLTC0005-CSV

+

Title: Function on object, 1 template parameter

+

Description: Tests if a function with a template parameter can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:template "Name: {Name}" ;
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "NAME: VENUS" .
+
+
+

9. RMLFNMLTC0007-CSV

+

Title: Function on object returns empty string

+

Description: Tests that a triple is generated when the results is an empty string.

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "5"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "" .
+
+
+

10. RMLFNMLTC0008-CSV

+

Title: Function on object returns null

+

Description: Tests that no triple should be generated when the result is null.

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "1000"
+        ]  .
+
+

Output

+

+
+
+

11. RMLFNMLTC0011-CSV

+

Title: Function on predicate, 1 parameter

+

Description: Tests if a function can be used on a predicate

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicateMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ];
+        rml:object foaf:name;
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://VENUS> <http://xmlns.com/foaf/0.1/name> .
+
+
+

12. RMLFNMLTC0021-CSV

+

Title: Function on object, 1 reference parameter, 1 constant parameter

+

Description: Tests if a function with multiple parameters can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:escape ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Comment"
+            ]
+        ] ,
+        [
+            rml:parameter grel:modeParam  ;
+            rml:inputValue "html"
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "A&B" .
+
+
+

13. RMLFNMLTC0031-CSV

+

Title: Function on subject, 1 parameter

+

Description: Tests if +(1) a function can be used on a subject +(2) Tests if the default termType assigned to the output of the function to be correct

+

Error expected? No

+

Input

+
Id,Name,url
+1,Venus,www.example.com
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return idlab-fn:_stringOut
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [ rml:reference "Name"]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://WWW.EXAMPLE.COM> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

14. RMLFNMLTC0041-CSV

+

Title: Function using non-constant shortcut property return

+

Description: Tests that a non-constant FNML Return map also works

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:returnMap [
+                rml:constant grel:stringOut
+            ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "VENUS" .
+
+
+

15. RMLFNMLTC0051-CSV

+

Title: Nested function - Test A

+

Description: Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,M Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<#Person_Mapping>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap <#NameMapping> .
+
+<#NameMapping>
+    rml:predicate foaf:name ;
+    rml:objectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return grel:stringOut
+    ]; .
+
+<#Execution> a rml:FunctionExecution ;
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:functionExecution <#Execution2> ;
+                rml:return grel:stringOut
+            ]
+        ] .
+
+<#Execution2> a rml:Execution ;
+    rml:function grel:string_replace ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ]
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_find ;
+            rml:inputValue " "
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_replace  ;
+            rml:inputValue "-"
+        ] .
+
+

Output

+
<http://example.com/M%20Venus> <http://xmlns.com/foaf/0.1/name> "M-VENUS" .
+
+
+

16. RMLFNMLTC0061-CSV

+

Title: Function on graph, 1 parameter

+

Description: Tests if a function can be used on a graph

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}" ;
+        rml:graphMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+            
+        ]
+    ];
+
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:reference "Name"
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

17. RMLFNMLTC0071-CSV

+

Title: Function on datatypeMap, 1 parameter

+

Description: Tests that function on DatatypeMap is handled

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,Type
+1,Venus,A&B,A,http://www.w3.org/2001/XMLSchema#string
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:datatypeMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Type"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+
+
+

18. RMLFNMLTC0081-CSV

+

Title: Function on languageMap, 1 parameter

+

Description: Tests that function on LanguageMap is handled

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,Lang
+1,Venus,A&B,A,en
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:languageMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ] ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Lang"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"@en .
+
+
+

19. RMLFNMLTC0101-CSV

+

Title: Function on object, 1 false reference parameter

+

Description: Tests if a false reference parameters is caught

+

Error expected? Yes

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "name" ;
+            ]
+        ] .
+
+
+

20. RMLFNMLTC0102-CSV

+

Title: Function on object, wrong function URI

+

Description: Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:unknown_func ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+

21. RMLFNMLTC0103-CSV

+

Title: Function on object, wrong parameter

+

Description: Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:unknownParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+

22. RMLFNMLTC0104-CSV

+

Title: Function on object, wrong return parameter

+

Description: Tests that nothing is generated if a function is defined using a return not defined in the FnO description

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:unknownOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-fnml/docs/20250806/index.html b/src/test/resources/rml-fnml/docs/20250806/index.html new file mode 100644 index 00000000..f939ec5c --- /dev/null +++ b/src/test/resources/rml-fnml/docs/20250806/index.html @@ -0,0 +1,1865 @@ + + + + + + +RML-FNML: Test Cases + + + + + + + + + + + + + + + + + + + +

Abstract

This document defines the RML-FNML test cases to the determine the RML-FNML specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-FNML test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-FNML specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-FNML test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLFNMLTC0001-CSV

+

Title: Function on object, 0 parameters

+

Description: Tests +(1) if a function without parameters can be used (FnO) +(2) if a function on an object map can be used (Term) +(3) if the output of the function is assigned the correct termType by default

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:random .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "e4dcc7ee-8e2a-4012-92cc-9a74dd545e89" .
+
+
+

5. RMLFNMLTC0002-CSV

+

Title: Function on object, 1 reference parameter

+

Description: Tests: +(1) if a function with one parameter can be used, (FnO) +(2) a reference parameter can be used (Term)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "VENUS" .
+
+
+

6. RMLFNMLTC0003-CSV

+

Title: Function on object, 1 reference parameter, the output termType is IRI

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut ;
+            rml:termType rml:IRI
+        ];
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

7. RMLFNMLTC0004-CSV

+

Title: Function on object, the output termType is Literal

+

Description: Tests if the output of the function is assigned the correct termType

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:length ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "5"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLFNMLTC0005-CSV

+

Title: Function on object, 1 template parameter

+

Description: Tests if a function with a template parameter can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:template "Name: {Name}" ;
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "NAME: VENUS" .
+
+
+

9. RMLFNMLTC0007-CSV

+

Title: Function on object returns empty string

+

Description: Tests that a triple is generated when the results is an empty string.

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "5"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "" .
+
+
+

10. RMLFNMLTC0008-CSV

+

Title: Function on object returns null

+

Description: Tests that no triple should be generated when the result is null.

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "1000"
+        ]  .
+
+

Output

+

+
+
+

11. RMLFNMLTC0011-CSV

+

Title: Function on predicate, 1 parameter

+

Description: Tests if a function can be used on a predicate

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicateMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+        ];
+        rml:object foaf:name;
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://VENUS> <http://xmlns.com/foaf/0.1/name> .
+
+
+

12. RMLFNMLTC0021-CSV

+

Title: Function on object, 1 reference parameter, 1 constant parameter

+

Description: Tests if a function with multiple parameters can be used

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:escape ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Comment"
+            ]
+        ] ,
+        [
+            rml:parameter grel:modeParam  ;
+            rml:inputValue "html"
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "A&B" .
+
+
+

13. RMLFNMLTC0031-CSV

+

Title: Function on subject, 1 parameter

+

Description: Tests if +(1) a function can be used on a subject +(2) Tests if the default termType assigned to the output of the function to be correct

+

Error expected? No

+

Input

+
Id,Name,url
+1,Venus,www.example.com
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return idlab-fn:_stringOut
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [ rml:reference "Name"]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url"
+            ];
+        ] .
+
+

Output

+
<http://WWW.EXAMPLE.COM> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

14. RMLFNMLTC0032-CSV

+

Title: Condition on subject

+

Description: Tests that a condition shortcut works

+

Error expected? No

+

Input

+
Id,Name,Class
+1,Venus,A
+1,Serena,B
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ] ;
+    rml:subjectMap [
+        rml:condition [
+            rml:functionExecution [
+                rml:function idlab-fn:equal ;
+                rml:input [
+                    rml:parameter grel:valueParam ;
+                    rml:inputValueMap [
+                        rml:reference "Class"
+                    ]
+                ] , [
+                    rml:parameter grel:valueParam2 ;
+                    rml:inputValue "A" ;
+                ] ;
+            ] ;
+            rml:return idlab-fn:_boolOut ;
+        ] ;
+        rml:template "http://example.com/{Name}" ;
+    ] ;
+    rml:predicateObjectMap [
+        rml:predicate foaf:name ;
+        rml:objectMap [
+            rml:reference "Name" ;
+        ] ;
+    ] ;
+.
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

15. RMLFNMLTC0041-CSV

+

Title: Function using non-constant shortcut property return

+

Description: Tests that a non-constant FNML Return map also works

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:returnMap [
+                rml:constant grel:stringOut
+            ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "VENUS" .
+
+
+

16. RMLFNMLTC0051-CSV

+

Title: Nested function - Test A

+

Description: Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,M Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<#Person_Mapping>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap <#NameMapping> .
+
+<#NameMapping>
+    rml:predicate foaf:name ;
+    rml:objectMap [
+        rml:functionExecution <#Execution> ;
+        rml:return grel:stringOut
+    ]; .
+
+<#Execution> a rml:FunctionExecution ;
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:functionExecution <#Execution2> ;
+                rml:return grel:stringOut
+            ]
+        ] .
+
+<#Execution2> a rml:Execution ;
+    rml:function grel:string_replace ;
+    rml:input
+        [
+            a rml:Input ;
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ]
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_find ;
+            rml:inputValue " "
+        ] ,
+        [
+            a rml:Input ;
+            rml:parameter grel:param_replace  ;
+            rml:inputValue "-"
+        ] .
+
+

Output

+
<http://example.com/M%20Venus> <http://xmlns.com/foaf/0.1/name> "M-VENUS" .
+
+
+

17. RMLFNMLTC0061-CSV

+

Title: Function on graph, 1 parameter

+

Description: Tests if a function can be used on a graph

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}" ;
+        rml:graphMap [
+            rml:functionExecution <#Execution> ;
+            rml:return idlab-fn:_stringOut
+            
+        ]
+    ];
+
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:reference "Name"
+        ]
+    ] .
+
+<#Execution>
+    rml:function idlab-fn:toUpperCaseURL ;
+    rml:input
+        [
+            rml:parameter idlab-fn:str ;
+            rml:inputValueMap [
+                rml:reference "url" ;
+            ]
+        ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <HTTP://EXAMPLE.COM/VENUS> .
+
+
+

18. RMLFNMLTC0071-CSV

+

Title: Function on datatypeMap, 1 parameter

+

Description: Tests that function on DatatypeMap is handled

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,Type
+1,Venus,A&B,A,http://www.w3.org/2001/XMLSchema#string
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:datatypeMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Type"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+
+
+

19. RMLFNMLTC0081-CSV

+

Title: Function on languageMap, 1 parameter

+

Description: Tests that function on LanguageMap is handled

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,Lang
+1,Venus,A&B,A,en
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:languageMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ] ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Lang"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"@en .
+
+
+

20. RMLFNMLTC0101-CSV

+

Title: Function on object, 1 false reference parameter

+

Description: Tests if a false reference parameters is caught

+

Error expected? Yes

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "name" ;
+            ]
+        ] .
+
+
+

21. RMLFNMLTC0102-CSV

+

Title: Function on object, wrong function URI

+

Description: Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine

+

Error expected? No

+

Input

+
Id,Name,Comment,Class
+1,Venus,A&B,A
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:unknown_func ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+

22. RMLFNMLTC0103-CSV

+

Title: Function on object, wrong parameter

+

Description: Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:unknownParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+

23. RMLFNMLTC0104-CSV

+

Title: Function on object, wrong return parameter

+

Description: Tests that nothing is generated if a function is defined using a return not defined in the FnO description

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,url
+1,Venus,A&B,A,http://example.com/venus
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:unknownOut
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:toUpperCase ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name" ;
+            ]
+        ] .
+
+

Output

+

+
+
+ + + + + + + \ No newline at end of file diff --git a/src/test/resources/rml-fnml/docs/index.html b/src/test/resources/rml-fnml/docs/index.html index c5504b93..f939ec5c 100644 --- a/src/test/resources/rml-fnml/docs/index.html +++ b/src/test/resources/rml-fnml/docs/index.html @@ -1,6 +1,6 @@ - + - + + + + + (Ghent University – imec – IDLab)
-
Author:
+
Authors:
Dylan Van Assche

RML-FNML: Test Cases

(IDLab – Ghent University – imec) +
+ Ben De Meester + + + + (Ghent University – imec – IDLab)
Feedback:
GitHub kg-construct/rml-fnml @@ -315,7 +371,7 @@

RML-FNML: Test Cases

discussion of this specification. -

+

1. Introduction

This document defines the RML-FNML test cases, consisting of a collection of test case documents (input and expected output). @@ -613,49 +669,49 @@

RML-FNML: Test Cases

1,Venus,A&B,A

Mapping

-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-@prefix ex: <http://example.com/> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix fno: <https://w3id.org/function/ontology#> .
-@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
-@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
-
-@base <http://example.com/base/> .
-
-<TriplesMap1>
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:return grel:stringOut
+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
         ]
-    ] .
+    ] .
 
-<#Execution>
-    rml:function grel:string_substring ;
-    rml:input
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
         [
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:reference "Name"
-            ];
-        ]  ,
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
         [
-            a rml:Input ;
-            rml:parameter grel:p_int_i_from ;
-            rml:inputValue "5"
-        ]  .
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "5"
+        ]  .
 

Output

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "" .
@@ -670,49 +726,49 @@ 

RML-FNML: Test Cases

1,Venus,A&B,A

Mapping

-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-@prefix ex: <http://example.com/> .
-@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix fno: <https://w3id.org/function/ontology#> .
-@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
-@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
-
-@base <http://example.com/base/> .
-
-<TriplesMap1>
-    rml:logicalSource [
-        rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.csv"
-        ];
-        rml:referenceFormulation rml:CSV
-    ];
-    rml:subjectMap [
-        rml:template "http://example.com/{Name}"
-    ];
-    rml:predicateObjectMap [
-        rml:predicate foaf:name;
-        rml:objectMap [
-            rml:functionExecution <#Execution> ;
-            rml:return grel:stringOut
+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+            rml:functionExecution <#Execution> ;
+            rml:return grel:stringOut
         ]
-    ] .
+    ] .
 
-<#Execution>
-    rml:function grel:string_substring ;
-    rml:input
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
         [
-            rml:parameter grel:valueParam ;
-            rml:inputValueMap [
-                rml:reference "Name"
-            ];
-        ]  ,
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Name"
+            ];
+        ]  ,
         [
-            a rml:Input ;
-            rml:parameter grel:p_int_i_from ;
-            rml:inputValue "1000"
-        ]  .
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "1000"
+        ]  .
 

Output


@@ -877,7 +933,65 @@ 

RML-FNML: Test Cases

<http://WWW.EXAMPLE.COM> <http://xmlns.com/foaf/0.1/name> "Venus" .
 
-

14. RMLFNMLTC0041-CSV

+

14. RMLFNMLTC0032-CSV

+

Title: Condition on subject

+

Description: Tests that a condition shortcut works

+

Error expected? No

+

Input

+
Id,Name,Class
+1,Venus,A
+1,Serena,B
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ] ;
+    rml:subjectMap [
+        rml:condition [
+            rml:functionExecution [
+                rml:function idlab-fn:equal ;
+                rml:input [
+                    rml:parameter grel:valueParam ;
+                    rml:inputValueMap [
+                        rml:reference "Class"
+                    ]
+                ] , [
+                    rml:parameter grel:valueParam2 ;
+                    rml:inputValue "A" ;
+                ] ;
+            ] ;
+            rml:return idlab-fn:_boolOut ;
+        ] ;
+        rml:template "http://example.com/{Name}" ;
+    ] ;
+    rml:predicateObjectMap [
+        rml:predicate foaf:name ;
+        rml:objectMap [
+            rml:reference "Name" ;
+        ] ;
+    ] ;
+.
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+

15. RMLFNMLTC0041-CSV

Title: Function using non-constant shortcut property return

Description: Tests that a non-constant FNML Return map also works

Error expected? No

@@ -927,10 +1041,10 @@

RML-FNML: Test Cases

] .

Output

-
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "example.com" .
+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "VENUS" .
 
-

15. RMLFNMLTC0051-CSV

+

16. RMLFNMLTC0051-CSV

Title: Nested function - Test A

Description: Tests if a composite function of form f(g(x1),x2) works (i.e., the inner function is only one argument of the outer function)

Error expected? No

@@ -1006,7 +1120,7 @@

RML-FNML: Test Cases

<http://example.com/M%20Venus> <http://xmlns.com/foaf/0.1/name> "M-VENUS" .
 
-

16. RMLFNMLTC0061-CSV

+

17. RMLFNMLTC0061-CSV

Title: Function on graph, 1 parameter

Description: Tests if a function can be used on a graph

Error expected? No

@@ -1063,7 +1177,127 @@

RML-FNML: Test Cases

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <HTTP://EXAMPLE.COM/VENUS> .
 
-

17. RMLFNMLTC0101-CSV

+

18. RMLFNMLTC0071-CSV

+

Title: Function on datatypeMap, 1 parameter

+

Description: Tests that function on DatatypeMap is handled

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,Type
+1,Venus,A&B,A,http://www.w3.org/2001/XMLSchema#string
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:datatypeMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ]
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Type"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+
+
+

19. RMLFNMLTC0081-CSV

+

Title: Function on languageMap, 1 parameter

+

Description: Tests that function on LanguageMap is handled

+

Error expected? No

+

Input

+
Id,Name,Comment,Class,Lang
+1,Venus,A&B,A,en
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.com/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix fno: <https://w3id.org/function/ontology#> .
+@prefix grel: <http://users.ugent.be/~bjdmeest/function/grel.ttl#> .
+@prefix idlab-fn: <https://w3id.org/imec/idlab/function#> .
+
+@base <http://example.com/base/> .
+
+<TriplesMap1>
+    rml:logicalSource [
+        rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.csv"
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example.com/{Name}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate foaf:name;
+        rml:objectMap [
+           rml:reference "Name" ;
+           rml:languageMap [
+             rml:functionExecution <#Execution> ;
+             rml:return grel:stringOut
+           ] ;
+        ]
+    ] .
+
+<#Execution>
+    rml:function grel:string_substring ;
+    rml:input
+        [
+            rml:parameter grel:valueParam ;
+            rml:inputValueMap [
+                rml:reference "Lang"
+            ];
+        ]  ,
+        [
+            a rml:Input ;
+            rml:parameter grel:p_int_i_from ;
+            rml:inputValue "0"
+        ]  .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"@en .
+
+
+

20. RMLFNMLTC0101-CSV

Title: Function on object, 1 false reference parameter

Description: Tests if a false reference parameters is caught

Error expected? Yes

@@ -1112,7 +1346,7 @@

RML-FNML: Test Cases

] .
-

18. RMLFNMLTC0102-CSV

+

21. RMLFNMLTC0102-CSV

Title: Function on object, wrong function URI

Description: Tests that nothing is generated if a function is used where no implementation is made available to the mapping engine

Error expected? No

@@ -1163,7 +1397,7 @@

RML-FNML: Test Cases


 
-

19. RMLFNMLTC0103-CSV

+

22. RMLFNMLTC0103-CSV

Title: Function on object, wrong parameter

Description: Tests that nothing is generated if a function is defined using a parameter not defined in the FnO description

Error expected? No

@@ -1214,7 +1448,7 @@

RML-FNML: Test Cases


 
-

20. RMLFNMLTC0104-CSV

+

23. RMLFNMLTC0104-CSV

Title: Function on object, wrong return parameter

Description: Tests that nothing is generated if a function is defined using a return not defined in the FnO description

Error expected? No

@@ -1267,11 +1501,146 @@

RML-FNML: Test Cases

+ + + + + + + + + + +
+ +
+ +
+ +
+ +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/src/test/resources/rml-io/docs/20250130/index.html b/src/test/resources/rml-io/docs/20250130/index.html new file mode 100644 index 00000000..0a514b5a --- /dev/null +++ b/src/test/resources/rml-io/docs/20250130/index.html @@ -0,0 +1,5687 @@ + + + + + + +RML-IO: Test Cases + + + + + + + + + + + + + + +
+ +

RML-IO: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-IO-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/io/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-IO test cases to the determine the RML-IO specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-IO test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-IO specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-IO test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLSTC0001a

+

Title: Source with UTF-8 encoding

+

Description: Test source with UTF-8 encoding

+

Error expected? Yes

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0001a/Friends.json>;
+  rml:encoding rml:UTF-8;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

5. RMLSTC0001b

+

Title: Source with UTF-16 encoding

+

Description: Test source with UTF-16 encoding

+

Error expected? Yes

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0001b/Friends-UTF16.json>;
+  rml:encoding rml:UTF-16;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

6. RMLSTC0002a

+

Title: Source no compression

+

Description: Test source without compression

+

Error expected? Yes

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

7. RMLSTC0002b

+

Title: Source GZip compression

+

Description: Test source with GZip compression

+

Error expected? Yes

+

Input + Friends.json.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002b/Friends.json.gz>;
+  rml:compression rml:gzip;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

8. RMLSTC0002c

+

Title: Source Zip compression

+

Description: Test source with ZIP compression

+

Error expected? Yes

+

Input + Friends.json.zip

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002c/Friends.json.zip>;
+  rml:compression rml:zip;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

9. RMLSTC0002d

+

Title: Source TarXz compression

+

Description: Test source with TarXZ compression

+

Error expected? Yes

+

Input + Friends.json.tar.xz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002d/Friends.json.tar.xz>;
+  rml:compression rml:tarxz;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

10. RMLSTC0002e

+

Title: Source TarGzip compression

+

Description: Test source with TarGZip compression

+

Error expected? Yes

+

Input + Friends.json.tar.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002e/Friends.json.tar.gz>;
+  rml:compression rml:targz;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

11. RMLSTC0003

+

Title: Source with query

+

Description: Test source which requires a query

+

Error expected? Yes

+

Input

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:RelativePathSource;
+        rml:path "./Friends.nt";
+    ];
+    rml:iterator """
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+
+    SELECT ?person ?name ?age WHERE {
+        ?person foaf:name ?name .
+        ?person foaf:age ?age .
+    }
+    """;
+    rml:referenceFormulation formats:SPARQL_Results_CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:reference "person";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

12. RMLSTC0004a

+

Title: Source with default NULL values

+

Description: Test source with default NULL values

+

Error expected? Yes

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+5;;
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004a/Friends-NULL.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/5> <http://xmlns.com/foaf/0.1/age> "" .
+<http://example.org/5> <http://xmlns.com/foaf/0.1/name> "" .
+
+
+

13. RMLSTC0004b

+

Title: Source with one NULL value

+

Description: Test source with one NULL value defined

+

Error expected? Yes

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+5;;
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004b/Friends-NULL.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+  # Empty value is considered NULL
+  rml:null "";
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

14. RMLSTC0004c

+

Title: Source with multiple NULL values

+

Description: Test source with multiple NULL values defined

+

Error expected? Yes

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+5;;
+6;NULL;NULL
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004c/Friends-NULL2.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+  # Empty value and 'NULL' are both considered NULL
+  rml:null "";
+  rml:null "NULL";
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

15. RMLSTC0005a

+

Title: Source overrride access: NULL values

+

Description: Test source with data access description providing NULL values which we override.

+

Error expected? Yes

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+5;;
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0005a/Friends-NULL.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+    csvw:null "NULL";
+  ];
+  # Empty value is considered NULL and overrides CSVW
+  rml:null "";
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

16. RMLSTC0005b

+

Title: Source overrride access: Encoding

+

Description: Test source with data access description providing encoding which we override.

+

Error expected? Yes

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0005b/Friends.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+  # Encoding is UTF-16 and overrides CSVW
+  rml:encoding rml:UTF-16;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

17. RMLSTC0006a

+

Title: Source with DCAT access description

+

Description: Test source with DCAT data access description

+

Error expected? Yes

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0006a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

18. RMLSTC0006b

+

Title: Source with VoID access description

+

Description: Test source with VoID data access description

+

Error expected? Yes

+

Input

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#VoIDSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0006b/Friends.nt>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#VoIDSourceAccess>;
+    rml:iterator """
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+
+    SELECT ?id ?name ?age WHERE {
+        ?person foaf:name ?name .
+        ?person foaf:age ?age .
+        BIND(REPLACE(STR(?person),"http://example.org/", "") AS ?id) .
+    }
+    """;
+    rml:referenceFormulation formats:SPARQL_Results_CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

19. RMLSTC0006c

+

Title: Source with SD access description

+

Description: Test source with SD data access description

+

Error expected? Yes

+

Input

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#SDSourceAccess> a rml:Source, sd:Service;
+  sd:endpoint <http://example.com/sparql/>;
+  sd:supportedLanguage sd:SPARQL11Query;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#SDSourceAccess>;
+    rml:iterator """
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+
+    SELECT ?id ?name ?age WHERE {
+        ?person foaf:name ?name .
+        ?person foaf:age ?age .
+        BIND(REPLACE(STR(?person),"http://example.org/", "") AS ?id) .
+    }
+    """;
+    rml:referenceFormulation formats:SPARQL_Results_CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

20. RMLSTC0006d

+

Title: Source with CSVW access description

+

Description: Test source with CSVW data access description

+

Error expected? Yes

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0006d/Friends.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

21. RMLSTC0006e

+

Title: Source with Web of Things access description

+

Description: Test source with Web of Things data access description

+

Error expected? Yes

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix td: <https://www.w3.org/2019/wot/td#> .
+@prefix htv: <http://www.w3.org/2011/http#> .
+@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
+@base <http://example.com/rules/> .
+
+<#WoTSourceAccess> a rml:Source, td:Thing;
+  td:hasPropertyAffordance [
+    td:hasForm [
+      # URL and content type
+      hctl:hasTarget "http://w3id.org/rml/resources/rml-io/RMLSTC0006e/Friends.json";
+      hctl:forContentType "application/json";
+    ];
+  ];
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#WoTSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

22. RMLSTC0006f

+

Title: Source with D2RQ access description

+

Description: Test source with D2RQ access description for SQL databases

+

Error expected? Yes

+

Input

+
id, name, age
+0, Monica Geller, 33
+1, Rachel Green, 34
+2, Joey Tribbiani, 35
+3, Chandler Bing, 36
+4, Ross Geller, 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#D2RQSourceAccess> a rml:Source, d2rq:Database;
+  d2rq:jdbcDSN "$CONNECTIONDSN";
+  d2rq:username "$USERNAME";
+  d2rq:password "$PASSWORD"
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#D2RQSourceAccess>;
+    rml:referenceFormulation rml:SQL2008Table;
+    rml:iterator "Friends";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

23. RMLSTC0007a

+

Title: Source with JSONPath reference formulation

+

Description: Test source with JSONPath reference formulation

+

Error expected? Yes

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0007a/Friends.json>;
+  rml:encoding rml:UTF-8;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

24. RMLSTC0007b

+

Title: Source with CSV reference formulation

+

Description: Test source with Tabular reference formulation

+

Error expected? Yes

+

Input

+
id; name; age
+0; Monica Geller; 33
+1; Rachel Green; 34
+2; Joey Tribbiani; 35
+3; Chandler Bing; 36
+4; Ross Geller; 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0007b/Friends.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

25. RMLSTC0007c

+

Title: Source with XPath reference formulation

+

Description: Test source with XPath reference formulation

+

Error expected? Yes

+

Input

+
<Friends>
+  <Character id="0">
+    <name>Monica Geller</name>
+    <age>33</age>
+  </Character>
+  <Character id="1">
+    <name>Rachel Green</name>
+    <age>34</age>
+  </Character>
+  <Character id="2">
+    <name>Joey Tribbiani</name>
+    <age>35</age>
+  </Character>
+  <Character id="3">
+    <name>Chandler Bing</name>
+    <age>36</age>
+  </Character>
+  <Character id="4">
+    <name>Ross Geller</name>
+    <age>37</age>
+  </Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0007c/Friends.xml>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "//Friends/Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

26. RMLSTC0007d

+

Title: Source with XPath reference formulation with namespaces

+

Description: Test source with XPath reference formulation with namespaces

+

Error expected? Yes

+

Input

+
<Friends xmlns:ex="http://example.org">
+  <ex:Character id="0">
+    <ex:name>Monica Geller</ex:name>
+    <ex:age>33</ex:age>
+  </ex:Character>
+  <ex:Character id="1">
+    <ex:name>Rachel Green</ex:name>
+    <ex:age>34</ex:age>
+  </ex:Character>
+  <ex:Character id="2">
+    <ex:name>Joey Tribbiani</ex:name>
+    <ex:age>35</ex:age>
+  </ex:Character>
+  <ex:Character id="3">
+    <ex:name>Chandler Bing</ex:name>
+    <ex:age>36</ex:age>
+  </ex:Character>
+  <ex:Character id="4">
+    <ex:name>Ross Geller</ex:name>
+    <ex:age>37</ex:age>
+  </ex:Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0007d/Friends.xml>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation [ a rml:XPathReferenceFormulation;
+      rml:namespace [ a rml:Namespace;
+        rml:namespacePrefix "ex";
+        rml:namespaceURL "http://example.org";
+      ];
+    ];
+    rml:iterator "//Friends/ex:Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

27. RMLTTC0000

+

Title: Default target

+

Description: Test exporting all triples to the default Target when not Targets are specified.

+

Error expected? Yes

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0000/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

28. RMLTTC0001a

+

Title: Single Target: Subject Map

+

Description: Test exporting all triples to a single Target with a given subject.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

29. RMLTTC0001b

+

Title: Single Target: Predicate Map

+

Description: Test exporting all triples to a single Target with a given predicate.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

30. RMLTTC0001c

+

Title: Single Target: Object Map

+

Description: Test exporting all triples to a single Target with a given object reference.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

31. RMLTTC0001d

+

Title: Single Target: Graph Map

+

Description: Test exporting all triples within a named graph to a single Target.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

32. RMLTTC0001e

+

Title: Single Target: Language Map

+

Description: Test exporting all triples with a given language tag to a single Target.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001e/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

33. RMLTTC0001f

+

Title: Single Target: Datatype Map

+

Description: Test exporting all triples with a given datatype to a single Target.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001f/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001f/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+
+

34. RMLTTC0002a

+

Title: Multiple Targets: Same Term Map

+

Description: Test exporting all triples to multiple Targets in the same Term Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

35. RMLTTC0002b

+

Title: Multiple Targets: Subject Map and Predicate Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Predicate Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

36. RMLTTC0002c

+

Title: Multiple Targets: Subject Map and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Object Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

37. RMLTTC0002d

+

Title: Multiple Targets: Predicate Map and Object Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Object Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

38. RMLTTC0002e

+

Title: Multiple Targets: Subject Map, Predicate Map, and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map, a Target in a Predicate Map, and a Target in a Object Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002e/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump3>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump3> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump3.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

39. RMLTTC0002f

+

Title: Multiple Targets: Subject Map and Graph Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Graph Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002f/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002f/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

40. RMLTTC0002g

+

Title: Multiple Targets: Predicate Map and Graph Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Graph Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002g/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002g/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

41. RMLTTC0002h

+

Title: Multiple Targets: Object Map and Graph Map

+

Description: Test exporting all triples to a Target in a Object Map and a Target in a Graph Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002h/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002h/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

42. RMLTTC0002i

+

Title: Multiple Targets: Language Map and Graph Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Graph Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002i/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002i/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

43. RMLTTC0002j

+

Title: Multiple Targets: Language Map and Object Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Object Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002j/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002j/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

44. RMLTTC0002k

+

Title: Multiple Targets: Datatype Map and Graph Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Graph Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002k/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002k/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+
+

45. RMLTTC0002l

+

Title: Multiple Targets: Datatype Map and Object Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Object Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002l/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002l/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+
+

46. RMLTTC0002m

+

Title: Multiple Targets: Multiple Predicate Maps

+

Description: Test exporting all triples to Targets in multiple Predicate Maps.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002m/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002m/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

47. RMLTTC0002n

+

Title: Multiple Targets: Multiple Object Maps

+

Description: Test exporting all triples to Targets in multiple Object Maps.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002n/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002n/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

48. RMLTTC0002o

+

Title: Multiple Targets: Multiple Graph Maps

+

Description: Test exporting all triples to Targets in multiple Graph Maps.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002o/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002o/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph1;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph1;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph1>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph1> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph2> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph2> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph2> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph2> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph2> .
+
+
+

49. RMLTTC0002p

+

Title: Multiple Targets: Multiple Language Maps

+

Description: Test exporting all triples to Targets in multiple Language Maps.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002p/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002p/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "nl";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@nl .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@nl .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@nl .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@nl .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@nl .
+
+
+

50. RMLTTC0002q

+

Title: Multiple Targets: Multiple Datatype Maps

+

Description: Test exporting all triples to Targets in multiple Datatype Maps.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002q/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002q/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:double;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#double>.
+
+
+

51. RMLTTC0002r

+

Title: Multiple Targets: Multiple Term Maps with same Target

+

Description: Test exporting all triples to same Target in multiple Term Maps.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002r/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002r/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

52. RMLTTC0003a

+

Title: Overriding Targets: Seperate Triples Map

+

Description: Test exporting some triples to a different Target with a separate Triples Map.

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0003a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0003a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

53. RMLTTC0004a

+

Title: Target JSON-LD

+

Description: Test export all triples as JSON-LD

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.jsonld>;
+  ];
+  rml:serialization formats:JSON-LD;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+  "@context": { 
+    "foaf": "http://xmlns.com/foaf/0.1/"
+  },
+  "@graph": [
+    {                                                                                
+
+      "@id": "http://example.org/0",
+      "foaf:name": "Monica Geller",
+      "foaf:age": "33"
+    },
+    {                                                                                
+      "@id": "http://example.org/1",
+      "foaf:name": "Rachel Green",
+      "foaf:age": "34"
+    },
+    {                                                                                
+      "@id": "http://example.org/2",
+      "foaf:name": "Joey Tribbiani",
+      "foaf:age": "35"
+    },
+    {                                                                                
+      "@id": "http://example.org/3",
+      "foaf:name": "Chandler Bing",
+      "foaf:age": "36"
+    },
+      {                                                                                
+      "@id": "http://example.org/4",
+      "foaf:name": "Ross Geller",
+      "foaf:age": "37"
+    }
+  ]
+}
+
+
+

54. RMLTTC0004b

+

Title: Target N3

+

Description: Test export all triples as N3

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.n3>;
+  ];
+  rml:serialization formats:N3;
+.
+
+

Output 1

+

+
+

Output 2

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.org/> .
+ex:0 <foaf:age> "33" ;
+     <foaf:name> "Monica Geller" .
+ex:1 <foaf:age> "34" ;
+     <foaf:name> "Rachel Green" .
+ex:2 <foaf:age> "35" ;
+     <foaf:name> "Joey Tribbiani" .
+ex:3 <foaf:age> "36" ;
+     <foaf:name> "Chandler Bing" .
+ex:4 <foaf:age> "37" ;
+     <foaf:name> "Ross Geller" .
+
+
+

55. RMLTTC0004c

+

Title: Target N-Triples

+

Description: Test export all triples as N-Triples

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nt>;
+  ];
+  rml:serialization formats:N-Triples;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

56. RMLTTC0004d

+

Title: Target N-Quads

+

Description: Test export all triples as N-Quads

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

57. RMLTTC0004e

+

Title: Target RDF/JSON

+

Description: Test export all triples as RDF/JSON

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004e/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.rdfjson>;
+  ];
+  rml:serialization formats:RDF_JSON;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+    "http://example.org/0" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "33" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Monica Geller" } ]
+    },
+    "http://example.org/1" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "34" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Rachel Green" } ]
+    },
+    "http://example.org/2" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "35" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Joey Tribbiani" } ]
+    },
+    "http://example.org/3" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "36" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Chandler Bing" } ]
+    },
+    "http://example.org/4" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "37" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Ross Geller" } ]
+    }
+}
+
+
+

58. RMLTTC0004f

+

Title: Target RDF/XML

+

Description: Test export all triples as RDF/XML

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004f/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004f/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.rdfxml>;
+  ];
+  rml:serialization formats:RDF_XML;
+.
+
+

Output 1

+

+
+

Output 2

+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <rdf:Description rdf:about="http://example.org/0">
+    <foaf:age>33</foaf:age>
+    <foaf:name>Monica Geller</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/1">
+    <foaf:age>34</foaf:age>
+    <foaf:name>Rachel Green</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/2">
+    <foaf:age>35</foaf:age>
+    <foaf:name>Joey Tribbiani</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/3">
+    <foaf:age>36</foaf:age>
+    <foaf:name>Chandler Bing</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/4">
+    <foaf:age>37</foaf:age>
+    <foaf:name>Ross Geller</foaf:name>
+  </rdf:Description>
+</rdf:RDF>
+
+
+

59. RMLTTC0004g

+

Title: Target Turtle

+

Description: Test export all triples as Turtle

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004g/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004g/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.ttl>;
+  ];
+  rml:serialization formats:Turtle;
+.
+
+

Output 1

+

+
+

Output 2

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.org/> .
+
+<ex:0> <foaf:age> "33" .
+<ex:0> <foaf:name> "Monica Geller" .
+<ex:1> <foaf:age> "34" .
+<ex:1> <foaf:name> "Rachel Green" .
+<ex:2> <foaf:age> "35" .
+<ex:2> <foaf:name> "Joey Tribbiani" .
+<ex:3> <foaf:age> "36" .
+<ex:3> <foaf:name> "Chandler Bing" .
+<ex:4> <foaf:age> "37" .
+<ex:4> <foaf:name> "Ross Geller" .
+
+
+

60. RMLTTC0005a

+

Title: Target UTF-8

+

Description: Test export all triples with UTF-8 encoding

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0005a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0005a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-8;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

61. RMLTTC0005b

+

Title: Target UTF-16

+

Description: Test export all triples with UTF-16 encoding

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0005b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0005b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-16;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

62. RMLTTC0006a

+

Title: Target no compression

+

Description: Test export all triples with no compression

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

63. RMLTTC0006b

+

Title: Target GZip compression

+

Description: Test export all triples with GZip compression

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq.gz>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:gzip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.gz

+
+

64. RMLTTC0006c

+

Title: Target Zip compression

+

Description: Test export all triples with ZIP compression

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq.zip>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:zip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.zip

+
+

65. RMLTTC0006d

+

Title: Target TarXz compression

+

Description: Test export all triples with TarXZ compression

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq.tar.xz>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:tarxz;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.tar.xz

+
+

66. RMLTTC0006e

+

Title: Target TarGzip compression

+

Description: Test export all triples with TarGZip compression

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006e/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq.tar.gz>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:targz;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.tar.gz

+
+

67. RMLTTC0007a

+

Title: Target with DCAT access description

+

Description: Test export all triples to a target with DCAT access description

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0007a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0007a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:accessUrl <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

68. RMLTTC0007b

+

Title: Target with VoID access description

+

Description: Test export all triples to a target with VoID access description

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0007b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0007b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

69. RMLTTC0007c

+

Title: Target with SD access description

+

Description: Test export all triples to a target with SD access description

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0007c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0007c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, sd:Service;
+    sd:endpoint  <http://example.com/sparql-update>;
+    sd:supportedLanguage sd:SPARQL11Update;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

70. RMLTTC0007d

+

Title: Target with Web of Things access description

+

Description: Test export all triples to a target with Web of Things access description

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0007d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix td: <https://www.w3.org/2019/wot/td#> .
+@prefix htv: <http://www.w3.org/2011/http#> .
+@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0007d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, td:Thing;
+      td:hasPropertyAffordance [
+        td:hasForm [
+          hctl:hasTarget "http://localhost/data";
+          hctl:forContentType "application/n-quads";
+      ];
+    ];
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

71. RMLTTC0007e

+

Title: Target with dcat:format

+

Description: Test dcat:format in a Target

+

Error expected? Yes

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0007e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix td: <https://www.w3.org/2019/wot/td#> .
+@prefix htv: <http://www.w3.org/2011/http#> .
+@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0007d/Friends.json>;
+    dcat:format <http://www.iana.org/assignments/media-types/application/json> ;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, td:Thing;
+      td:hasPropertyAffordance [
+        td:hasForm [
+          hctl:hasTarget "http://localhost/data";
+          hctl:forContentType "application/n-quads";
+      ];
+    ];
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-io/docs/20250217/index.html b/src/test/resources/rml-io/docs/20250217/index.html new file mode 100644 index 00000000..5707a03d --- /dev/null +++ b/src/test/resources/rml-io/docs/20250217/index.html @@ -0,0 +1,5298 @@ + + + + + + +RML-IO: Test Cases + + + + + + + + + + + + + + +
+ +

RML-IO: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-IO-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/io/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-IO test cases to the determine the RML-IO specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-IO test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-IO specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-IO test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLSTC0001a

+

Title: Source with UTF-8 encoding

+

Description: Test source with UTF-8 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0001a/Friends.json>;
+  rml:encoding rml:UTF-8;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

5. RMLSTC0001b

+

Title: Source with UTF-16 encoding

+

Description: Test source with UTF-16 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0001b/Friends-UTF16.json>;
+  rml:encoding rml:UTF-16;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

6. RMLSTC0002a

+

Title: Source no compression

+

Description: Test source without compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

7. RMLSTC0002b

+

Title: Source GZip compression

+

Description: Test source with GZip compression

+

Error expected? No

+

Input + Friends.json.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002b/Friends.json.gz>;
+  rml:compression rml:gzip;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

8. RMLSTC0002c

+

Title: Source Zip compression

+

Description: Test source with ZIP compression

+

Error expected? No

+

Input + Friends.json.zip

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002c/Friends.json.zip>;
+  rml:compression rml:zip;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

9. RMLSTC0002d

+

Title: Source TarXz compression

+

Description: Test source with TarXZ compression

+

Error expected? No

+

Input + Friends.json.tar.xz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002d/Friends.json.tar.xz>;
+  rml:compression rml:tarxz;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

10. RMLSTC0002e

+

Title: Source TarGzip compression

+

Description: Test source with TarGZip compression

+

Error expected? No

+

Input + Friends.json.tar.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0002e/Friends.json.tar.gz>;
+  rml:compression rml:targz;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

11. RMLSTC0003

+

Title: Source with query

+

Description: Test source which requires a query

+

Error expected? No

+

Input

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:RelativePathSource;
+        rml:path "./Friends.nt";
+    ];
+    rml:iterator """
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+
+    SELECT ?person ?name ?age WHERE {
+        ?person foaf:name ?name .
+        ?person foaf:age ?age .
+    }
+    """;
+    rml:referenceFormulation formats:SPARQL_Results_CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:reference "person";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

12. RMLSTC0004a

+

Title: Source with default NULL values

+

Description: Test source with default NULL values

+

Error expected? No

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+5;;
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004a/Friends-NULL.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/5> <http://xmlns.com/foaf/0.1/age> "" .
+<http://example.org/5> <http://xmlns.com/foaf/0.1/name> "" .
+
+
+

13. RMLSTC0004b

+

Title: Source with one NULL value

+

Description: Test source with one NULL value defined

+

Error expected? No

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+5;;
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004b/Friends-NULL.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+  # Empty value is considered NULL
+  rml:null "";
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

14. RMLSTC0004c

+

Title: Source with multiple NULL values

+

Description: Test source with multiple NULL values defined

+

Error expected? No

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+5;;
+6;NULL;NULL
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0004c/Friends-NULL2.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+  # Empty value and 'NULL' are both considered NULL
+  rml:null "";
+  rml:null "NULL";
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

15. RMLSTC0005a

+

Title: Source overrride access: NULL values

+

Description: Test source with data access description providing NULL values which we override.

+

Error expected? No

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+5;;
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0005a/Friends-NULL.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+    csvw:null "NULL";
+  ];
+  # Empty value is considered NULL and overrides CSVW
+  rml:null "";
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

16. RMLSTC0005b

+

Title: Source overrride access: Encoding

+

Description: Test source with data access description providing encoding which we override.

+

Error expected? No

+

Input

+
id;name;age
+0;Monica Geller;33
+1;Rachel Green;34
+2;Joey Tribbiani;35
+3;Chandler Bing;36
+4;Ross Geller;37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0005b/Friends.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+  # Encoding is UTF-16 and overrides CSVW
+  rml:encoding rml:UTF-16;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

17. RMLSTC0006a

+

Title: Source with D2RQ access description

+

Description: Test source with D2RQ access description for SQL databases

+

Error expected? No

+

Input

+
id, name, age
+0, Monica Geller, 33
+1, Rachel Green, 34
+2, Joey Tribbiani, 35
+3, Chandler Bing, 36
+4, Ross Geller, 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#D2RQSourceAccess> a rml:Source, d2rq:Database;
+  d2rq:jdbcDSN "$CONNECTIONDSN";
+  d2rq:username "$USERNAME";
+  d2rq:password "$PASSWORD"
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#D2RQSourceAccess>;
+    rml:referenceFormulation rml:SQL2008Table;
+    rml:iterator "Friends";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

18. RMLSTC0006b

+

Title: Source with a Relative Path Source

+

Description: Test access to a file

+

Error expected? No

+

Input

+
id, name, age
+0, Monica Geller, 33
+1, Rachel Green, 34
+2, Joey Tribbiani, 35
+3, Chandler Bing, 36
+4, Ross Geller, 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath, rml:Source;
+      rml:root rml:CurrentWorkingDirectory;
+      rml:path "./Friends.csv"
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

19. RMLSTC0007a

+

Title: Source with JSONPath reference formulation

+

Description: Test source with JSONPath reference formulation

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0007a/Friends.json>;
+  rml:encoding rml:UTF-8;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

20. RMLSTC0007b

+

Title: Source with CSV reference formulation

+

Description: Test source with Tabular reference formulation

+

Error expected? No

+

Input

+
id; name; age
+0; Monica Geller; 33
+1; Rachel Green; 34
+2; Joey Tribbiani; 35
+3; Chandler Bing; 36
+4; Ross Geller; 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix csvw: <http://www.w3.org/ns/csvw#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#CSVWSourceAccess> a rml:Source, csvw:Table;
+  csvw:url "http://w3id.org/rml/resources/rml-io/RMLSTC0007b/Friends.csv"^^xsd:anyURI ;
+  csvw:dialect [ a csvw:Dialect;
+    csvw:delimiter ";";
+    csvw:encoding "UTF-8";
+    csvw:header "1"^^xsd:boolean;
+  ];
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#CSVWSourceAccess>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

21. RMLSTC0007c

+

Title: Source with XPath reference formulation

+

Description: Test source with XPath reference formulation

+

Error expected? No

+

Input

+
<Friends>
+  <Character id="0">
+    <name>Monica Geller</name>
+    <age>33</age>
+  </Character>
+  <Character id="1">
+    <name>Rachel Green</name>
+    <age>34</age>
+  </Character>
+  <Character id="2">
+    <name>Joey Tribbiani</name>
+    <age>35</age>
+  </Character>
+  <Character id="3">
+    <name>Chandler Bing</name>
+    <age>36</age>
+  </Character>
+  <Character id="4">
+    <name>Ross Geller</name>
+    <age>37</age>
+  </Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0007c/Friends.xml>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "//Friends/Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

22. RMLSTC0007d

+

Title: Source with XPath reference formulation with namespaces

+

Description: Test source with XPath reference formulation with namespaces

+

Error expected? No

+

Input

+
<Friends xmlns:ex="http://example.org">
+  <ex:Character id="0">
+    <ex:name>Monica Geller</ex:name>
+    <ex:age>33</ex:age>
+  </ex:Character>
+  <ex:Character id="1">
+    <ex:name>Rachel Green</ex:name>
+    <ex:age>34</ex:age>
+  </ex:Character>
+  <ex:Character id="2">
+    <ex:name>Joey Tribbiani</ex:name>
+    <ex:age>35</ex:age>
+  </ex:Character>
+  <ex:Character id="3">
+    <ex:name>Chandler Bing</ex:name>
+    <ex:age>36</ex:age>
+  </ex:Character>
+  <ex:Character id="4">
+    <ex:name>Ross Geller</ex:name>
+    <ex:age>37</ex:age>
+  </ex:Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0007d/Friends.xml>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation [ a rml:XPathReferenceFormulation;
+      rml:namespace [ a rml:Namespace;
+        rml:namespacePrefix "ex";
+        rml:namespaceURL "http://example.org";
+      ];
+    ];
+    rml:iterator "//Friends/ex:Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

23. RMLSTC0008a

+

Title: Multiple sources of same type

+

Description: Tests the generation of all triples from multiple homogeneous sources

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0008a/Friends.json>;
+  rml:encoding rml:UTF-8;
+.
+
+<#DCATSourceAccess2> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0008a/Friends2.json>;
+  rml:encoding rml:UTF-8;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess2>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
+
+
+

24. RMLSTC0008b

+

Title: Multiple sources of different type

+

Description: Tests the generation of all triples from multiple heterogeneous sources

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccessJSON> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0008b/Friends.json>;
+  rml:encoding rml:UTF-8;
+.
+
+<#DCATSourceAccessCSV> a rml:Source, dcat:Distribution;
+  dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLSTC0008b/Friends.csv>;
+  rml:encoding rml:UTF-8;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccessJSON>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccessCSV>;
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
+
+
+

25. RMLTTC0000

+

Title: Default target

+

Description: Test exporting all triples to the default Target when not Targets are specified.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0000/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

26. RMLTTC0001a

+

Title: Single Target: Subject Map

+

Description: Test exporting all triples to a single Target with a given subject.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

27. RMLTTC0001b

+

Title: Single Target: Predicate Map

+

Description: Test exporting all triples to a single Target with a given predicate.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

28. RMLTTC0001c

+

Title: Single Target: Object Map

+

Description: Test exporting all triples to a single Target with a given object reference.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

29. RMLTTC0001d

+

Title: Single Target: Graph Map

+

Description: Test exporting all triples within a named graph to a single Target.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

30. RMLTTC0001e

+

Title: Single Target: Language Map

+

Description: Test exporting all triples with a given language tag to a single Target.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001e/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

31. RMLTTC0001f

+

Title: Single Target: Datatype Map

+

Description: Test exporting all triples with a given datatype to a single Target.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0001f/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0001f/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+
+

32. RMLTTC0002a

+

Title: Multiple Targets: Same Term Map

+

Description: Test exporting all triples to multiple Targets in the same Term Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

33. RMLTTC0002b

+

Title: Multiple Targets: Subject Map and Predicate Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Predicate Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

34. RMLTTC0002c

+

Title: Multiple Targets: Subject Map and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Object Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

35. RMLTTC0002d

+

Title: Multiple Targets: Predicate Map and Object Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Object Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

36. RMLTTC0002e

+

Title: Multiple Targets: Subject Map, Predicate Map, and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map, a Target in a Predicate Map, and a Target in a Object Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002e/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump3>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump3> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump3.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

37. RMLTTC0002f

+

Title: Multiple Targets: Subject Map and Graph Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Graph Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002f/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002f/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

38. RMLTTC0002g

+

Title: Multiple Targets: Predicate Map and Graph Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Graph Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002g/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002g/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

39. RMLTTC0002h

+

Title: Multiple Targets: Object Map and Graph Map

+

Description: Test exporting all triples to a Target in a Object Map and a Target in a Graph Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002h/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002h/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

40. RMLTTC0002i

+

Title: Multiple Targets: Language Map and Graph Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Graph Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002i/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002i/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

41. RMLTTC0002j

+

Title: Multiple Targets: Language Map and Object Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Object Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002j/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002j/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

42. RMLTTC0002k

+

Title: Multiple Targets: Datatype Map and Graph Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Graph Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002k/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002k/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+
+

43. RMLTTC0002l

+

Title: Multiple Targets: Datatype Map and Object Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Object Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002l/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002l/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+
+

44. RMLTTC0002m

+

Title: Multiple Targets: Multiple Predicate Maps

+

Description: Test exporting all triples to Targets in multiple Predicate Maps.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002m/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002m/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

45. RMLTTC0002n

+

Title: Multiple Targets: Multiple Object Maps

+

Description: Test exporting all triples to Targets in multiple Object Maps.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002n/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002n/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

46. RMLTTC0002o

+

Title: Multiple Targets: Multiple Graph Maps

+

Description: Test exporting all triples to Targets in multiple Graph Maps.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002o/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002o/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph1;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph1;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph1>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph1> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph2> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph2> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph2> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph2> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph2> .
+
+
+

47. RMLTTC0002p

+

Title: Multiple Targets: Multiple Language Maps

+

Description: Test exporting all triples to Targets in multiple Language Maps.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002p/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002p/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "nl";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@nl .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@nl .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@nl .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@nl .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@nl .
+
+
+

48. RMLTTC0002q

+

Title: Multiple Targets: Multiple Datatype Maps

+

Description: Test exporting all triples to Targets in multiple Datatype Maps.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002q/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002q/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:double;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#double>.
+
+
+

49. RMLTTC0002r

+

Title: Multiple Targets: Multiple Term Maps with same Target

+

Description: Test exporting all triples to same Target in multiple Term Maps.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0002r/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0002r/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

50. RMLTTC0003a

+

Title: Overriding Targets: Seperate Triples Map

+

Description: Test exporting some triples to a different Target with a separate Triples Map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0003a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0003a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump2.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

51. RMLTTC0004a

+

Title: Target JSON-LD

+

Description: Test export all triples as JSON-LD

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.jsonld>;
+  ];
+  rml:serialization formats:JSON-LD;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+  "@context": { 
+    "foaf": "http://xmlns.com/foaf/0.1/"
+  },
+  "@graph": [
+    {                                                                                
+
+      "@id": "http://example.org/0",
+      "foaf:name": "Monica Geller",
+      "foaf:age": "33"
+    },
+    {                                                                                
+      "@id": "http://example.org/1",
+      "foaf:name": "Rachel Green",
+      "foaf:age": "34"
+    },
+    {                                                                                
+      "@id": "http://example.org/2",
+      "foaf:name": "Joey Tribbiani",
+      "foaf:age": "35"
+    },
+    {                                                                                
+      "@id": "http://example.org/3",
+      "foaf:name": "Chandler Bing",
+      "foaf:age": "36"
+    },
+      {                                                                                
+      "@id": "http://example.org/4",
+      "foaf:name": "Ross Geller",
+      "foaf:age": "37"
+    }
+  ]
+}
+
+
+

52. RMLTTC0004b

+

Title: Target N3

+

Description: Test export all triples as N3

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.n3>;
+  ];
+  rml:serialization formats:N3;
+.
+
+

Output 1

+

+
+

Output 2

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.org/> .
+ex:0 <foaf:age> "33" ;
+     <foaf:name> "Monica Geller" .
+ex:1 <foaf:age> "34" ;
+     <foaf:name> "Rachel Green" .
+ex:2 <foaf:age> "35" ;
+     <foaf:name> "Joey Tribbiani" .
+ex:3 <foaf:age> "36" ;
+     <foaf:name> "Chandler Bing" .
+ex:4 <foaf:age> "37" ;
+     <foaf:name> "Ross Geller" .
+
+
+

53. RMLTTC0004c

+

Title: Target N-Triples

+

Description: Test export all triples as N-Triples

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nt>;
+  ];
+  rml:serialization formats:N-Triples;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

54. RMLTTC0004d

+

Title: Target N-Quads

+

Description: Test export all triples as N-Quads

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

55. RMLTTC0004e

+

Title: Target RDF/JSON

+

Description: Test export all triples as RDF/JSON

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004e/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.rdfjson>;
+  ];
+  rml:serialization formats:RDF_JSON;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+    "http://example.org/0" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "33" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Monica Geller" } ]
+    },
+    "http://example.org/1" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "34" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Rachel Green" } ]
+    },
+    "http://example.org/2" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "35" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Joey Tribbiani" } ]
+    },
+    "http://example.org/3" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "36" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Chandler Bing" } ]
+    },
+    "http://example.org/4" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "37" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Ross Geller" } ]
+    }
+}
+
+
+

56. RMLTTC0004f

+

Title: Target RDF/XML

+

Description: Test export all triples as RDF/XML

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004f/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004f/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.rdfxml>;
+  ];
+  rml:serialization formats:RDF_XML;
+.
+
+

Output 1

+

+
+

Output 2

+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <rdf:Description rdf:about="http://example.org/0">
+    <foaf:age>33</foaf:age>
+    <foaf:name>Monica Geller</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/1">
+    <foaf:age>34</foaf:age>
+    <foaf:name>Rachel Green</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/2">
+    <foaf:age>35</foaf:age>
+    <foaf:name>Joey Tribbiani</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/3">
+    <foaf:age>36</foaf:age>
+    <foaf:name>Chandler Bing</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/4">
+    <foaf:age>37</foaf:age>
+    <foaf:name>Ross Geller</foaf:name>
+  </rdf:Description>
+</rdf:RDF>
+
+
+

57. RMLTTC0004g

+

Title: Target Turtle

+

Description: Test export all triples as Turtle

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0004g/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0004g/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.ttl>;
+  ];
+  rml:serialization formats:Turtle;
+.
+
+

Output 1

+

+
+

Output 2

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.org/> .
+
+<ex:0> <foaf:age> "33" .
+<ex:0> <foaf:name> "Monica Geller" .
+<ex:1> <foaf:age> "34" .
+<ex:1> <foaf:name> "Rachel Green" .
+<ex:2> <foaf:age> "35" .
+<ex:2> <foaf:name> "Joey Tribbiani" .
+<ex:3> <foaf:age> "36" .
+<ex:3> <foaf:name> "Chandler Bing" .
+<ex:4> <foaf:age> "37" .
+<ex:4> <foaf:name> "Ross Geller" .
+
+
+

58. RMLTTC0005a

+

Title: Target UTF-8

+

Description: Test export all triples with UTF-8 encoding

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0005a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0005a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-8;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

59. RMLTTC0005b

+

Title: Target UTF-16

+

Description: Test export all triples with UTF-16 encoding

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0005b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0005b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-16;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

60. RMLTTC0006a

+

Title: Target no compression

+

Description: Test export all triples with no compression

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006a/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq>;
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

61. RMLTTC0006b

+

Title: Target GZip compression

+

Description: Test export all triples with GZip compression

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006b/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq.gz>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:gzip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.gz

+
+

62. RMLTTC0006c

+

Title: Target Zip compression

+

Description: Test export all triples with ZIP compression

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006c/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq.zip>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:zip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.zip

+
+

63. RMLTTC0006d

+

Title: Target TarXz compression

+

Description: Test export all triples with TarXZ compression

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006d/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq.tar.xz>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:tarxz;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.tar.xz

+
+

64. RMLTTC0006e

+

Title: Target TarGzip compression

+

Description: Test export all triples with TarGZip compression

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0006e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#DCATSourceAccess> a rml:Source, dcat:Distribution;
+    dcat:downloadURL <http://w3id.org/rml/resources/rml-io/RMLTTC0006e/Friends.json>;
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#DCATSourceAccess>;
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, dcat:Distribution;
+    dcat:downloadURL <file://./dump1.nq.tar.gz>;
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:targz;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.tar.gz

+
+

65. RMLTTC0007a

+

Title: Target with FilePath description

+

Description: Test export all triples to a target with File path access description

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTTC0007a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath, rml:Source;
+      rml:root rml:CurrentWorkingDirectory;
+      rml:path "./Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-io/docs/20250228/index.html b/src/test/resources/rml-io/docs/20250228/index.html new file mode 100644 index 00000000..87cb8a9c --- /dev/null +++ b/src/test/resources/rml-io/docs/20250228/index.html @@ -0,0 +1,6190 @@ + + + + + + +RML-IO: Test Cases + + + + + + + + + + + + + + +
+ +

RML-IO: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-IO-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/io/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-IO test cases to the determine the RML-IO specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-IO test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-IO specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-IO test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLSTC0001a

+

Title: Source with UTF-8 encoding

+

Description: Test source with UTF-8 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

5. RMLSTC0001b

+

Title: Source with UTF-16 encoding

+

Description: Test source with UTF-16 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-UTF16.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

6. RMLSTC0002a

+

Title: Source no compression

+

Description: Test source without compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

7. RMLSTC0002b

+

Title: Source GZip compression

+

Description: Test source with GZip compression

+

Error expected? No

+

Input + Friends.json.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.gz";
+      rml:compression rml:gzip;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

8. RMLSTC0002c

+

Title: Source Zip compression

+

Description: Test source with ZIP compression

+

Error expected? No

+

Input + Friends.json.zip

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.zip";
+      rml:compression rml:zip;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

9. RMLSTC0002d

+

Title: Source TarXz compression

+

Description: Test source with TarXZ compression

+

Error expected? No

+

Input + Friends.json.tar.xz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.tar.xz";
+      rml:compression rml:tarxz;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

10. RMLSTC0002e

+

Title: Source TarGzip compression

+

Description: Test source with TarGZip compression

+

Error expected? No

+

Input + Friends.json.tar.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.tar.gz";
+      rml:compression rml:targz;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

11. RMLSTC0003

+

Title: Source with query

+

Description: Test source which requires a query

+

Error expected? No

+

Input

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+        rml:path "./Friends.nt";
+    ];
+    rml:iterator """
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+
+    SELECT ?person ?name ?age WHERE {
+        ?person foaf:name ?name .
+        ?person foaf:age ?age .
+    }
+    """;
+    rml:referenceFormulation formats:SPARQL_Results_CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:reference "person";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

12. RMLSTC0004a

+

Title: Source with default NULL values

+

Description: Test source with default NULL values

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

13. RMLSTC0004b

+

Title: Source with one NULL value

+

Description: Test source with one NULL value defined

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+      rml:null "";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

14. RMLSTC0004c

+

Title: Source with multiple NULL values

+

Description: Test source with multiple NULL values defined

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+6,NULL,NULL
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+      rml:null "";
+      rml:null "NULL";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+
+ + + + Error response + + +

Error response

+

Error code: 404

+

Message: File not found.

+

Error code explanation: 404 - Nothing matches the given URI.

+ +
+
+ + + + Error response + + +

Error response

+

Error code: 404

+

Message: File not found.

+

Error code explanation: 404 - Nothing matches the given URI.

+ +
+

15. RMLSTC0006a

+

Title: Source with D2RQ access description

+

Description: Test source with D2RQ access description for SQL databases

+

Error expected? No

+

Input

+
id, name, age
+0, Monica Geller, 33
+1, Rachel Green, 34
+2, Joey Tribbiani, 35
+3, Chandler Bing, 36
+4, Ross Geller, 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#D2RQSourceAccess> a rml:Source, d2rq:Database;
+  d2rq:jdbcDSN "$CONNECTIONDSN";
+  d2rq:username "$USERNAME";
+  d2rq:password "$PASSWORD"
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#D2RQSourceAccess>;
+    rml:referenceFormulation rml:SQL2008Table;
+    rml:iterator "Friends";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

16. RMLSTC0006b

+

Title: Source with a Relative Path Source

+

Description: Test access to a file

+

Error expected? No

+

Input

+
id, name, age
+0, Monica Geller, 33
+1, Rachel Green, 34
+2, Joey Tribbiani, 35
+3, Chandler Bing, 36
+4, Ross Geller, 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath, rml:Source;
+      rml:root rml:CurrentWorkingDirectory;
+      rml:path "./Friends.csv"
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

17. RMLSTC0007a

+

Title: Source with JSONPath reference formulation

+

Description: Test source with JSONPath reference formulation

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

18. RMLSTC0007b

+

Title: Source with CSV reference formulation

+

Description: Test source with Tabular reference formulation

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

19. RMLSTC0007c

+

Title: Source with XPath reference formulation

+

Description: Test source with XPath reference formulation

+

Error expected? No

+

Input

+
<Friends>
+  <Character id="0">
+    <name>Monica Geller</name>
+    <age>33</age>
+  </Character>
+  <Character id="1">
+    <name>Rachel Green</name>
+    <age>34</age>
+  </Character>
+  <Character id="2">
+    <name>Joey Tribbiani</name>
+    <age>35</age>
+  </Character>
+  <Character id="3">
+    <name>Chandler Bing</name>
+    <age>36</age>
+  </Character>
+  <Character id="4">
+    <name>Ross Geller</name>
+    <age>37</age>
+  </Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.xml"
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "//Friends/Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

20. RMLSTC0007d

+

Title: Source with XPath reference formulation with namespaces

+

Description: Test source with XPath reference formulation with namespaces

+

Error expected? No

+

Input

+
<Friends xmlns:ex="http://example.org">
+  <ex:Character id="0">
+    <ex:name>Monica Geller</ex:name>
+    <ex:age>33</ex:age>
+  </ex:Character>
+  <ex:Character id="1">
+    <ex:name>Rachel Green</ex:name>
+    <ex:age>34</ex:age>
+  </ex:Character>
+  <ex:Character id="2">
+    <ex:name>Joey Tribbiani</ex:name>
+    <ex:age>35</ex:age>
+  </ex:Character>
+  <ex:Character id="3">
+    <ex:name>Chandler Bing</ex:name>
+    <ex:age>36</ex:age>
+  </ex:Character>
+  <ex:Character id="4">
+    <ex:name>Ross Geller</ex:name>
+    <ex:age>37</ex:age>
+  </ex:Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.xml"
+    ];
+    rml:referenceFormulation [ a rml:XPathReferenceFormulation;
+      rml:namespace [ a rml:Namespace;
+        rml:namespacePrefix "ex";
+        rml:namespaceURL "http://example.org";
+      ];
+    ];
+    rml:iterator "//Friends/ex:Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

21. RMLSTC0008a

+

Title: Multiple sources of same type

+

Description: Tests the generation of all triples from multiple homogeneous sources

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:RelativePathSource;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends2.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
+
+
+

22. RMLSTC0008b

+

Title: Multiple sources of different type

+

Description: Tests the generation of all triples from multiple heterogeneous sources

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:RelativePathSource;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
+
+
+

23. RMLTTC0000

+

Title: Default target

+

Description: Test exporting all triples to the default Target when not Targets are specified.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

24. RMLTTC0001a

+

Title: Single Target: Subject Map

+

Description: Test exporting all triples to a single Target with a given subject.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

25. RMLTTC0001b

+

Title: Single Target: Predicate Map

+

Description: Test exporting all triples to a single Target with a given predicate.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

26. RMLTTC0001c

+

Title: Single Target: Object Map

+

Description: Test exporting all triples to a single Target with a given object reference.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

27. RMLTTC0001d

+

Title: Single Target: Graph Map

+

Description: Test exporting all triples within a named graph to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

28. RMLTTC0001e

+

Title: Single Target: Language Map

+

Description: Test exporting all triples with a given language tag to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

29. RMLTTC0001f

+

Title: Single Target: Datatype Map

+

Description: Test exporting all triples with a given datatype to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+
+

30. RMLTTC0002a

+

Title: Multiple Targets: Same Term Map

+

Description: Test exporting all triples to multiple Targets in the same Term Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

31. RMLTTC0002b

+

Title: Multiple Targets: Subject Map and Predicate Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Predicate Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

32. RMLTTC0002c

+

Title: Multiple Targets: Subject Map and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

33. RMLTTC0002d

+

Title: Multiple Targets: Predicate Map and Object Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

34. RMLTTC0002e

+

Title: Multiple Targets: Subject Map, Predicate Map, and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map, a Target in a Predicate Map, and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump3>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump3> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump3.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

35. RMLTTC0002f

+

Title: Multiple Targets: Subject Map and Graph Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

36. RMLTTC0002g

+

Title: Multiple Targets: Predicate Map and Graph Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

37. RMLTTC0002h

+

Title: Multiple Targets: Object Map and Graph Map

+

Description: Test exporting all triples to a Target in a Object Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

38. RMLTTC0002i

+

Title: Multiple Targets: Language Map and Graph Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

39. RMLTTC0002j

+

Title: Multiple Targets: Language Map and Object Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

40. RMLTTC0002k

+

Title: Multiple Targets: Datatype Map and Graph Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+
+

41. RMLTTC0002l

+

Title: Multiple Targets: Datatype Map and Object Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+
+

42. RMLTTC0002m

+

Title: Multiple Targets: Multiple Predicate Maps

+

Description: Test exporting all triples to Targets in multiple Predicate Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

43. RMLTTC0002n

+

Title: Multiple Targets: Multiple Object Maps

+

Description: Test exporting all triples to Targets in multiple Object Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

44. RMLTTC0002o

+

Title: Multiple Targets: Multiple Graph Maps

+

Description: Test exporting all triples to Targets in multiple Graph Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph1;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph1;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph1>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph1> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph2> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph2> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph2> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph2> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph2> .
+
+
+

45. RMLTTC0002p

+

Title: Multiple Targets: Multiple Language Maps

+

Description: Test exporting all triples to Targets in multiple Language Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "nl";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@nl .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@nl .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@nl .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@nl .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@nl .
+
+
+

46. RMLTTC0002q

+

Title: Multiple Targets: Multiple Datatype Maps

+

Description: Test exporting all triples to Targets in multiple Datatype Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:double;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#double>.
+
+
+

47. RMLTTC0002r

+

Title: Multiple Targets: Multiple Term Maps with same Target

+

Description: Test exporting all triples to same Target in multiple Term Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

48. RMLTTC0003a

+

Title: Overriding Targets: Seperate Triples Map

+

Description: Test exporting some triples to a different Target with a separate Triples Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

49. RMLTTC0004a

+

Title: Target JSON-LD

+

Description: Test export all triples as JSON-LD

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.jsonld";
+  ];
+  rml:serialization formats:JSON-LD;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+  "@context": { 
+    "foaf": "http://xmlns.com/foaf/0.1/"
+  },
+  "@graph": [
+    {                                                                                
+
+      "@id": "http://example.org/0",
+      "foaf:name": "Monica Geller",
+      "foaf:age": "33"
+    },
+    {                                                                                
+      "@id": "http://example.org/1",
+      "foaf:name": "Rachel Green",
+      "foaf:age": "34"
+    },
+    {                                                                                
+      "@id": "http://example.org/2",
+      "foaf:name": "Joey Tribbiani",
+      "foaf:age": "35"
+    },
+    {                                                                                
+      "@id": "http://example.org/3",
+      "foaf:name": "Chandler Bing",
+      "foaf:age": "36"
+    },
+      {                                                                                
+      "@id": "http://example.org/4",
+      "foaf:name": "Ross Geller",
+      "foaf:age": "37"
+    }
+  ]
+}
+
+
+

50. RMLTTC0004b

+

Title: Target N3

+

Description: Test export all triples as N3

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.n3";
+  ];
+  rml:serialization formats:N3;
+.
+
+

Output 1

+

+
+

Output 2

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.org/> .
+ex:0 <foaf:age> "33" ;
+     <foaf:name> "Monica Geller" .
+ex:1 <foaf:age> "34" ;
+     <foaf:name> "Rachel Green" .
+ex:2 <foaf:age> "35" ;
+     <foaf:name> "Joey Tribbiani" .
+ex:3 <foaf:age> "36" ;
+     <foaf:name> "Chandler Bing" .
+ex:4 <foaf:age> "37" ;
+     <foaf:name> "Ross Geller" .
+
+
+

51. RMLTTC0004c

+

Title: Target N-Triples

+

Description: Test export all triples as N-Triples

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nt";
+  ];
+  rml:serialization formats:N-Triples;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

52. RMLTTC0004d

+

Title: Target N-Quads

+

Description: Test export all triples as N-Quads

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

53. RMLTTC0004e

+

Title: Target RDF/JSON

+

Description: Test export all triples as RDF/JSON

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.rdfjson";
+  ];
+  rml:serialization formats:RDF_JSON;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+    "http://example.org/0" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "33" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Monica Geller" } ]
+    },
+    "http://example.org/1" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "34" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Rachel Green" } ]
+    },
+    "http://example.org/2" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "35" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Joey Tribbiani" } ]
+    },
+    "http://example.org/3" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "36" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Chandler Bing" } ]
+    },
+    "http://example.org/4" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "37" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Ross Geller" } ]
+    }
+}
+
+
+

54. RMLTTC0004f

+

Title: Target RDF/XML

+

Description: Test export all triples as RDF/XML

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:RDF_XML;
+.
+
+

Output 1

+

+
+

Output 2

+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <rdf:Description rdf:about="http://example.org/0">
+    <foaf:age>33</foaf:age>
+    <foaf:name>Monica Geller</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/1">
+    <foaf:age>34</foaf:age>
+    <foaf:name>Rachel Green</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/2">
+    <foaf:age>35</foaf:age>
+    <foaf:name>Joey Tribbiani</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/3">
+    <foaf:age>36</foaf:age>
+    <foaf:name>Chandler Bing</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/4">
+    <foaf:age>37</foaf:age>
+    <foaf:name>Ross Geller</foaf:name>
+  </rdf:Description>
+</rdf:RDF>
+
+
+

55. RMLTTC0004g

+

Title: Target Turtle

+

Description: Test export all triples as Turtle

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:Turtle;
+.
+
+

Output 1

+

+
+

Output 2

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.org/> .
+
+<ex:0> <foaf:age> "33" .
+<ex:0> <foaf:name> "Monica Geller" .
+<ex:1> <foaf:age> "34" .
+<ex:1> <foaf:name> "Rachel Green" .
+<ex:2> <foaf:age> "35" .
+<ex:2> <foaf:name> "Joey Tribbiani" .
+<ex:3> <foaf:age> "36" .
+<ex:3> <foaf:name> "Chandler Bing" .
+<ex:4> <foaf:age> "37" .
+<ex:4> <foaf:name> "Ross Geller" .
+
+
+

56. RMLTTC0005a

+

Title: Target UTF-8

+

Description: Test export all triples with UTF-8 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-8;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

57. RMLTTC0005b

+

Title: Target UTF-16

+

Description: Test export all triples with UTF-16 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-16;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

58. RMLTTC0006a

+

Title: Target no compression

+

Description: Test export all triples with no compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

59. RMLTTC0006b

+

Title: Target GZip compression

+

Description: Test export all triples with GZip compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.gz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:gzip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.gz

+
+

60. RMLTTC0006c

+

Title: Target Zip compression

+

Description: Test export all triples with ZIP compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.zip";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:zip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.zip

+
+

61. RMLTTC0006d

+

Title: Target TarXz compression

+

Description: Test export all triples with TarXZ compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.tar.xz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:tarxz;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.tar.xz

+
+

62. RMLTTC0006e

+

Title: Target TarGzip compression

+

Description: Test export all triples with TarGZip compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.tar.gz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:targz;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.tar.gz

+
+

63. RMLTTC0007a

+

Title: Target with FilePath description

+

Description: Test export all triples to a target with File path access description

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-io/docs/20250630/index.html b/src/test/resources/rml-io/docs/20250630/index.html new file mode 100644 index 00000000..55fa3c7b --- /dev/null +++ b/src/test/resources/rml-io/docs/20250630/index.html @@ -0,0 +1,6880 @@ + + + + + + +RML-IO: Test Cases + + + + + + + + + + + + + + + +
+ +

RML-IO: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-IO-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/io/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-IO test cases to the determine the RML-IO specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-IO test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-IO specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-IO test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLSTC0001a

+

Title: Source with UTF-8 encoding

+

Description: Test source with UTF-8 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

5. RMLSTC0001b

+

Title: Source with UTF-16 encoding

+

Description: Test source with UTF-16 encoding

+

Error expected? No

+

Input

+
��[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-UTF16.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

6. RMLSTC0002a

+

Title: Source no compression

+

Description: Test source without compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

7. RMLSTC0002b

+

Title: Source GZip compression

+

Description: Test source with GZip compression

+

Error expected? No

+

Input + Friends.json.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.gz";
+      rml:compression rml:gzip;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

8. RMLSTC0002c

+

Title: Source Zip compression

+

Description: Test source with ZIP compression

+

Error expected? No

+

Input + Friends.json.zip

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.zip";
+      rml:compression rml:zip;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

9. RMLSTC0002d

+

Title: Source TarXz compression

+

Description: Test source with TarXZ compression

+

Error expected? No

+

Input + Friends.json.tar.xz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.tar.xz";
+      rml:compression rml:tarxz;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

10. RMLSTC0002e

+

Title: Source TarGzip compression

+

Description: Test source with TarGZip compression

+

Error expected? No

+

Input + Friends.json.tar.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.tar.gz";
+      rml:compression rml:targz;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

11. RMLSTC0003

+

Title: Source with query

+

Description: Test source which requires a query

+

Error expected? No

+

Input

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+        rml:path "./Friends.nt";
+    ];
+    rml:iterator """
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+
+    SELECT ?person ?name ?age WHERE {
+        ?person foaf:name ?name .
+        ?person foaf:age ?age .
+    }
+    """;
+    rml:referenceFormulation formats:SPARQL_Results_CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:reference "person";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

12. RMLSTC0004a

+

Title: Source with default NULL values

+

Description: Test source with default NULL values

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

13. RMLSTC0004b

+

Title: Source with one NULL value

+

Description: Test source with one NULL value defined

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+      rml:null "";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

14. RMLSTC0004c

+

Title: Source with multiple NULL values

+

Description: Test source with multiple NULL values defined

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+6,NULL,NULL
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+      rml:null "";
+      rml:null "NULL";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

15. RMLSTC0006a

+

Title: Source with D2RQ access description

+

Description: Test source with D2RQ access description for SQL databases

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#D2RQSourceAccess> a rml:Source, d2rq:Database;
+  d2rq:jdbcDSN "$CONNECTIONDSN";
+  d2rq:username "$USERNAME";
+  d2rq:password "$PASSWORD"
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#D2RQSourceAccess>;
+    rml:referenceFormulation rml:SQL2008Table;
+    rml:iterator "Friends";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

16. RMLSTC0006b

+

Title: Source with a Relative Path Source

+

Description: Test access to a file

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath, rml:Source;
+      rml:root rml:CurrentWorkingDirectory;
+      rml:path "./Friends.csv"
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

17. RMLSTC0007a

+

Title: Source with JSONPath reference formulation

+

Description: Test source with JSONPath reference formulation

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

18. RMLSTC0007b

+

Title: Source with CSV reference formulation

+

Description: Test source with Tabular reference formulation

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

19. RMLSTC0007c

+

Title: Source with XPath reference formulation

+

Description: Test source with XPath reference formulation

+

Error expected? No

+

Input

+
<Friends>
+  <Character id="0">
+    <name>Monica Geller</name>
+    <age>33</age>
+  </Character>
+  <Character id="1">
+    <name>Rachel Green</name>
+    <age>34</age>
+  </Character>
+  <Character id="2">
+    <name>Joey Tribbiani</name>
+    <age>35</age>
+  </Character>
+  <Character id="3">
+    <name>Chandler Bing</name>
+    <age>36</age>
+  </Character>
+  <Character id="4">
+    <name>Ross Geller</name>
+    <age>37</age>
+  </Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.xml"
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "//Friends/Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

20. RMLSTC0007d

+

Title: Source with XPath reference formulation with namespaces

+

Description: Test source with XPath reference formulation with namespaces

+

Error expected? No

+

Input

+
<Friends xmlns:ex="http://example.org">
+  <ex:Character id="0">
+    <ex:name>Monica Geller</ex:name>
+    <ex:age>33</ex:age>
+  </ex:Character>
+  <ex:Character id="1">
+    <ex:name>Rachel Green</ex:name>
+    <ex:age>34</ex:age>
+  </ex:Character>
+  <ex:Character id="2">
+    <ex:name>Joey Tribbiani</ex:name>
+    <ex:age>35</ex:age>
+  </ex:Character>
+  <ex:Character id="3">
+    <ex:name>Chandler Bing</ex:name>
+    <ex:age>36</ex:age>
+  </ex:Character>
+  <ex:Character id="4">
+    <ex:name>Ross Geller</ex:name>
+    <ex:age>37</ex:age>
+  </ex:Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.xml"
+    ];
+    rml:referenceFormulation [ a rml:XPathReferenceFormulation;
+      rml:namespace [ a rml:Namespace;
+        rml:namespacePrefix "ex";
+        rml:namespaceURL "http://example.org";
+      ];
+    ];
+    rml:iterator "//Friends/ex:Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

21. RMLSTC0008a

+

Title: Multiple sources of same type

+

Description: Tests the generation of all triples from multiple homogeneous sources

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:RelativePathSource;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends2.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
+
+
+

22. RMLSTC0008b

+

Title: Multiple sources of different type

+

Description: Tests the generation of all triples from multiple heterogeneous sources

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:RelativePathSource;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
+
+
+

23. RMLSTC0009a

+

Title: Source with quoted columns

+

Description: Tests the generation of triples where columns are quoted

+

Error expected? Yes

+

Input

+
"id","name","age"
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+
+

24. RMLSTC0010a

+

Title: Invalid CSV source, reference to invalid column

+

Description: Tests the identification of invalid CSV sources

+

Error expected? Yes

+

Input

+
id,name,age
+6,Phoebe Buffay 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ].
+
+
+

25. RMLSTC0010b

+

Title: Invalid CSV source, no reference to invalid column

+

Description: Tests the identification of invalid CSV sources, even when all columns referenced are valid

+

Error expected? Yes

+

Input

+
id,name,age
+6,Phoebe Buffay 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ].
+
+
+

26. RMLSTC0011a

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ].
+
+

Output

+
<http://example.org/InnovateX> <http://xmlns.com/foaf/0.1/name> "InnovateX" .
+<http://example.org/TechCorp> <http://xmlns.com/foaf/0.1/name> "TechCorp" .
+
+
+

27. RMLSTC0011b

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:department;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.departments[*].name";
+    ];
+  ].
+
+

Output

+
<http://example.org/InnovateX> <http://example.com/department> "Research & Development" .
+<http://example.org/InnovateX> <http://example.com/department> "Sales" .
+<http://example.org/TechCorp> <http://example.com/department> "Engineering" .
+<http://example.org/TechCorp> <http://example.com/department> "Marketing" .
+
+
+

28. RMLSTC0011c

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:employee;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.departments[*].employees[*].name";
+    ];
+  ].
+
+

Output

+
<http://example.org/InnovateX> <http://example.com/employee> "Liam Brown" .
+<http://example.org/InnovateX> <http://example.com/employee> "Olivia Martinez" .
+<http://example.org/InnovateX> <http://example.com/employee> "Sophia White" .
+<http://example.org/TechCorp> <http://example.com/employee> "Bob Smith" .
+<http://example.org/TechCorp> <http://example.com/employee> "Eve Davis" .
+<http://example.org/TechCorp> <http://example.com/employee> "Sarah Lee" .
+
+
+

29. RMLSTC0011d

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*].departments[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.manager.name";
+    ];
+  ].
+
+

Output

+
<http://example.org/Engineering> <http://xmlns.com/foaf/0.1/name> "Alice Johnson" .
+<http://example.org/Marketing> <http://xmlns.com/foaf/0.1/name> "John Doe" .
+<http://example.org/Research%20%26%20Development> <http://xmlns.com/foaf/0.1/name> "Emma Wilson" .
+<http://example.org/Sales> <http://xmlns.com/foaf/0.1/name> "Michael Green" .
+
+
+

30. RMLSTC0011e

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*].departments[*].employees[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:skill;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.skills[*]";
+    ];
+  ].
+
+

Output

+
<http://example.org/Bob%20Smith> <http://example.com/skill> "AWS" .
+<http://example.org/Bob%20Smith> <http://example.com/skill> "JavaScript" .
+<http://example.org/Bob%20Smith> <http://example.com/skill> "Python" .
+<http://example.org/Eve%20Davis> <http://example.com/skill> "Docker" .
+<http://example.org/Eve%20Davis> <http://example.com/skill> "Kubernetes" .
+<http://example.org/Eve%20Davis> <http://example.com/skill> "Terraform" .
+<http://example.org/Liam%20Brown> <http://example.com/skill> "Deep Learning" .
+<http://example.org/Liam%20Brown> <http://example.com/skill> "Machine Learning" .
+<http://example.org/Liam%20Brown> <http://example.com/skill> "Python" .
+<http://example.org/Olivia%20Martinez> <http://example.com/skill> "CRM" .
+<http://example.org/Olivia%20Martinez> <http://example.com/skill> "Lead Generation" .
+<http://example.org/Olivia%20Martinez> <http://example.com/skill> "Negotiation" .
+<http://example.org/Sarah%20Lee> <http://example.com/skill> "Copywriting" .
+<http://example.org/Sarah%20Lee> <http://example.com/skill> "Google Ads" .
+<http://example.org/Sarah%20Lee> <http://example.com/skill> "SEO" .
+<http://example.org/Sophia%20White> <http://example.com/skill> "Data Analysis" .
+<http://example.org/Sophia%20White> <http://example.com/skill> "R" .
+<http://example.org/Sophia%20White> <http://example.com/skill> "SQL" .
+
+
+

31. RMLSTC0012a

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ].
+
+

Output

+
<http://example.org/25> <http://xmlns.com/foaf/0.1/name> "TechCorp" .
+<http://example.org/35> <http://xmlns.com/foaf/0.1/name> "InnovateX" .
+
+
+

32. RMLSTC0012b

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company/departments";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{../@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:department;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "department/name";
+    ];
+  ].
+
+

Output

+
<http://example.org/25> <http://example.com/department> "Engineering" .
+<http://example.org/25> <http://example.com/department> "Marketing" .
+<http://example.org/35> <http://example.com/department> "Research & Development" .
+<http://example.org/35> <http://example.com/department> "Sales" .
+
+
+

33. RMLSTC0012c

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company/departments/department/employees";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{../../../@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:employee;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "employee/name";
+    ];
+  ].
+
+

Output

+
<http://example.org/25> <http://example.com/employee> "Bob Smith" .
+<http://example.org/25> <http://example.com/employee> "Eve Davis" .
+<http://example.org/25> <http://example.com/employee> "Sarah Lee" .
+<http://example.org/35> <http://example.com/employee> "Liam Brown" .
+<http://example.org/35> <http://example.com/employee> "Olivia Martinez" .
+<http://example.org/35> <http://example.com/employee> "Sophia White" .
+
+
+

34. RMLSTC0012d

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company/departments/department";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{../../@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:manager;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "manager/name";
+    ];
+  ].
+
+

Output

+
<http://example.org/25> <http://example.com/manager> "Alice Johnson" .
+<http://example.org/25> <http://example.com/manager> "John Doe" .
+<http://example.org/35> <http://example.com/manager> "Emma Wilson" .
+<http://example.org/35> <http://example.com/manager> "Michael Green" .
+
+
+

35. RMLSTC0012e

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company/departments/department/employees/employee";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:skill;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "skills/skill";
+    ];
+  ].
+
+

Output

+
<http://example.org/Bob%20Smith> <http://example.com/employee> "AWS" .
+<http://example.org/Bob%20Smith> <http://example.com/employee> "JavaScript" .
+<http://example.org/Bob%20Smith> <http://example.com/employee> "Python" .
+<http://example.org/Eve%20Davis> <http://example.com/employee> "Docker" .
+<http://example.org/Eve%20Davis> <http://example.com/employee> "Kubernetes" .
+<http://example.org/Eve%20Davis> <http://example.com/employee> "Terraform" .
+<http://example.org/Liam%20Brown> <http://example.com/employee> "Deep Learning" .
+<http://example.org/Liam%20Brown> <http://example.com/employee> "Machine Learning" .
+<http://example.org/Liam%20Brown> <http://example.com/employee> "Python" .
+<http://example.org/Olivia%20Martinez> <http://example.com/employee> "CRM" .
+<http://example.org/Olivia%20Martinez> <http://example.com/employee> "Lead Generation" .
+<http://example.org/Olivia%20Martinez> <http://example.com/employee> "Negotiation" .
+<http://example.org/Sarah%20Lee> <http://example.com/employee> "Copywriting" .
+<http://example.org/Sarah%20Lee> <http://example.com/employee> "Google Ads" .
+<http://example.org/Sarah%20Lee> <http://example.com/employee> "SEO" .
+<http://example.org/Sophia%20White> <http://example.com/employee> "Data Analysis" .
+<http://example.org/Sophia%20White> <http://example.com/employee> "R" .
+<http://example.org/Sophia%20White> <http://example.com/employee> "SQL" .
+
+
+

36. RMLTTC0000

+

Title: Default target

+

Description: Test exporting all triples to the default Target when not Targets are specified.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

37. RMLTTC0001a

+

Title: Single Target: Subject Map

+

Description: Test exporting all triples to a single Target with a given subject.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

38. RMLTTC0001b

+

Title: Single Target: Predicate Map

+

Description: Test exporting all triples to a single Target with a given predicate.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

39. RMLTTC0001c

+

Title: Single Target: Object Map

+

Description: Test exporting all triples to a single Target with a given object reference.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

40. RMLTTC0001d

+

Title: Single Target: Graph Map

+

Description: Test exporting all triples within a named graph to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

41. RMLTTC0001e

+

Title: Single Target: Language Map

+

Description: Test exporting all triples with a given language tag to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

42. RMLTTC0001f

+

Title: Single Target: Datatype Map

+

Description: Test exporting all triples with a given datatype to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+
+

43. RMLTTC0002a

+

Title: Multiple Targets: Same Term Map

+

Description: Test exporting all triples to multiple Targets in the same Term Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

44. RMLTTC0002b

+

Title: Multiple Targets: Subject Map and Predicate Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Predicate Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

45. RMLTTC0002c

+

Title: Multiple Targets: Subject Map and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

46. RMLTTC0002d

+

Title: Multiple Targets: Predicate Map and Object Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

47. RMLTTC0002e

+

Title: Multiple Targets: Subject Map, Predicate Map, and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map, a Target in a Predicate Map, and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump3>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump3> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump3.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

48. RMLTTC0002f

+

Title: Multiple Targets: Subject Map and Graph Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

49. RMLTTC0002g

+

Title: Multiple Targets: Predicate Map and Graph Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

50. RMLTTC0002h

+

Title: Multiple Targets: Object Map and Graph Map

+

Description: Test exporting all triples to a Target in a Object Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

51. RMLTTC0002i

+

Title: Multiple Targets: Language Map and Graph Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

52. RMLTTC0002j

+

Title: Multiple Targets: Language Map and Object Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

53. RMLTTC0002k

+

Title: Multiple Targets: Datatype Map and Graph Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+
+

54. RMLTTC0002l

+

Title: Multiple Targets: Datatype Map and Object Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

55. RMLTTC0002m

+

Title: Multiple Targets: Multiple Predicate Maps

+

Description: Test exporting all triples to Targets in multiple Predicate Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

56. RMLTTC0002n

+

Title: Multiple Targets: Multiple Object Maps

+

Description: Test exporting all triples to Targets in multiple Object Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

57. RMLTTC0002o

+

Title: Multiple Targets: Multiple Graph Maps

+

Description: Test exporting all triples to Targets in multiple Graph Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph1;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph2;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph1>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph1> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph2> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph2> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph2> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph2> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph2> .
+
+
+

58. RMLTTC0002p

+

Title: Multiple Targets: Multiple Language Maps

+

Description: Test exporting all triples to Targets in multiple Language Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "nl";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@nl .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@nl .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@nl .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@nl .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@nl .
+
+
+

59. RMLTTC0002q

+

Title: Multiple Targets: Multiple Datatype Maps

+

Description: Test exporting all triples to Targets in multiple Datatype Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:double;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#double>.
+
+
+

60. RMLTTC0002r

+

Title: Multiple Targets: Multiple Term Maps with same Target

+

Description: Test exporting all triples to same Target in multiple Term Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

61. RMLTTC0003a

+

Title: Overriding Targets: Seperate Triples Map

+

Description: Test exporting some triples to a different Target with a separate Triples Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

62. RMLTTC0004a

+

Title: Target JSON-LD

+

Description: Test export all triples as JSON-LD

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.jsonld";
+  ];
+  rml:serialization formats:JSON-LD;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+  "@context": { 
+    "foaf": "http://xmlns.com/foaf/0.1/"
+  },
+  "@graph": [
+    {                                                                                
+
+      "@id": "http://example.org/0",
+      "foaf:name": "Monica Geller",
+      "foaf:age": "33"
+    },
+    {                                                                                
+      "@id": "http://example.org/1",
+      "foaf:name": "Rachel Green",
+      "foaf:age": "34"
+    },
+    {                                                                                
+      "@id": "http://example.org/2",
+      "foaf:name": "Joey Tribbiani",
+      "foaf:age": "35"
+    },
+    {                                                                                
+      "@id": "http://example.org/3",
+      "foaf:name": "Chandler Bing",
+      "foaf:age": "36"
+    },
+      {                                                                                
+      "@id": "http://example.org/4",
+      "foaf:name": "Ross Geller",
+      "foaf:age": "37"
+    }
+  ]
+}
+
+
+

63. RMLTTC0004b

+

Title: Target N3

+

Description: Test export all triples as N3

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.n3";
+  ];
+  rml:serialization formats:N3;
+.
+
+

Output 1

+

+
+

Output 2

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.org/> .
+ex:0 <foaf:age> "33" ;
+     <foaf:name> "Monica Geller" .
+ex:1 <foaf:age> "34" ;
+     <foaf:name> "Rachel Green" .
+ex:2 <foaf:age> "35" ;
+     <foaf:name> "Joey Tribbiani" .
+ex:3 <foaf:age> "36" ;
+     <foaf:name> "Chandler Bing" .
+ex:4 <foaf:age> "37" ;
+     <foaf:name> "Ross Geller" .
+
+
+

64. RMLTTC0004c

+

Title: Target N-Triples

+

Description: Test export all triples as N-Triples

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nt";
+  ];
+  rml:serialization formats:N-Triples;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

65. RMLTTC0004d

+

Title: Target N-Quads

+

Description: Test export all triples as N-Quads

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

66. RMLTTC0004e

+

Title: Target RDF/JSON

+

Description: Test export all triples as RDF/JSON

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.rdfjson";
+  ];
+  rml:serialization formats:RDF_JSON;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+    "http://example.org/0" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "33" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Monica Geller" } ]
+    },
+    "http://example.org/1" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "34" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Rachel Green" } ]
+    },
+    "http://example.org/2" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "35" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Joey Tribbiani" } ]
+    },
+    "http://example.org/3" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "36" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Chandler Bing" } ]
+    },
+    "http://example.org/4" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "37" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Ross Geller" } ]
+    }
+}
+
+
+

67. RMLTTC0004f

+

Title: Target RDF/XML

+

Description: Test export all triples as RDF/XML

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.rdfxml";
+  ];
+  rml:serialization formats:RDF_XML;
+.
+
+

Output 1

+

+
+

Output 2

+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <rdf:Description rdf:about="http://example.org/0">
+    <foaf:age>33</foaf:age>
+    <foaf:name>Monica Geller</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/1">
+    <foaf:age>34</foaf:age>
+    <foaf:name>Rachel Green</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/2">
+    <foaf:age>35</foaf:age>
+    <foaf:name>Joey Tribbiani</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/3">
+    <foaf:age>36</foaf:age>
+    <foaf:name>Chandler Bing</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/4">
+    <foaf:age>37</foaf:age>
+    <foaf:name>Ross Geller</foaf:name>
+  </rdf:Description>
+</rdf:RDF>
+
+
+

68. RMLTTC0004g

+

Title: Target Turtle

+

Description: Test export all triples as Turtle

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.ttl";
+  ];
+  rml:serialization formats:Turtle;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

69. RMLTTC0005a

+

Title: Target UTF-8

+

Description: Test export all triples with UTF-8 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-8;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

70. RMLTTC0005b

+

Title: Target UTF-16

+

Description: Test export all triples with UTF-16 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-16;
+.
+
+

Output 1

+

+
+

Output 2

+
��<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+
+

71. RMLTTC0006a

+

Title: Target no compression

+

Description: Test export all triples with no compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

72. RMLTTC0006b

+

Title: Target GZip compression

+

Description: Test export all triples with GZip compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.gz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:gzip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.gz

+
+

73. RMLTTC0006c

+

Title: Target Zip compression

+

Description: Test export all triples with ZIP compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.zip";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:zip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.zip

+
+

74. RMLTTC0006d

+

Title: Target TarXz compression

+

Description: Test export all triples with TarXZ compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.tar.xz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:tarxz;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.tar.xz

+
+

75. RMLTTC0006e

+

Title: Target TarGzip compression

+

Description: Test export all triples with TarGZip compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.tar.gz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:targz;
+.
+
+

Output 1

+

+
+

Output 2

+
����j�0�\�)B -�ҋ��0�����j &N-�o?�޸9�l��	ϟ1���%��D/UjX�6��@F*%R�H('�$B�O)�➥&��
+�$�:�����jWv]�ȹ��v����bO�ח���e�⧠O\0�ua�t��~������LӃq�4s��j]z���8zh��s��%5�u��K0W�����jo�F�K����c��R��?�d}17I-�]���%�����۷�o�M��((
+
+
+

76. RMLTTC0007a

+

Title: Target with FilePath description

+

Description: Test export all triples to a target with File path access description

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-io/docs/index.html b/src/test/resources/rml-io/docs/index.html new file mode 100644 index 00000000..55fa3c7b --- /dev/null +++ b/src/test/resources/rml-io/docs/index.html @@ -0,0 +1,6880 @@ + + + + + + +RML-IO: Test Cases + + + + + + + + + + + + + + + +
+ +

RML-IO: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-IO-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/io/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-IO test cases to the determine the RML-IO specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-IO test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-IO specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-IO test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLSTC0001a

+

Title: Source with UTF-8 encoding

+

Description: Test source with UTF-8 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

5. RMLSTC0001b

+

Title: Source with UTF-16 encoding

+

Description: Test source with UTF-16 encoding

+

Error expected? No

+

Input

+
��[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-UTF16.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

6. RMLSTC0002a

+

Title: Source no compression

+

Description: Test source without compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json"
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

7. RMLSTC0002b

+

Title: Source GZip compression

+

Description: Test source with GZip compression

+

Error expected? No

+

Input + Friends.json.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.gz";
+      rml:compression rml:gzip;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

8. RMLSTC0002c

+

Title: Source Zip compression

+

Description: Test source with ZIP compression

+

Error expected? No

+

Input + Friends.json.zip

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.zip";
+      rml:compression rml:zip;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

9. RMLSTC0002d

+

Title: Source TarXz compression

+

Description: Test source with TarXZ compression

+

Error expected? No

+

Input + Friends.json.tar.xz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.tar.xz";
+      rml:compression rml:tarxz;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

10. RMLSTC0002e

+

Title: Source TarGzip compression

+

Description: Test source with TarGZip compression

+

Error expected? No

+

Input + Friends.json.tar.gz

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json.tar.gz";
+      rml:compression rml:targz;
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

11. RMLSTC0003

+

Title: Source with query

+

Description: Test source which requires a query

+

Error expected? No

+

Input

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+        rml:path "./Friends.nt";
+    ];
+    rml:iterator """
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+
+    SELECT ?person ?name ?age WHERE {
+        ?person foaf:name ?name .
+        ?person foaf:age ?age .
+    }
+    """;
+    rml:referenceFormulation formats:SPARQL_Results_CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:reference "person";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

12. RMLSTC0004a

+

Title: Source with default NULL values

+

Description: Test source with default NULL values

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

13. RMLSTC0004b

+

Title: Source with one NULL value

+

Description: Test source with one NULL value defined

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+      rml:null "";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

14. RMLSTC0004c

+

Title: Source with multiple NULL values

+

Description: Test source with multiple NULL values defined

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+5,,
+6,NULL,NULL
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends-NULL.csv";
+      rml:null "";
+      rml:null "NULL";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

15. RMLSTC0006a

+

Title: Source with D2RQ access description

+

Description: Test source with D2RQ access description for SQL databases

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#D2RQSourceAccess> a rml:Source, d2rq:Database;
+  d2rq:jdbcDSN "$CONNECTIONDSN";
+  d2rq:username "$USERNAME";
+  d2rq:password "$PASSWORD"
+.
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source <#D2RQSourceAccess>;
+    rml:referenceFormulation rml:SQL2008Table;
+    rml:iterator "Friends";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

16. RMLSTC0006b

+

Title: Source with a Relative Path Source

+

Description: Test access to a file

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath, rml:Source;
+      rml:root rml:CurrentWorkingDirectory;
+      rml:path "./Friends.csv"
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

17. RMLSTC0007a

+

Title: Source with JSONPath reference formulation

+

Description: Test source with JSONPath reference formulation

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

18. RMLSTC0007b

+

Title: Source with CSV reference formulation

+

Description: Test source with Tabular reference formulation

+

Error expected? No

+

Input

+
id,name,age
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

19. RMLSTC0007c

+

Title: Source with XPath reference formulation

+

Description: Test source with XPath reference formulation

+

Error expected? No

+

Input

+
<Friends>
+  <Character id="0">
+    <name>Monica Geller</name>
+    <age>33</age>
+  </Character>
+  <Character id="1">
+    <name>Rachel Green</name>
+    <age>34</age>
+  </Character>
+  <Character id="2">
+    <name>Joey Tribbiani</name>
+    <age>35</age>
+  </Character>
+  <Character id="3">
+    <name>Chandler Bing</name>
+    <age>36</age>
+  </Character>
+  <Character id="4">
+    <name>Ross Geller</name>
+    <age>37</age>
+  </Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.xml"
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "//Friends/Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

20. RMLSTC0007d

+

Title: Source with XPath reference formulation with namespaces

+

Description: Test source with XPath reference formulation with namespaces

+

Error expected? No

+

Input

+
<Friends xmlns:ex="http://example.org">
+  <ex:Character id="0">
+    <ex:name>Monica Geller</ex:name>
+    <ex:age>33</ex:age>
+  </ex:Character>
+  <ex:Character id="1">
+    <ex:name>Rachel Green</ex:name>
+    <ex:age>34</ex:age>
+  </ex:Character>
+  <ex:Character id="2">
+    <ex:name>Joey Tribbiani</ex:name>
+    <ex:age>35</ex:age>
+  </ex:Character>
+  <ex:Character id="3">
+    <ex:name>Chandler Bing</ex:name>
+    <ex:age>36</ex:age>
+  </ex:Character>
+  <ex:Character id="4">
+    <ex:name>Ross Geller</ex:name>
+    <ex:age>37</ex:age>
+  </ex:Character>
+</Friends>
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.xml"
+    ];
+    rml:referenceFormulation [ a rml:XPathReferenceFormulation;
+      rml:namespace [ a rml:Namespace;
+        rml:namespacePrefix "ex";
+        rml:namespaceURL "http://example.org";
+      ];
+    ];
+    rml:iterator "//Friends/ex:Character";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:name/text()";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "ex:age/text()";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

21. RMLSTC0008a

+

Title: Multiple sources of same type

+

Description: Tests the generation of all triples from multiple homogeneous sources

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:RelativePathSource;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends2.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
+
+
+

22. RMLSTC0008b

+

Title: Multiple sources of different type

+

Description: Tests the generation of all triples from multiple heterogeneous sources

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:RelativePathSource;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
+
+
+

23. RMLSTC0009a

+

Title: Source with quoted columns

+

Description: Tests the generation of triples where columns are quoted

+

Error expected? Yes

+

Input

+
"id","name","age"
+0,Monica Geller,33
+1,Rachel Green,34
+2,Joey Tribbiani,35
+3,Chandler Bing,36
+4,Ross Geller,37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ];
+.
+
+
+

24. RMLSTC0010a

+

Title: Invalid CSV source, reference to invalid column

+

Description: Tests the identification of invalid CSV sources

+

Error expected? Yes

+

Input

+
id,name,age
+6,Phoebe Buffay 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "age";
+    ];
+  ].
+
+
+

25. RMLSTC0010b

+

Title: Invalid CSV source, no reference to invalid column

+

Description: Tests the identification of invalid CSV sources, even when all columns referenced are valid

+

Error expected? Yes

+

Input

+
id,name,age
+6,Phoebe Buffay 37
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.csv";
+    ];
+    rml:referenceFormulation rml:CSV;
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ].
+
+
+

26. RMLSTC0011a

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ].
+
+

Output

+
<http://example.org/InnovateX> <http://xmlns.com/foaf/0.1/name> "InnovateX" .
+<http://example.org/TechCorp> <http://xmlns.com/foaf/0.1/name> "TechCorp" .
+
+
+

27. RMLSTC0011b

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:department;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.departments[*].name";
+    ];
+  ].
+
+

Output

+
<http://example.org/InnovateX> <http://example.com/department> "Research & Development" .
+<http://example.org/InnovateX> <http://example.com/department> "Sales" .
+<http://example.org/TechCorp> <http://example.com/department> "Engineering" .
+<http://example.org/TechCorp> <http://example.com/department> "Marketing" .
+
+
+

28. RMLSTC0011c

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:employee;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.departments[*].employees[*].name";
+    ];
+  ].
+
+

Output

+
<http://example.org/InnovateX> <http://example.com/employee> "Liam Brown" .
+<http://example.org/InnovateX> <http://example.com/employee> "Olivia Martinez" .
+<http://example.org/InnovateX> <http://example.com/employee> "Sophia White" .
+<http://example.org/TechCorp> <http://example.com/employee> "Bob Smith" .
+<http://example.org/TechCorp> <http://example.com/employee> "Eve Davis" .
+<http://example.org/TechCorp> <http://example.com/employee> "Sarah Lee" .
+
+
+

29. RMLSTC0011d

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*].departments[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.manager.name";
+    ];
+  ].
+
+

Output

+
<http://example.org/Engineering> <http://xmlns.com/foaf/0.1/name> "Alice Johnson" .
+<http://example.org/Marketing> <http://xmlns.com/foaf/0.1/name> "John Doe" .
+<http://example.org/Research%20%26%20Development> <http://xmlns.com/foaf/0.1/name> "Emma Wilson" .
+<http://example.org/Sales> <http://xmlns.com/foaf/0.1/name> "Michael Green" .
+
+
+

30. RMLSTC0011e

+

Title: Complex JSON source

+

Description: Tests the generation of triples from complex JSON sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0011e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$.companies[*].departments[*].employees[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:skill;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.skills[*]";
+    ];
+  ].
+
+

Output

+
<http://example.org/Bob%20Smith> <http://example.com/skill> "AWS" .
+<http://example.org/Bob%20Smith> <http://example.com/skill> "JavaScript" .
+<http://example.org/Bob%20Smith> <http://example.com/skill> "Python" .
+<http://example.org/Eve%20Davis> <http://example.com/skill> "Docker" .
+<http://example.org/Eve%20Davis> <http://example.com/skill> "Kubernetes" .
+<http://example.org/Eve%20Davis> <http://example.com/skill> "Terraform" .
+<http://example.org/Liam%20Brown> <http://example.com/skill> "Deep Learning" .
+<http://example.org/Liam%20Brown> <http://example.com/skill> "Machine Learning" .
+<http://example.org/Liam%20Brown> <http://example.com/skill> "Python" .
+<http://example.org/Olivia%20Martinez> <http://example.com/skill> "CRM" .
+<http://example.org/Olivia%20Martinez> <http://example.com/skill> "Lead Generation" .
+<http://example.org/Olivia%20Martinez> <http://example.com/skill> "Negotiation" .
+<http://example.org/Sarah%20Lee> <http://example.com/skill> "Copywriting" .
+<http://example.org/Sarah%20Lee> <http://example.com/skill> "Google Ads" .
+<http://example.org/Sarah%20Lee> <http://example.com/skill> "SEO" .
+<http://example.org/Sophia%20White> <http://example.com/skill> "Data Analysis" .
+<http://example.org/Sophia%20White> <http://example.com/skill> "R" .
+<http://example.org/Sophia%20White> <http://example.com/skill> "SQL" .
+
+
+

31. RMLSTC0012a

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012a/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "name";
+    ];
+  ].
+
+

Output

+
<http://example.org/25> <http://xmlns.com/foaf/0.1/name> "TechCorp" .
+<http://example.org/35> <http://xmlns.com/foaf/0.1/name> "InnovateX" .
+
+
+

32. RMLSTC0012b

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012b/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company/departments";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{../@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:department;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "department/name";
+    ];
+  ].
+
+

Output

+
<http://example.org/25> <http://example.com/department> "Engineering" .
+<http://example.org/25> <http://example.com/department> "Marketing" .
+<http://example.org/35> <http://example.com/department> "Research & Development" .
+<http://example.org/35> <http://example.com/department> "Sales" .
+
+
+

33. RMLSTC0012c

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012c/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company/departments/department/employees";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{../../../@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:employee;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "employee/name";
+    ];
+  ].
+
+

Output

+
<http://example.org/25> <http://example.com/employee> "Bob Smith" .
+<http://example.org/25> <http://example.com/employee> "Eve Davis" .
+<http://example.org/25> <http://example.com/employee> "Sarah Lee" .
+<http://example.org/35> <http://example.com/employee> "Liam Brown" .
+<http://example.org/35> <http://example.com/employee> "Olivia Martinez" .
+<http://example.org/35> <http://example.com/employee> "Sophia White" .
+
+
+

34. RMLSTC0012d

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012d/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company/departments/department";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{../../@id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:manager;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "manager/name";
+    ];
+  ].
+
+

Output

+
<http://example.org/25> <http://example.com/manager> "Alice Johnson" .
+<http://example.org/25> <http://example.com/manager> "John Doe" .
+<http://example.org/35> <http://example.com/manager> "Emma Wilson" .
+<http://example.org/35> <http://example.com/manager> "Michael Green" .
+
+
+

35. RMLSTC0012e

+

Title: Complex XML source

+

Description: Tests the generation of triples from complex XML sources

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLSTC0012e/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.com/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "companies.xml";
+    ];
+    rml:referenceFormulation rml:XPath;
+    rml:iterator "/companies/company/departments/department/employees/employee";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{name}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant ex:skill;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "skills/skill";
+    ];
+  ].
+
+

Output

+
<http://example.org/Bob%20Smith> <http://example.com/employee> "AWS" .
+<http://example.org/Bob%20Smith> <http://example.com/employee> "JavaScript" .
+<http://example.org/Bob%20Smith> <http://example.com/employee> "Python" .
+<http://example.org/Eve%20Davis> <http://example.com/employee> "Docker" .
+<http://example.org/Eve%20Davis> <http://example.com/employee> "Kubernetes" .
+<http://example.org/Eve%20Davis> <http://example.com/employee> "Terraform" .
+<http://example.org/Liam%20Brown> <http://example.com/employee> "Deep Learning" .
+<http://example.org/Liam%20Brown> <http://example.com/employee> "Machine Learning" .
+<http://example.org/Liam%20Brown> <http://example.com/employee> "Python" .
+<http://example.org/Olivia%20Martinez> <http://example.com/employee> "CRM" .
+<http://example.org/Olivia%20Martinez> <http://example.com/employee> "Lead Generation" .
+<http://example.org/Olivia%20Martinez> <http://example.com/employee> "Negotiation" .
+<http://example.org/Sarah%20Lee> <http://example.com/employee> "Copywriting" .
+<http://example.org/Sarah%20Lee> <http://example.com/employee> "Google Ads" .
+<http://example.org/Sarah%20Lee> <http://example.com/employee> "SEO" .
+<http://example.org/Sophia%20White> <http://example.com/employee> "Data Analysis" .
+<http://example.org/Sophia%20White> <http://example.com/employee> "R" .
+<http://example.org/Sophia%20White> <http://example.com/employee> "SQL" .
+
+
+

36. RMLTTC0000

+

Title: Default target

+

Description: Test exporting all triples to the default Target when not Targets are specified.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+      rml:encoding rml:UTF-8
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+

Output

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

37. RMLTTC0001a

+

Title: Single Target: Subject Map

+

Description: Test exporting all triples to a single Target with a given subject.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

38. RMLTTC0001b

+

Title: Single Target: Predicate Map

+

Description: Test exporting all triples to a single Target with a given predicate.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

39. RMLTTC0001c

+

Title: Single Target: Object Map

+

Description: Test exporting all triples to a single Target with a given object reference.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

40. RMLTTC0001d

+

Title: Single Target: Graph Map

+

Description: Test exporting all triples within a named graph to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

41. RMLTTC0001e

+

Title: Single Target: Language Map

+

Description: Test exporting all triples with a given language tag to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

42. RMLTTC0001f

+

Title: Single Target: Datatype Map

+

Description: Test exporting all triples with a given datatype to a single Target.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+
+

43. RMLTTC0002a

+

Title: Multiple Targets: Same Term Map

+

Description: Test exporting all triples to multiple Targets in the same Term Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

44. RMLTTC0002b

+

Title: Multiple Targets: Subject Map and Predicate Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Predicate Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

45. RMLTTC0002c

+

Title: Multiple Targets: Subject Map and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

46. RMLTTC0002d

+

Title: Multiple Targets: Predicate Map and Object Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

47. RMLTTC0002e

+

Title: Multiple Targets: Subject Map, Predicate Map, and Object Map

+

Description: Test exporting all triples to a Target in a Subject Map, a Target in a Predicate Map, and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump3>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump3> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump3.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

48. RMLTTC0002f

+

Title: Multiple Targets: Subject Map and Graph Map

+

Description: Test exporting all triples to a Target in a Subject Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

49. RMLTTC0002g

+

Title: Multiple Targets: Predicate Map and Graph Map

+

Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

50. RMLTTC0002h

+

Title: Multiple Targets: Object Map and Graph Map

+

Description: Test exporting all triples to a Target in a Object Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
+
+
+

51. RMLTTC0002i

+

Title: Multiple Targets: Language Map and Graph Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

52. RMLTTC0002j

+

Title: Multiple Targets: Language Map and Object Map

+

Description: Test exporting all triples to a Target in a Language Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+
+

53. RMLTTC0002k

+

Title: Multiple Targets: Datatype Map and Graph Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Graph Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph; 
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
+
+
+

54. RMLTTC0002l

+

Title: Multiple Targets: Datatype Map and Object Map

+

Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Object Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

55. RMLTTC0002m

+

Title: Multiple Targets: Multiple Predicate Maps

+

Description: Test exporting all triples to Targets in multiple Predicate Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

56. RMLTTC0002n

+

Title: Multiple Targets: Multiple Object Maps

+

Description: Test exporting all triples to Targets in multiple Object Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

57. RMLTTC0002o

+

Title: Multiple Targets: Multiple Graph Maps

+

Description: Test exporting all triples to Targets in multiple Graph Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix dcat: <http://www.w3.org/ns/dcat#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph1;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+    rml:graphMap [ a rml:GraphMap;
+      rml:constant ex:PeopleGraph2;
+      rml:logicalTarget <#TargetDump2>;
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph1>.
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph1> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph1> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph1> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph1> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph1> .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph2> .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph2> .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph2> .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph2> .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph2> .
+
+
+

58. RMLTTC0002p

+

Title: Multiple Targets: Multiple Language Maps

+

Description: Test exporting all triples to Targets in multiple Language Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "en";
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+      rml:languageMap [ a rml:LanguageMap;
+        rml:constant "nl";
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@nl .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@nl .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@nl .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@nl .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@nl .
+
+
+

59. RMLTTC0002q

+

Title: Multiple Targets: Multiple Datatype Maps

+

Description: Test exporting all triples to Targets in multiple Datatype Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:integer;
+        rml:logicalTarget <#TargetDump1>;
+      ];
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+      rml:datatypeMap [ a rml:DatatypeMap;
+        rml:constant xsd:double;
+        rml:logicalTarget <#TargetDump2>;
+      ];
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#double>.
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#double>.
+
+
+

60. RMLTTC0002r

+

Title: Multiple Targets: Multiple Term Maps with same Target

+

Description: Test exporting all triples to same Target in multiple Term Maps.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+      rml:logicalTarget <#TargetDump1>;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

61. RMLTTC0003a

+

Title: Overriding Targets: Seperate Triples Map

+

Description: Test exporting some triples to a different Target with a separate Triples Map.

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump2>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+<#TargetDump2> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump2.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+

Output 3

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

62. RMLTTC0004a

+

Title: Target JSON-LD

+

Description: Test export all triples as JSON-LD

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.jsonld";
+  ];
+  rml:serialization formats:JSON-LD;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+  "@context": { 
+    "foaf": "http://xmlns.com/foaf/0.1/"
+  },
+  "@graph": [
+    {                                                                                
+
+      "@id": "http://example.org/0",
+      "foaf:name": "Monica Geller",
+      "foaf:age": "33"
+    },
+    {                                                                                
+      "@id": "http://example.org/1",
+      "foaf:name": "Rachel Green",
+      "foaf:age": "34"
+    },
+    {                                                                                
+      "@id": "http://example.org/2",
+      "foaf:name": "Joey Tribbiani",
+      "foaf:age": "35"
+    },
+    {                                                                                
+      "@id": "http://example.org/3",
+      "foaf:name": "Chandler Bing",
+      "foaf:age": "36"
+    },
+      {                                                                                
+      "@id": "http://example.org/4",
+      "foaf:name": "Ross Geller",
+      "foaf:age": "37"
+    }
+  ]
+}
+
+
+

63. RMLTTC0004b

+

Title: Target N3

+

Description: Test export all triples as N3

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.n3";
+  ];
+  rml:serialization formats:N3;
+.
+
+

Output 1

+

+
+

Output 2

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix ex: <http://example.org/> .
+ex:0 <foaf:age> "33" ;
+     <foaf:name> "Monica Geller" .
+ex:1 <foaf:age> "34" ;
+     <foaf:name> "Rachel Green" .
+ex:2 <foaf:age> "35" ;
+     <foaf:name> "Joey Tribbiani" .
+ex:3 <foaf:age> "36" ;
+     <foaf:name> "Chandler Bing" .
+ex:4 <foaf:age> "37" ;
+     <foaf:name> "Ross Geller" .
+
+
+

64. RMLTTC0004c

+

Title: Target N-Triples

+

Description: Test export all triples as N-Triples

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nt";
+  ];
+  rml:serialization formats:N-Triples;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

65. RMLTTC0004d

+

Title: Target N-Quads

+

Description: Test export all triples as N-Quads

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

66. RMLTTC0004e

+

Title: Target RDF/JSON

+

Description: Test export all triples as RDF/JSON

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.rdfjson";
+  ];
+  rml:serialization formats:RDF_JSON;
+.
+
+

Output 1

+

+
+

Output 2

+
{
+    "http://example.org/0" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "33" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Monica Geller" } ]
+    },
+    "http://example.org/1" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "34" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Rachel Green" } ]
+    },
+    "http://example.org/2" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "35" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Joey Tribbiani" } ]
+    },
+    "http://example.org/3" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "36" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Chandler Bing" } ]
+    },
+    "http://example.org/4" : {
+        "http://xmlns.com/foaf/0.1/age" : [ { "value" : "37" } ],
+        "http://xmlns.com/foaf/0.1/name" : [ { "value" : "Ross Geller" } ]
+    }
+}
+
+
+

67. RMLTTC0004f

+

Title: Target RDF/XML

+

Description: Test export all triples as RDF/XML

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.rdfxml";
+  ];
+  rml:serialization formats:RDF_XML;
+.
+
+

Output 1

+

+
+

Output 2

+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+  xmlns:foaf="http://xmlns.com/foaf/0.1/">
+  <rdf:Description rdf:about="http://example.org/0">
+    <foaf:age>33</foaf:age>
+    <foaf:name>Monica Geller</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/1">
+    <foaf:age>34</foaf:age>
+    <foaf:name>Rachel Green</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/2">
+    <foaf:age>35</foaf:age>
+    <foaf:name>Joey Tribbiani</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/3">
+    <foaf:age>36</foaf:age>
+    <foaf:name>Chandler Bing</foaf:name>
+  </rdf:Description>
+  <rdf:Description rdf:about="http://example.org/4">
+    <foaf:age>37</foaf:age>
+    <foaf:name>Ross Geller</foaf:name>
+  </rdf:Description>
+</rdf:RDF>
+
+
+

68. RMLTTC0004g

+

Title: Target Turtle

+

Description: Test export all triples as Turtle

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.ttl";
+  ];
+  rml:serialization formats:Turtle;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+
+
+

69. RMLTTC0005a

+

Title: Target UTF-8

+

Description: Test export all triples with UTF-8 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-8;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

70. RMLTTC0005b

+

Title: Target UTF-16

+

Description: Test export all triples with UTF-16 encoding

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:encoding rml:UTF-16;
+.
+
+

Output 1

+

+
+

Output 2

+
��<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+
+

71. RMLTTC0006a

+

Title: Target no compression

+

Description: Test export all triples with no compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+

72. RMLTTC0006b

+

Title: Target GZip compression

+

Description: Test export all triples with GZip compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.gz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:gzip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.gz

+
+

73. RMLTTC0006c

+

Title: Target Zip compression

+

Description: Test export all triples with ZIP compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.zip";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:zip;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.zip

+
+

74. RMLTTC0006d

+

Title: Target TarXz compression

+

Description: Test export all triples with TarXZ compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@prefix ex: <http://example.org/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.tar.xz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:tarxz;
+.
+
+

Output 1

+

+
+

Output 2 + dump1.nq.tar.xz

+
+

75. RMLTTC0006e

+

Title: Target TarGzip compression

+

Description: Test export all triples with TarGZip compression

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq.tar.gz";
+  ];
+  rml:serialization formats:N-Quads;
+  rml:compression rml:targz;
+.
+
+

Output 1

+

+
+

Output 2

+
����j�0�\�)B -�ҋ��0�����j &N-�o?�޸9�l��	ϟ1���%��D/UjX�6��@F*%R�H('�$B�O)�➥&��
+�$�:�����jWv]�ȹ��v����bO�ח���e�⧠O\0�ua�t��~������LӃq�4s��j]z���8zh��s��%5�u��K0W�����jo�F�K����c��R��?�d}17I-�]���%�����۷�o�M��((
+
+
+

76. RMLTTC0007a

+

Title: Target with FilePath description

+

Description: Test export all triples to a target with File path access description

+

Error expected? No

+

Input

+
[
+  { 
+    "id": 0,
+    "name": "Monica Geller",
+    "age": 33
+  },
+  { 
+    "id": 1,
+    "name": "Rachel Green",
+    "age": 34
+  },
+  { 
+    "id": 2,
+    "name": "Joey Tribbiani",
+    "age": 35
+  },
+  { 
+    "id": 3,
+    "name": "Chandler Bing",
+    "age": 36
+  },
+  { 
+    "id": 4,
+    "name": "Ross Geller",
+    "age": 37
+  }
+]
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix formats: <http://www.w3.org/ns/formats/> .
+@base <http://example.com/rules/> .
+
+<#TriplesMap> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+    rml:source [ a rml:FilePath;
+      rml:root rml:MappingDirectory;
+      rml:path "Friends.json";
+    ];
+    rml:referenceFormulation rml:JSONPath;
+    rml:iterator "$[*]";
+  ];
+  rml:subjectMap [ a rml:SubjectMap;
+    rml:template "http://example.org/{$.id}";
+    rml:logicalTarget <#TargetDump1>;
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:name;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.name";
+    ];
+  ];
+  rml:predicateObjectMap [ a rml:PredicateObjectMap;
+    rml:predicateMap [ a rml:PredicateMap;
+      rml:constant foaf:age;
+    ];
+    rml:objectMap [ a rml:ObjectMap;
+      rml:reference "$.age";
+    ];
+  ];
+.
+
+<#TargetDump1> a rml:LogicalTarget;
+  rml:target [ a rml:Target, rml:FilePath;
+    rml:root rml:CurrentWorkingDirectory;
+    rml:path "./dump1.nq";
+  ];
+  rml:serialization formats:N-Quads;
+.
+
+

Output 1

+

+
+

Output 2

+
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
+<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
+<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
+<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
+<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
+<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-io/list.sh b/src/test/resources/rml-io/list.sh new file mode 100755 index 00000000..12c32031 --- /dev/null +++ b/src/test/resources/rml-io/list.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +for i in RML*; do + echo "
" +done diff --git a/src/test/resources/rml-io/make-metadata.py b/src/test/resources/rml-io/make-metadata.py new file mode 100755 index 00000000..1b386867 --- /dev/null +++ b/src/test/resources/rml-io/make-metadata.py @@ -0,0 +1,210 @@ +#!/usr/bin/env python3 + +import os +import sys +import glob +import csv + +def get_title_description(testcase: str): + with open ('descriptions.csv') as csvfile: + reader = csv.reader(csvfile) + for row in reader: + if row[0] == testcase: + return row[1], row[2] + +def main(spec: str): + with open ('metadata.csv', 'w', newline='') as csvfile: + writer = csv.writer(csvfile) + writer.writerow(['ID', 'title', 'description', 'specification', + 'mapping', 'input_format1', 'input_format2', + 'input_format3', 'output_format1', 'output_format2', + 'output_format3', 'input1', 'input2', 'input3', + 'output1', 'output2', 'output3', 'error']) + for testcase in glob.glob('RML*'): + print(testcase) + title, description = get_title_description(testcase) + error = 'false' + input1 = '' + input2 = '' + input3 = '' + input_format1 = '' + input_format2 = '' + input_format3 = '' + output1 = '' + output2 = '' + output3 = '' + output_format1 = '' + output_format2 = '' + output_format3 = '' + + # Input file + if os.path.exists(os.path.join(testcase, 'Friends.json')): + input1 = 'Friends.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'Friends-UTF16.json')): + input1 = 'Friends-UTF16.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'Friends.json.gz')): + input1 = 'Friends.json.gz' + input_format1 = 'application/gzip+json' + elif os.path.exists(os.path.join(testcase, 'Friends.json.zip')): + input1 = 'Friends.json.zip' + input_format1 = 'application/gzip+json' + elif os.path.exists(os.path.join(testcase, 'Friends.json.tar.xz')): + input1 = 'Friends.json.tar.xz' + input_format1 = 'application/tarxz+json' + elif os.path.exists(os.path.join(testcase, 'Friends.json.tar.gz')): + input1 = 'Friends.json.tar.gz' + input_format1 = 'application/targz+json' + elif os.path.exists(os.path.join(testcase, 'Friends-NULL.csv')): + input1 = 'Friends-NULL.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'Friends-NULL2.csv')): + input1 = 'Friends-NULL2.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'Friends.nt')): + input1 = 'Friends.nt' + input_format1 = 'application/n-triples' + elif os.path.exists(os.path.join(testcase, 'Friends.csv')): + input1 = 'Friends.csv' + input_format1 = 'text/csv' + elif os.path.exists(os.path.join(testcase, 'Friends.json')): + input1 = 'Friends.json' + input_format1 = 'application/json' + elif os.path.exists(os.path.join(testcase, 'Friends.xml')): + input1 = 'Friends.xml' + input_format1 = 'text/xml' + else: + input1 = f'http://w3id.org/rml/resources/rml-io/{testcase}/Friends.json' + input_format1 = 'application/json' + + # Mapping file + if os.path.exists(os.path.join(testcase, 'mapping.ttl')): + mapping_file = 'mapping.ttl' + else: + raise ValueError('Mapping file missing!') + + # Output files + if os.path.exists(os.path.join(testcase, 'default.nq')): + output1 = 'default.nq' + output_format1 = 'application/n-quads' + else: + error = 'true' + + if os.path.exists(os.path.join(testcase, 'dump1.nq')): + output2 = 'dump1.nq' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nt')): + output2 = 'dump1.nt' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.n3')): + output2 = 'dump1.n3' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.jsonld')): + output2 = 'dump1.jsonld' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.rdfjson')): + output2 = 'dump1.rdfjson' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.rdfxml')): + output2 = 'dump1.rdfxml' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.ttl')): + output2 = 'dump1.ttl' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nq.gz')): + output2 = 'dump1.nq.gz' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nq.zip')): + output2 = 'dump1.nq.zip' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nq.tar.xz')): + output2 = 'dump1.nq.tar.xz' + output_format2 = 'application/n-quads' + elif os.path.exists(os.path.join(testcase, 'dump1.nq.tar.gz')): + output2 = 'dump1.nq.tar.gz' + output_format2 = 'application/n-quads' + + if os.path.exists(os.path.join(testcase, 'dump2.nq')): + output3 = 'dump2.nq' + output_format3 = 'application/n-quads' + + writer.writerow([testcase, title, description, spec, mapping_file, + input_format1, input_format2, input_format3, + output_format1, output_format2, output_format3, + input1, input2, input3, output1, output2, + output3, error]) + lines = [] + # Title and description + lines.append(f'## {testcase}\n\n') + lines.append(f'**Title**: {title}\n\n') + lines.append(f'**Description**: {description}\n\n') + if error == 'true': + error_html = 'Yes' + else: + error_html = 'No' + lines.append(f'**Error expected?** {error_html}\n\n') + + # Input + inputCount = '' + + for index, i in enumerate([input1, input2, input3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + input_html = f'**Input{inputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + input_html = f'**Input{inputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeError: + input_html = f'**Input{inputCount}**\n `{i}`\n\n' + + lines.append(input_html) + inputCount = f' {index + 1}' + + # Mapping + with open(os.path.join(testcase, mapping_file)) as f: + mapping_html = f'**Mapping**\n```\n{f.read()}\n```\n\n' + lines.append(mapping_html) + + # Output + outputCount = '' + if output2 or output3: + outputCount = ' 1' + + for index, i in enumerate([output1, output2, output3]): + if not i: + break + + if 'http://w3id.org/rml/resources' in i: + output_html = f'**Output{outputCount}**\n [{i}]({i})\n\n' + else: + try: + with open(os.path.join(testcase, i)) as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + try: + with open(os.path.join(testcase, i), encoding='utf-16') as f: + output_html = f'**Output{outputCount}**\n```\n{f.read()}\n```\n\n' + except UnicodeDecodeError: + output_html = f'**Output{outputCount}**\n `{i}`\n\n' + + lines.append(output_html) + outputCount = f' {index + 2}' + + + with open(os.path.join(testcase, 'README.md'), 'w') as f: + f.writelines(lines) + + +if __name__ == '__main__': + if len(sys.argv) != 2: + print('Usage: ./make-metadata.py ') + sys.exit(1) + main(sys.argv[1]) diff --git a/src/test/resources/rml-io/manifest.rml.ttl b/src/test/resources/rml-io/manifest.rml.ttl new file mode 100644 index 00000000..3f5dfbbd --- /dev/null +++ b/src/test/resources/rml-io/manifest.rml.ttl @@ -0,0 +1,267 @@ +@prefix xsd: . +@prefix dcterms: . +@prefix rml: . +@prefix rmltest: . +@prefix test: . +@base . + +# java -jar .\burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/io/test/ + +_:source + rml:source [ + a rml:RelativePathSource ; + rml:path "metadata.csv" ; + rml:null ""; + ]; + rml:referenceFormulation rml:CSV; +. + +<#TriplesMapTestcase> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:reference "ID"; + rml:class test:TestCase; + ]; + + rml:predicateObjectMap [ + rml:predicate dcterms:identifier; + rml:objectMap [ + rml:reference "ID"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:hasError; + rml:objectMap [ + rml:reference "error"; + rml:datatype xsd:boolean; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:mappingDocument; + rml:objectMap [ + rml:reference "mapping"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapInput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput1>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput2>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ a rml:RefObjectMap; + rml:parentTriplesMap <#TriplesMapOutput3>; + rml:joinCondition [ + rml:child "ID"; + rml:parent "ID"; + ]; + ]; + ]; +. + +<#TriplesMapInput1> + a rml:TriplesMap; + + rml:logicalSource _:source ; + + rml:subjectMap [ + rml:template "{ID}/input/{input1}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format1"; + ]; + ]; +. + +<#TriplesMapInput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input2}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format2"; + ]; + ]; +. + +<#TriplesMapInput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/input/{input3}"; + rml:class rmltest:Input; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:input; + rml:objectMap [ + rml:reference "input3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:inputFormat; + rml:objectMap [ + rml:reference "input_format3"; + ]; + ]; +. + +<#TriplesMapOutput1> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output1}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output1"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format1"; + ]; + ]; +. + +<#TriplesMapOutput2> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output2}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output2"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format2"; + ]; + ]; +. + +<#TriplesMapOutput3> + a rml:TriplesMap; + + rml:logicalSource _:source; + + rml:subjectMap [ + rml:template "{ID}/output/{output3}"; + rml:class rmltest:Output; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:output; + rml:objectMap [ + rml:reference "output3"; + ]; + ]; + + rml:predicateObjectMap [ + rml:predicate rmltest:outputFormat; + rml:objectMap [ + rml:reference "output_format3"; + ]; + ]; +. + diff --git a/src/test/resources/rml-io/manifest.ttl b/src/test/resources/rml-io/manifest.ttl new file mode 100644 index 00000000..2eb9a286 --- /dev/null +++ b/src/test/resources/rml-io/manifest.ttl @@ -0,0 +1,1096 @@ + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0001a" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends-UTF16.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0001b" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0002a" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json.gz" . + "application/gzip+json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0002b" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json.zip" . + "application/gzip+json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0002c" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json.tar.xz" . + "application/tarxz+json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0002d" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json.tar.gz" . + "application/targz+json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0002e" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.nt" . + "application/n-triples" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0003" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends-NULL.csv" . + "text/csv" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0004a" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends-NULL.csv" . + "text/csv" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0004b" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends-NULL.csv" . + "text/csv" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0004c" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.csv" . + "text/csv" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0006a" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.csv" . + "text/csv" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0006b" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0007a" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.csv" . + "text/csv" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0007b" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.xml" . + "text/xml" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0007c" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.xml" . + "text/xml" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0007d" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0008a" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0008b" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.csv" . + "text/csv" . + . + "RMLSTC0009a" . + "true"^^ . + . + "mapping.ttl" . + . + "Friends.csv" . + "text/csv" . + . + "RMLSTC0010a" . + "true"^^ . + . + "mapping.ttl" . + . + "Friends.csv" . + "text/csv" . + . + "RMLSTC0010b" . + "true"^^ . + . + "mapping.ttl" . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0011a/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0011a" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0011b/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0011b" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0011c/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0011c" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0011d/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0011d" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0011e/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0011e" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0012a/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0012a" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0012b/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0012b" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0012c/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0012c" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0012d/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0012d" . + "false"^^ . + . + "mapping.ttl" . + . + . + "http://w3id.org/rml/resources/rml-io/RMLSTC0012e/Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLSTC0012e" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "RMLTTC0000" . + "false"^^ . + . + "mapping.ttl" . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0001a" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0001b" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0001c" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0001d" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0001e" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0001f" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002a" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002b" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002c" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002d" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002e" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002f" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002g" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002h" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002i" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002j" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002k" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002l" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002m" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002n" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002o" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002p" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0002q" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0002r" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "dump2.nq" . + "application/n-quads" . + . + "RMLTTC0003a" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.jsonld" . + "application/n-quads" . + . + "RMLTTC0004a" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.n3" . + "application/n-quads" . + . + "RMLTTC0004b" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nt" . + "application/n-quads" . + . + "RMLTTC0004c" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0004d" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.rdfjson" . + "application/n-quads" . + . + "RMLTTC0004e" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.rdfxml" . + "application/n-quads" . + . + "RMLTTC0004f" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.ttl" . + "application/n-quads" . + . + "RMLTTC0004g" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0005a" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0005b" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0006a" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq.gz" . + "application/n-quads" . + . + "RMLTTC0006b" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq.zip" . + "application/n-quads" . + . + "RMLTTC0006c" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq.tar.xz" . + "application/n-quads" . + . + "RMLTTC0006d" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq.tar.gz" . + "application/n-quads" . + . + "RMLTTC0006e" . + "false"^^ . + . + "mapping.ttl" . + . + . + . + "Friends.json" . + "application/json" . + . + "default.nq" . + "application/n-quads" . + . + "dump1.nq" . + "application/n-quads" . + . + "RMLTTC0007a" . + "false"^^ . + . + "mapping.ttl" . + . + . + . diff --git a/src/test/resources/rml-io/metadata.csv b/src/test/resources/rml-io/metadata.csv new file mode 100644 index 00000000..c89d031e --- /dev/null +++ b/src/test/resources/rml-io/metadata.csv @@ -0,0 +1,74 @@ +ID,title,description,specification,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error +RMLSTC0001a,Source with UTF-8 encoding,Test source with UTF-8 encoding,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,default.nq,,,false +RMLSTC0001b,Source with UTF-16 encoding,Test source with UTF-16 encoding,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,Friends-UTF16.json,,,default.nq,,,false +RMLSTC0002a,Source no compression,Test source without compression,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,default.nq,,,false +RMLSTC0002b,Source GZip compression,Test source with GZip compression,http://w3id.org/rml/io/,mapping.ttl,application/gzip+json,,,application/n-quads,,,Friends.json.gz,,,default.nq,,,false +RMLSTC0002c,Source Zip compression,Test source with ZIP compression,http://w3id.org/rml/io/,mapping.ttl,application/gzip+json,,,application/n-quads,,,Friends.json.zip,,,default.nq,,,false +RMLSTC0002d,Source TarXz compression,Test source with TarXZ compression,http://w3id.org/rml/io/,mapping.ttl,application/tarxz+json,,,application/n-quads,,,Friends.json.tar.xz,,,default.nq,,,false +RMLSTC0002e,Source TarGzip compression,Test source with TarGZip compression,http://w3id.org/rml/io/,mapping.ttl,application/targz+json,,,application/n-quads,,,Friends.json.tar.gz,,,default.nq,,,false +RMLSTC0003,Source with query,Test source which requires a query,http://w3id.org/rml/io/,mapping.ttl,application/n-triples,,,application/n-quads,,,Friends.nt,,,default.nq,,,false +RMLSTC0004a,Source with default NULL values,Test source with default NULL values,http://w3id.org/rml/io/,mapping.ttl,text/csv,,,application/n-quads,,,Friends-NULL.csv,,,default.nq,,,false +RMLSTC0004b,Source with one NULL value,Test source with one NULL value defined,http://w3id.org/rml/io/,mapping.ttl,text/csv,,,application/n-quads,,,Friends-NULL.csv,,,default.nq,,,false +RMLSTC0004c,Source with multiple NULL values,Test source with multiple NULL values defined,http://w3id.org/rml/io/,mapping.ttl,text/csv,,,application/n-quads,,,Friends-NULL.csv,,,default.nq,,,false +RMLSTC0006a,Source with D2RQ access description,Test source with D2RQ access description for SQL databases,http://w3id.org/rml/io/,mapping.ttl,text/csv,,,application/n-quads,,,Friends.csv,,,default.nq,,,false +RMLSTC0006b,Source with a Relative Path Source,Test access to a file,http://w3id.org/rml/io/,mapping.ttl,text/csv,,,application/n-quads,,,Friends.csv,,,default.nq,,,false +RMLSTC0007a,Source with JSONPath reference formulation,Test source with JSONPath reference formulation,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,default.nq,,,false +RMLSTC0007b,Source with CSV reference formulation,Test source with Tabular reference formulation,http://w3id.org/rml/io/,mapping.ttl,text/csv,,,application/n-quads,,,Friends.csv,,,default.nq,,,false +RMLSTC0007c,Source with XPath reference formulation,Test source with XPath reference formulation,http://w3id.org/rml/io/,mapping.ttl,text/xml,,,application/n-quads,,,Friends.xml,,,default.nq,,,false +RMLSTC0007d,Source with XPath reference formulation with namespaces,Test source with XPath reference formulation with namespaces,http://w3id.org/rml/io/,mapping.ttl,text/xml,,,application/n-quads,,,Friends.xml,,,default.nq,,,false +RMLSTC0008a,Multiple sources of same type,Tests the generation of all triples from multiple homogeneous sources ,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,default.nq,,,false +RMLSTC0008b,Multiple sources of different type,Tests the generation of all triples from multiple heterogeneous sources ,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,default.nq,,,false +RMLSTC0009a,Source with quoted columns,Tests the generation of triples where columns are quoted,http://w3id.org/rml/io/,mapping.ttl,text/csv,,,,,,Friends.csv,,,,,,true +RMLSTC0010a,"Invalid CSV source, reference to invalid column",Tests the identification of invalid CSV sources,http://w3id.org/rml/io/,mapping.ttl,text/csv,,,,,,Friends.csv,,,,,,true +RMLSTC0010b,"Invalid CSV source, no reference to invalid column","Tests the identification of invalid CSV sources, even when all columns referenced are valid",http://w3id.org/rml/io/,mapping.ttl,text/csv,,,,,,Friends.csv,,,,,,true +RMLSTC0011a,Complex JSON source,Tests the generation of triples from complex JSON sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0011a/Friends.json,,,default.nq,,,false +RMLSTC0011b,Complex JSON source,Tests the generation of triples from complex JSON sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0011b/Friends.json,,,default.nq,,,false +RMLSTC0011c,Complex JSON source,Tests the generation of triples from complex JSON sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0011c/Friends.json,,,default.nq,,,false +RMLSTC0011d,Complex JSON source,Tests the generation of triples from complex JSON sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0011d/Friends.json,,,default.nq,,,false +RMLSTC0011e,Complex JSON source,Tests the generation of triples from complex JSON sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0011e/Friends.json,,,default.nq,,,false +RMLSTC0012a,Complex XML source,Tests the generation of triples from complex XML sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0012a/Friends.json,,,default.nq,,,false +RMLSTC0012b,Complex XML source,Tests the generation of triples from complex XML sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0012b/Friends.json,,,default.nq,,,false +RMLSTC0012c,Complex XML source,Tests the generation of triples from complex XML sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0012c/Friends.json,,,default.nq,,,false +RMLSTC0012d,Complex XML source,Tests the generation of triples from complex XML sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0012d/Friends.json,,,default.nq,,,false +RMLSTC0012e,Complex XML source,Tests the generation of triples from complex XML sources,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,http://w3id.org/rml/resources/rml-io/RMLSTC0012e/Friends.json,,,default.nq,,,false +RMLTTC0000,Default target,Test exporting all triples to the default Target when not Targets are specified.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,,,Friends.json,,,default.nq,,,false +RMLTTC0001a,Single Target: Subject Map,Test exporting all triples to a single Target with a given subject.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0001b,Single Target: Predicate Map,Test exporting all triples to a single Target with a given predicate.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0001c,Single Target: Object Map,Test exporting all triples to a single Target with a given object reference.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0001d,Single Target: Graph Map,Test exporting all triples within a named graph to a single Target.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0001e,Single Target: Language Map,Test exporting all triples with a given language tag to a single Target.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0001f,Single Target: Datatype Map,Test exporting all triples with a given datatype to a single Target.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0002a,Multiple Targets: Same Term Map,Test exporting all triples to multiple Targets in the same Term Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002b,Multiple Targets: Subject Map and Predicate Map,Test exporting all triples to a Target in a Subject Map and a Target in a Predicate Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002c,Multiple Targets: Subject Map and Object Map,Test exporting all triples to a Target in a Subject Map and a Target in a Object Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002d,Multiple Targets: Predicate Map and Object Map,Test exporting all triples to a Target in a Predicate Map and a Target in a Object Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002e,"Multiple Targets: Subject Map, Predicate Map, and Object Map","Test exporting all triples to a Target in a Subject Map, a Target in a Predicate Map, and a Target in a Object Map.",http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002f,Multiple Targets: Subject Map and Graph Map,Test exporting all triples to a Target in a Subject Map and a Target in a Graph Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002g,Multiple Targets: Predicate Map and Graph Map,Test exporting all triples to a Target in a Predicate Map and a Target in a Graph Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002h,Multiple Targets: Object Map and Graph Map,Test exporting all triples to a Target in a Object Map and a Target in a Graph Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002i,Multiple Targets: Language Map and Graph Map,Test exporting all triples to a Target in a Language Map and a Target in a Graph Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002j,Multiple Targets: Language Map and Object Map,Test exporting all triples to a Target in a Language Map and a Target in a Object Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002k,Multiple Targets: Datatype Map and Graph Map,Test exporting all triples to a Target in a Datatype Map and a Target in a Graph Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002l,Multiple Targets: Datatype Map and Object Map,Test exporting all triples to a Target in a Datatype Map and a Target in a Object Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002m,Multiple Targets: Multiple Predicate Maps,Test exporting all triples to Targets in multiple Predicate Maps.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002n,Multiple Targets: Multiple Object Maps,Test exporting all triples to Targets in multiple Object Maps.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002o,Multiple Targets: Multiple Graph Maps,Test exporting all triples to Targets in multiple Graph Maps.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002p,Multiple Targets: Multiple Language Maps,Test exporting all triples to Targets in multiple Language Maps.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002q,Multiple Targets: Multiple Datatype Maps,Test exporting all triples to Targets in multiple Datatype Maps.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0002r,Multiple Targets: Multiple Term Maps with same Target,Test exporting all triples to same Target in multiple Term Maps.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0003a,Overriding Targets: Seperate Triples Map,Test exporting some triples to a different Target with a separate Triples Map.,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,application/n-quads,Friends.json,,,default.nq,dump1.nq,dump2.nq,false +RMLTTC0004a,Target JSON-LD,Test export all triples as JSON-LD,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.jsonld,,false +RMLTTC0004b,Target N3,Test export all triples as N3,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.n3,,false +RMLTTC0004c,Target N-Triples,Test export all triples as N-Triples,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nt,,false +RMLTTC0004d,Target N-Quads,Test export all triples as N-Quads,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0004e,Target RDF/JSON,Test export all triples as RDF/JSON,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.rdfjson,,false +RMLTTC0004f,Target RDF/XML,Test export all triples as RDF/XML,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.rdfxml,,false +RMLTTC0004g,Target Turtle,Test export all triples as Turtle,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.ttl,,false +RMLTTC0005a,Target UTF-8,Test export all triples with UTF-8 encoding,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0005b,Target UTF-16,Test export all triples with UTF-16 encoding,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0006a,Target no compression,Test export all triples with no compression,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false +RMLTTC0006b,Target GZip compression,Test export all triples with GZip compression,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq.gz,,false +RMLTTC0006c,Target Zip compression,Test export all triples with ZIP compression,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq.zip,,false +RMLTTC0006d,Target TarXz compression,Test export all triples with TarXZ compression,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq.tar.xz,,false +RMLTTC0006e,Target TarGzip compression,Test export all triples with TarGZip compression,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq.tar.gz,,false +RMLTTC0007a,Target with FilePath description,Test export all triples to a target with File path access description,http://w3id.org/rml/io/,mapping.ttl,application/json,,,application/n-quads,application/n-quads,,Friends.json,,,default.nq,dump1.nq,,false diff --git a/src/test/resources/rml-io/section/abstract.md b/src/test/resources/rml-io/section/abstract.md new file mode 100644 index 00000000..5b514ad9 --- /dev/null +++ b/src/test/resources/rml-io/section/abstract.md @@ -0,0 +1 @@ +This document defines the RML-IO test cases to the determine the RML-IO specification conformance of tools. diff --git a/src/test/resources/rml-io/section/data-model.md b/src/test/resources/rml-io/section/data-model.md new file mode 100644 index 00000000..f4c3ad6a --- /dev/null +++ b/src/test/resources/rml-io/section/data-model.md @@ -0,0 +1,12 @@ +# Data model + +The test cases are semantically described for re-usability and shareability following the [W3C Test case description](https://www.w3.org/2006/03/test-description). +Each `test:Testcase` as the following properties: + +- `dcterms:identifier`: unique ID of the test case. +- `rmltest:hasError`: if an error of the RML Processor is expected or not. +- `rmltest:input`: One or more input data of the test case. +- `rmltest:output`: One or more output data of the test case. +- `rmltest:inputFormat`: the input data format. +- `rmltest:outputFormat`: the output data format. +- `rmltest:mappingDocument`: the RML mapping rules in Turtle. diff --git a/src/test/resources/rml-io/section/introduction.md b/src/test/resources/rml-io/section/introduction.md new file mode 100644 index 00000000..086c84b6 --- /dev/null +++ b/src/test/resources/rml-io/section/introduction.md @@ -0,0 +1,4 @@ +# Introduction + +This document defines the RML-IO test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-IO specification. diff --git a/src/test/resources/rml-io/section/test-cases.md b/src/test/resources/rml-io/section/test-cases.md new file mode 100644 index 00000000..5fd1ecfb --- /dev/null +++ b/src/test/resources/rml-io/section/test-cases.md @@ -0,0 +1,10 @@ +# Test cases + +This section describes the RML-IO test cases. These descriptions are also available as RDF. +The files are available on [GitHub](https://github.com/kg-construct/rml-io/tree/main/test-cases) in the folder `test-cases`. +Each test case is contained in a single folder, containing three types of files: + + - Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server. + - One file with the RML rules, called `mapping.ttl`, in the Turtle format. + - Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error. + diff --git a/src/test/resources/rml-lv/README.md b/src/test/resources/rml-lv/README.md new file mode 100644 index 00000000..57adbc3f --- /dev/null +++ b/src/test/resources/rml-lv/README.md @@ -0,0 +1,12 @@ +# RML LV test cases + +The test cases publication (html pages) can be generated as followed: + +1. Add the testcase description in `descriptions.csv` or fetch it from the [Google spreadsheet](https://docs.google.com/spreadsheets/d/1Ui216z2cF8bNAbdZvws-JoAhcjj4M2k_NlfzmCh1jh8/edit?gid=1769343477#gid=1769343477). +2. Navigate to folder ./test-cases +3. Execute the `make-metadata.py` script: `python3 make-metadata.py http://w3id.org/rml/lv/` + (This is based on the content of the folders with the test cases, and on the file descriptions.csv for the descriptions of the cases) +4. Download burp: `curl -LO https://github.com/kg-construct/BURP/releases/download/v0.1.1/burp.jar` +5. Generate the manifest with [Burp](https://github.com/kg-construct/BURP): `java -jar burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/lv/test/` +6. Run list.sh and insert output in dev.html +7. To publish the new HTML verson of the test cases, export `dev.html` as `index.html` in ./docs and in a subfolder with the date of the publication (maybe adapt the publication date) diff --git a/src/test/resources/rml-lv/RMLLVTC0002c/README.md b/src/test/resources/rml-lv/RMLLVTC0002c/README.md index f20e85bc..b81753d2 100644 --- a/src/test/resources/rml-lv/RMLLVTC0002c/README.md +++ b/src/test/resources/rml-lv/RMLLVTC0002c/README.md @@ -84,11 +84,6 @@ rml:fieldName "weight" ; rml:reference "$.weight" ; ]; - rml:field [ - a rml:ExpressionField ; - rml:fieldName "length" ; - rml:reference "$.length" ; - ] ] ; ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0002c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0002c/mapping.ttl index b77d1efc..01a2ad1b 100644 --- a/src/test/resources/rml-lv/RMLLVTC0002c/mapping.ttl +++ b/src/test/resources/rml-lv/RMLLVTC0002c/mapping.ttl @@ -35,11 +35,6 @@ rml:fieldName "weight" ; rml:reference "$.weight" ; ]; - rml:field [ - a rml:ExpressionField ; - rml:fieldName "length" ; - rml:reference "$.length" ; - ] ] ; ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0007b/README.md b/src/test/resources/rml-lv/RMLLVTC0007b/README.md index 095a1138..6b1c2d3c 100644 --- a/src/test/resources/rml-lv/RMLLVTC0007b/README.md +++ b/src/test/resources/rml-lv/RMLLVTC0007b/README.md @@ -43,7 +43,7 @@ bob,"{""type"":""flower"",""weight"":15}" rml:field [ a rml:IterableField ; rml:referenceFormulation rml:JSONPath ; - rml:iterator "$[*]" ; + rml:iterator "$" ; rml:fieldName "itemJson" ; rml:field [ a rml:ExpressionField; diff --git a/src/test/resources/rml-lv/RMLLVTC0007b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0007b/mapping.ttl index 16ced6c7..e984ea50 100644 --- a/src/test/resources/rml-lv/RMLLVTC0007b/mapping.ttl +++ b/src/test/resources/rml-lv/RMLLVTC0007b/mapping.ttl @@ -24,7 +24,7 @@ rml:field [ a rml:IterableField ; rml:referenceFormulation rml:JSONPath ; - rml:iterator "$[*]" ; + rml:iterator "$" ; rml:fieldName "itemJson" ; rml:field [ a rml:ExpressionField; diff --git a/src/test/resources/rml-lv/RMLLVTC0008b/README.md b/src/test/resources/rml-lv/RMLLVTC0008b/README.md index 6eb24bea..bfa0672a 100644 --- a/src/test/resources/rml-lv/RMLLVTC0008b/README.md +++ b/src/test/resources/rml-lv/RMLLVTC0008b/README.md @@ -4,7 +4,7 @@ **Description**: Test a cycle in two joins of two logical views -**Error expected?** No +**Error expected?** Yes **Input** ``` @@ -132,14 +132,3 @@ tobias,2005 ``` -**Output** -``` - "1995"^^ . - . - . - "1999"^^ . - . - "2005"^^ . - -``` - diff --git a/src/test/resources/rml-lv/config.js b/src/test/resources/rml-lv/config.js index 943d434e..7973ff32 100644 --- a/src/test/resources/rml-lv/config.js +++ b/src/test/resources/rml-lv/config.js @@ -76,6 +76,7 @@ var respecConfig = { date: "12 March 2024", }, }, + publishDate: "2025-08-05", otherLinks: [], shortName: "RML-LV-Testcases", specStatus: "CG-DRAFT", diff --git a/src/test/resources/rml-lv/descriptions.csv b/src/test/resources/rml-lv/descriptions.csv index b7c64242..f95d42af 100644 --- a/src/test/resources/rml-lv/descriptions.csv +++ b/src/test/resources/rml-lv/descriptions.csv @@ -1,41 +1,41 @@ -RML ID,Title,Purpose,"Error -expected?","Input -1","Input -2","Input -3","Output -default","Output -1","Output -2","Output -3",Comment -RMLLVTC0000a,Logical view on JSON source,Test a view on a hierarchical source,no,people.json,,,output.nq,,,, -RMLLVTC0000b,Logical view on CSV source,Test a view on a tabular source,no,people.csv,,,output.nq,,,, -RMLLVTC0000c,Logical View on Logical View,Test a view on a logical view,no,people.json,,,output.nq,,,, -RMLLVTC0001a,Expression Field: Reference,Test a reference in an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0001b,Expression Field: Template,Test a template in an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0001c,Expression Field: Constant,Test a constant expression in an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0001d,Expression Field Siblings,Test multiple expression fields with the same parent,no,people.json,,,output.nq,,,, -RMLLVTC0002a,Iterable Field,Test a nested field construction: iterable field with expression field as child,no,people.json,,,output.nq,,,, -RMLLVTC0002b,Iterable Field with Multiple Children,Test a nested field construction: iterable field with mulitple expression fields as children,no,people.json,,,output.nq,,,, -RMLLVTC0002c,Nested Iterable Fields,Test a nested field construction: iterable field with an iterable field as child,no,people.json,,,output.nq,,,, -RMLLVTC0003a,Index Key: #,Test a reference to the index key #,no,people.json,,,output.nq,,,, -RMLLVTC0003b,Index Key: Iterable Field,Test a reference to the index key of an iterable field,no,people.json,,,output.nq,,,, -RMLLVTC0003c,Index Key: Expression field,Test a reference to the index key of an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0004a,Natural Datatype: Index #,Test the natural datatype mapping for the index #,no,people.json,,,output.nq,,,, -RMLLVTC0004b,Natural Datatype: Index Expression Field,Test the natural datatype mapping for the index of an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0004c,Natural Datatype: Index Iterable Field,Test the natural datatype mapping for the index of an iterable field,no,people.json,,,output.nq,,,, -RMLLVTC0004d,Natural Datatype: Record Expression Field,Test the natural datatype mapping for a record of an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0005a,Referencing a Non-Existing Key,Test a reference to a non-existing key,yes,people.json,,,,,,, -RMLLVTC0005b,Referencing the Record Key ,Test a reference to the record key ,yes,people.json,,,,,,, -RMLLVTC0005c,Referencing the Record Key of an Iterable Field,Test a reference to the record key of an iterable field,yes,people.json,,,,,,, -RMLLVTC0006a,Left Join,Test a left join,no,people.json,people.csv,,output.nq,,,, -RMLLVTC0006b,Inner Join,Test an inner join,no,people.json,people.csv,,output.nq,,,, -RMLLVTC0006c,Two Left Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, -RMLLVTC0006d,Inner Join and Left Join,Test an inner join and a left join in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, -RMLLVTC0006e,Two Inner Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, -RMLLVTC0006f,Index Key of Field in Join,Test references to indexes of fields from a join,no,people.json,people.csv,,output.nq,,,, -RMLLVTC0007a,Change Reference Formulations: CSV including JSON array,Test a change of reference formulations: csv source including json array,no,people.csv,,,output.nq,,,, -RMLLVTC0007b,Change Reference Formulations: CSV including JSON object,Test a change of reference formulations: csv source including json object,no,people.csv,,,output.nq,,,, -RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of reference formulations: json source including csv data,no,people.json,,,output.nq,,,, -RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,yes,,,,,,,, -RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,yes,people.json,,,,,,, -RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,yes,people.json,people.csv,,,,,, \ No newline at end of file +RML ID,Title,Purpose,"Error +expected?","Input +1","Input +2","Input +3","Output +default","Output +1","Output +2","Output +3",Comment +RMLLVTC0000a,Logical view on JSON source,Test a view on a hierarchical source,no,people.json,,,output.nq,,,, +RMLLVTC0000b,Logical view on CSV source,Test a view on a tabular source,no,people.csv,,,output.nq,,,, +RMLLVTC0000c,Logical View on Logical View,Test a view on a logical view,no,people.json,,,output.nq,,,, +RMLLVTC0001a,Expression Field: Reference,Test a reference in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001b,Expression Field: Template,Test a template in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001c,Expression Field: Constant,Test a constant expression in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001d,Expression Field Siblings,Test multiple expression fields with the same parent,no,people.json,,,output.nq,,,, +RMLLVTC0002a,Iterable Field,Test a nested field construction: iterable field with expression field as child,no,people.json,,,output.nq,,,, +RMLLVTC0002b,Iterable Field with Multiple Children,Test a nested field construction: iterable field with mulitple expression fields as children,no,people.json,,,output.nq,,,, +RMLLVTC0002c,Nested Iterable Fields,Test a nested field construction: iterable field with an iterable field as child,no,people.json,,,output.nq,,,, +RMLLVTC0003a,Index Key: #,Test a reference to the index key #,no,people.json,,,output.nq,,,, +RMLLVTC0003b,Index Key: Iterable Field,Test a reference to the index key of an iterable field,no,people.json,,,output.nq,,,, +RMLLVTC0003c,Index Key: Expression field,Test a reference to the index key of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0004a,Natural Datatype: Index #,Test the natural datatype mapping for the index #,no,people.json,,,output.nq,,,, +RMLLVTC0004b,Natural Datatype: Index Expression Field,Test the natural datatype mapping for the index of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0004c,Natural Datatype: Index Iterable Field,Test the natural datatype mapping for the index of an iterable field,no,people.json,,,output.nq,,,, +RMLLVTC0004d,Natural Datatype: Record Expression Field,Test the natural datatype mapping for a record of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0005a,Referencing a Non-Existing Key,Test a reference to a non-existing key,yes,people.json,,,,,,, +RMLLVTC0005b,Referencing the Record Key ,Test a reference to the record key ,yes,people.json,,,,,,, +RMLLVTC0005c,Referencing the Record Key of an Iterable Field,Test a reference to the record key of an iterable field,yes,people.json,,,,,,, +RMLLVTC0006a,Left Join,Test a left join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0006b,Inner Join,Test an inner join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0006c,Two Left Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006d,Inner Join and Left Join,Test an inner join and a left join in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006e,Two Inner Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006f,Index Key of Field in Join,Test references to indexes of fields from a join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0007a,Change Reference Formulations: CSV including JSON array,Test a change of reference formulations: csv source including json array,no,people.csv,,,output.nq,,,, +RMLLVTC0007b,Change Reference Formulations: CSV including JSON object,Test a change of reference formulations: csv source including json object,no,people.csv,,,output.nq,,,, +RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of reference formulations: json source including csv data,no,people.json,,,output.nq,,,, +RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,yes,,,,,,,, +RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,yes,people.json,people.csv,,,,,, +RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,yes,people.json,people.csv,,,,,, diff --git a/src/test/resources/rml-lv/dev.html b/src/test/resources/rml-lv/dev.html index cb4a38a8..9868a5e3 100644 --- a/src/test/resources/rml-lv/dev.html +++ b/src/test/resources/rml-lv/dev.html @@ -127,6 +127,7 @@
+ diff --git a/src/test/resources/rml-lv/docs/20250508/index.html b/src/test/resources/rml-lv/docs/20250508/index.html new file mode 100644 index 00000000..70bbcb8a --- /dev/null +++ b/src/test/resources/rml-lv/docs/20250508/index.html @@ -0,0 +1,3529 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+ +
Authors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+
Feedback:
+ GitHub kg-construct/rml-lv + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0000a

+

Title: Logical view on JSON source

+

Description: Test a view on a hierarchical source

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0000b

+

Title: Logical view on CSV source

+

Description: Test a view on a tabular source

+

Error expected? No

+

Input

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+
+
+

6. RMLLVTC0000c

+

Title: Logical View on Logical View

+

Description: Test a view on a logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:jsonViewOnJsonView a rml:LogicalView ;
+  rml:viewOn :jsonView ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "newName" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonViewOnJsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

7. RMLLVTC0001a

+

Title: Expression Field: Reference

+

Description: Test a reference in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

8. RMLLVTC0001b

+

Title: Expression Field: Template

+

Description: Test a template in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "race" ;
+    rml:constant "human" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasRace ;
+    rml:objectMap [
+      rml:reference "race" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasRace> "human" .
+<http://example.org/person/bob> <http://example.org/hasRace> "human" .
+
+
+

9. RMLLVTC0001c

+

Title: Expression Field: Constant

+

Description: Test a constant expression in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "fullName" ;
+    rml:template "{name} {lastName}" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:reference "fullName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

10. RMLLVTC0001d

+

Title: Expression Field Siblings

+

Description: Test multiple expression fields with the same parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "lastName" ;
+    rml:reference "$.lastName" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:template "{name} {lastName}" ;
+      rml:termType rml:Literal ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

11. RMLLVTC0002a

+

Title: Iterable Field

+

Description: Test a nested field construction: iterable field with expression field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{item.type}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

12. RMLLVTC0002b

+

Title: Iterable Field with Multiple Children

+

Description: Test a nested field construction: iterable field with mulitple expression fields as children

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

13. RMLLVTC0002c

+

Title: Nested Iterable Fields

+

Description: Test a nested field construction: iterable field with an iterable field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "measures": {
+            "weight": 1500,
+            "length": 30
+          }
+        },
+        {
+          "type": "shield",
+          "measures": {
+            "weight": 2500
+          }
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "measures" : {
+            "weight": 15,
+            "length" : 15
+          }
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:IterableField ;
+      rml:fieldName "measures";
+      rml:iterator "$.measures";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+        ];
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "length" ;
+        rml:reference "$.length" ;
+      ]
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.measures.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

14. RMLLVTC0003a

+

Title: Index Key: #

+

Description: Test a reference to the index key #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

15. RMLLVTC0003b

+

Title: Index Key: Iterable Field

+

Description: Test a reference to the index key of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+
+

16. RMLLVTC0003c

+

Title: Index Key: Expression field

+

Description: Test a reference to the index key of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+

17. RMLLVTC0004a

+

Title: Natural Datatype: Index #

+

Description: Test the natural datatype mapping for the index #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

18. RMLLVTC0004b

+

Title: Natural Datatype: Index Expression Field

+

Description: Test the natural datatype mapping for the index of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

19. RMLLVTC0004c

+

Title: Natural Datatype: Index Iterable Field

+

Description: Test the natural datatype mapping for the index of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

20. RMLLVTC0004d

+

Title: Natural Datatype: Record Expression Field

+

Description: Test the natural datatype mapping for a record of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "birth_year": 1995
+    },
+    {
+      "name": "bob",
+      "birth_year": 1999
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "$.birth_year" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

21. RMLLVTC0005a

+

Title: Referencing a Non-Existing Key

+

Description: Test a reference to a non-existing key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{Name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "Name" ;
+    ] ;
+  ] .
+
+
+

22. RMLLVTC0005b

+

Title: Referencing the Record Key

+

Description: Test a reference to the record key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :isDerivedFrom ;
+    rml:objectMap [
+      rml:reference "<it>" ;
+    ] ;
+  ] .
+
+
+

23. RMLLVTC0005c

+

Title: Referencing the Record Key of an Iterable Field

+

Description: Test a reference to the record key of an iterable field

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/{item}" ;
+    ] ;
+  ] .
+
+
+

24. RMLLVTC0006a

+

Title: Left Join

+

Description: Test a left join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

25. RMLLVTC0006b

+

Title: Inner Join

+

Description: Test an inner join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

26. RMLLVTC0006c

+

Title: Two Left Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+<http://example.org/person/789> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

27. RMLLVTC0006d

+

Title: Inner Join and Left Join

+

Description: Test an inner join and a left join in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+
+
+

28. RMLLVTC0006e

+

Title: Two Inner Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+
+
+

29. RMLLVTC0006f

+

Title: Index Key of Field in Join

+

Description: Test references to indexes of fields from a join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+tobias,2005
+bob,1999
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{#}/item/{json_item.#}/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/0> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/0/sword> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/1/shield> .
+<http://example.org/person/2> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/2> <http://example.org/hasItem> <http://example.org/person/2/item/0/flower> .
+
+
+
+

30. RMLLVTC0007a

+

Title: Change Reference Formulations: CSV including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Input

+
name,items
+alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]"
+bob,"[{""type"":""flower"",""weight"":15}]"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

31. RMLLVTC0007b

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Input

+
name,item
+alice,"{""type"":""sword"",""weight"":1500}"
+alice,"{""type"":""shield"",""weight"":2500}"
+bob,"{""type"":""flower"",""weight"":15}"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

32. RMLLVTC0007c

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

33. RMLLVTC0008a

+

Title: Cycle: Abstract Logical Source

+

Description: Test a cycle in the abstract logical source of a logical view

+

Error expected? Yes

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:view1 a rml:LogicalView ;
+  rml:viewOn :view2 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name1" ;
+    rml:reference "name2" ;
+  ] .
+
+:view2 a rml:LogicalView ;
+  rml:viewOn :view1 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name2" ;
+    rml:reference "name1" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :view2 ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name2}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name2" ;
+    ] ;
+  ] .
+
+
+

34. RMLLVTC0008b

+

Title: Cycle: Joins

+

Description: Test a cycle in two joins of two logical views

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :csvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv_birthyear" ;
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+
+

35. RMLLVTC0008c

+

Title: Cycle: Self-Join

+

Description: Test a cycle in a join of a logical view: self-join

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "newName" ;
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+
+ + + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/docs/20250725/index.html b/src/test/resources/rml-lv/docs/20250725/index.html new file mode 100644 index 00000000..b0c480a5 --- /dev/null +++ b/src/test/resources/rml-lv/docs/20250725/index.html @@ -0,0 +1,3490 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+ +
Authors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+
Feedback:
+ GitHub kg-construct/rml-lv + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0000a

+

Title: Logical view on JSON source

+

Description: Test a view on a hierarchical source

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0000b

+

Title: Logical view on CSV source

+

Description: Test a view on a tabular source

+

Error expected? No

+

Input

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+
+
+

6. RMLLVTC0000c

+

Title: Logical View on Logical View

+

Description: Test a view on a logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:jsonViewOnJsonView a rml:LogicalView ;
+  rml:viewOn :jsonView ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "newName" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonViewOnJsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

7. RMLLVTC0001a

+

Title: Expression Field: Reference

+

Description: Test a reference in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

8. RMLLVTC0001b

+

Title: Expression Field: Template

+

Description: Test a template in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "race" ;
+    rml:constant "human" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasRace ;
+    rml:objectMap [
+      rml:reference "race" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasRace> "human" .
+<http://example.org/person/bob> <http://example.org/hasRace> "human" .
+
+
+

9. RMLLVTC0001c

+

Title: Expression Field: Constant

+

Description: Test a constant expression in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "fullName" ;
+    rml:template "{name} {lastName}" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:reference "fullName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

10. RMLLVTC0001d

+

Title: Expression Field Siblings

+

Description: Test multiple expression fields with the same parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "lastName" ;
+    rml:reference "$.lastName" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:template "{name} {lastName}" ;
+      rml:termType rml:Literal ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

11. RMLLVTC0002a

+

Title: Iterable Field

+

Description: Test a nested field construction: iterable field with expression field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{item.type}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

12. RMLLVTC0002b

+

Title: Iterable Field with Multiple Children

+

Description: Test a nested field construction: iterable field with mulitple expression fields as children

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

13. RMLLVTC0002c

+

Title: Nested Iterable Fields

+

Description: Test a nested field construction: iterable field with an iterable field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "measures": {
+            "weight": 1500,
+            "length": 30
+          }
+        },
+        {
+          "type": "shield",
+          "measures": {
+            "weight": 2500
+          }
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "measures" : {
+            "weight": 15,
+            "length" : 15
+          }
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:IterableField ;
+      rml:fieldName "measures";
+      rml:iterator "$.measures";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+        ];
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "length" ;
+        rml:reference "$.length" ;
+      ]
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.measures.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

14. RMLLVTC0003a

+

Title: Index Key: #

+

Description: Test a reference to the index key #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

15. RMLLVTC0003b

+

Title: Index Key: Iterable Field

+

Description: Test a reference to the index key of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+
+

16. RMLLVTC0003c

+

Title: Index Key: Expression field

+

Description: Test a reference to the index key of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+

17. RMLLVTC0004a

+

Title: Natural Datatype: Index #

+

Description: Test the natural datatype mapping for the index #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

18. RMLLVTC0004b

+

Title: Natural Datatype: Index Expression Field

+

Description: Test the natural datatype mapping for the index of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

19. RMLLVTC0004c

+

Title: Natural Datatype: Index Iterable Field

+

Description: Test the natural datatype mapping for the index of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

20. RMLLVTC0004d

+

Title: Natural Datatype: Record Expression Field

+

Description: Test the natural datatype mapping for a record of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "birth_year": 1995
+    },
+    {
+      "name": "bob",
+      "birth_year": 1999
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "$.birth_year" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

21. RMLLVTC0005a

+

Title: Referencing a Non-Existing Key

+

Description: Test a reference to a non-existing key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{Name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "Name" ;
+    ] ;
+  ] .
+
+
+

22. RMLLVTC0005b

+

Title: Referencing the Record Key

+

Description: Test a reference to the record key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :isDerivedFrom ;
+    rml:objectMap [
+      rml:reference "<it>" ;
+    ] ;
+  ] .
+
+
+

23. RMLLVTC0005c

+

Title: Referencing the Record Key of an Iterable Field

+

Description: Test a reference to the record key of an iterable field

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/{item}" ;
+    ] ;
+  ] .
+
+
+

24. RMLLVTC0006a

+

Title: Left Join

+

Description: Test a left join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

25. RMLLVTC0006b

+

Title: Inner Join

+

Description: Test an inner join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

26. RMLLVTC0006c

+

Title: Two Left Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+<http://example.org/person/789> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

27. RMLLVTC0006d

+

Title: Inner Join and Left Join

+

Description: Test an inner join and a left join in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+
+
+

28. RMLLVTC0006e

+

Title: Two Inner Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+
+
+

29. RMLLVTC0006f

+

Title: Index Key of Field in Join

+

Description: Test references to indexes of fields from a join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+tobias,2005
+bob,1999
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{#}/item/{json_item.#}/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/0> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/0/sword> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/1/shield> .
+<http://example.org/person/2> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/2> <http://example.org/hasItem> <http://example.org/person/2/item/0/flower> .
+
+
+
+

30. RMLLVTC0007a

+

Title: Change Reference Formulations: CSV including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Input

+
name,items
+alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]"
+bob,"[{""type"":""flower"",""weight"":15}]"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

31. RMLLVTC0007b

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Input

+
name,item
+alice,"{""type"":""sword"",""weight"":1500}"
+alice,"{""type"":""shield"",""weight"":2500}"
+bob,"{""type"":""flower"",""weight"":15}"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

32. RMLLVTC0007c

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

33. RMLLVTC0008a

+

Title: Cycle: Abstract Logical Source

+

Description: Test a cycle in the abstract logical source of a logical view

+

Error expected? Yes

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:view1 a rml:LogicalView ;
+  rml:viewOn :view2 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name1" ;
+    rml:reference "name2" ;
+  ] .
+
+:view2 a rml:LogicalView ;
+  rml:viewOn :view1 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name2" ;
+    rml:reference "name1" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :view2 ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name2}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name2" ;
+    ] ;
+  ] .
+
+
+

34. RMLLVTC0008b

+

Title: Cycle: Joins

+

Description: Test a cycle in two joins of two logical views

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :csvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv_birthyear" ;
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+
+

35. RMLLVTC0008c

+

Title: Cycle: Self-Join

+

Description: Test a cycle in a join of a logical view: self-join

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "newName" ;
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+
+ + + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/docs/20250805/index.html b/src/test/resources/rml-lv/docs/20250805/index.html new file mode 100644 index 00000000..c74314d0 --- /dev/null +++ b/src/test/resources/rml-lv/docs/20250805/index.html @@ -0,0 +1,3524 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+ +
Authors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+
Feedback:
+ GitHub kg-construct/rml-lv + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0000a

+

Title: Logical view on JSON source

+

Description: Test a view on a hierarchical source

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0000b

+

Title: Logical view on CSV source

+

Description: Test a view on a tabular source

+

Error expected? No

+

Input

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+
+
+

6. RMLLVTC0000c

+

Title: Logical View on Logical View

+

Description: Test a view on a logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:jsonViewOnJsonView a rml:LogicalView ;
+  rml:viewOn :jsonView ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "newName" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonViewOnJsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

7. RMLLVTC0001a

+

Title: Expression Field: Reference

+

Description: Test a reference in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

8. RMLLVTC0001b

+

Title: Expression Field: Template

+

Description: Test a template in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "race" ;
+    rml:constant "human" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasRace ;
+    rml:objectMap [
+      rml:reference "race" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasRace> "human" .
+<http://example.org/person/bob> <http://example.org/hasRace> "human" .
+
+
+

9. RMLLVTC0001c

+

Title: Expression Field: Constant

+

Description: Test a constant expression in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "fullName" ;
+    rml:template "{name} {lastName}" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:reference "fullName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

10. RMLLVTC0001d

+

Title: Expression Field Siblings

+

Description: Test multiple expression fields with the same parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "lastName" ;
+    rml:reference "$.lastName" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:template "{name} {lastName}" ;
+      rml:termType rml:Literal ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

11. RMLLVTC0002a

+

Title: Iterable Field

+

Description: Test a nested field construction: iterable field with expression field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{item.type}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

12. RMLLVTC0002b

+

Title: Iterable Field with Multiple Children

+

Description: Test a nested field construction: iterable field with mulitple expression fields as children

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

13. RMLLVTC0002c

+

Title: Nested Iterable Fields

+

Description: Test a nested field construction: iterable field with an iterable field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "measures": {
+            "weight": 1500,
+            "length": 30
+          }
+        },
+        {
+          "type": "shield",
+          "measures": {
+            "weight": 2500
+          }
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "measures" : {
+            "weight": 15,
+            "length" : 15
+          }
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:IterableField ;
+      rml:fieldName "measures";
+      rml:iterator "$.measures";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+        ];
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.measures.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

14. RMLLVTC0003a

+

Title: Index Key: #

+

Description: Test a reference to the index key #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

15. RMLLVTC0003b

+

Title: Index Key: Iterable Field

+

Description: Test a reference to the index key of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+
+

16. RMLLVTC0003c

+

Title: Index Key: Expression field

+

Description: Test a reference to the index key of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+

17. RMLLVTC0004a

+

Title: Natural Datatype: Index #

+

Description: Test the natural datatype mapping for the index #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

18. RMLLVTC0004b

+

Title: Natural Datatype: Index Expression Field

+

Description: Test the natural datatype mapping for the index of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

19. RMLLVTC0004c

+

Title: Natural Datatype: Index Iterable Field

+

Description: Test the natural datatype mapping for the index of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

20. RMLLVTC0004d

+

Title: Natural Datatype: Record Expression Field

+

Description: Test the natural datatype mapping for a record of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "birth_year": 1995
+    },
+    {
+      "name": "bob",
+      "birth_year": 1999
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "$.birth_year" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

21. RMLLVTC0005a

+

Title: Referencing a Non-Existing Key

+

Description: Test a reference to a non-existing key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{Name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "Name" ;
+    ] ;
+  ] .
+
+
+

22. RMLLVTC0005b

+

Title: Referencing the Record Key

+

Description: Test a reference to the record key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :isDerivedFrom ;
+    rml:objectMap [
+      rml:reference "<it>" ;
+    ] ;
+  ] .
+
+
+

23. RMLLVTC0005c

+

Title: Referencing the Record Key of an Iterable Field

+

Description: Test a reference to the record key of an iterable field

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/{item}" ;
+    ] ;
+  ] .
+
+
+

24. RMLLVTC0006a

+

Title: Left Join

+

Description: Test a left join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

25. RMLLVTC0006b

+

Title: Inner Join

+

Description: Test an inner join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

26. RMLLVTC0006c

+

Title: Two Left Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+<http://example.org/person/789> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

27. RMLLVTC0006d

+

Title: Inner Join and Left Join

+

Description: Test an inner join and a left join in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+
+
+

28. RMLLVTC0006e

+

Title: Two Inner Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+
+
+

29. RMLLVTC0006f

+

Title: Index Key of Field in Join

+

Description: Test references to indexes of fields from a join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+tobias,2005
+bob,1999
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{#}/item/{json_item.#}/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/0> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/0/sword> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/1/shield> .
+<http://example.org/person/2> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/2> <http://example.org/hasItem> <http://example.org/person/2/item/0/flower> .
+
+
+
+

30. RMLLVTC0007a

+

Title: Change Reference Formulations: CSV including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Input

+
name,items
+alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]"
+bob,"[{""type"":""flower"",""weight"":15}]"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

31. RMLLVTC0007b

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Input

+
name,item
+alice,"{""type"":""sword"",""weight"":1500}"
+alice,"{""type"":""shield"",""weight"":2500}"
+bob,"{""type"":""flower"",""weight"":15}"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

32. RMLLVTC0007c

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

33. RMLLVTC0008a

+

Title: Cycle: Abstract Logical Source

+

Description: Test a cycle in the abstract logical source of a logical view

+

Error expected? Yes

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:view1 a rml:LogicalView ;
+  rml:viewOn :view2 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name1" ;
+    rml:reference "name2" ;
+  ] .
+
+:view2 a rml:LogicalView ;
+  rml:viewOn :view1 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name2" ;
+    rml:reference "name1" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :view2 ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name2}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name2" ;
+    ] ;
+  ] .
+
+
+

34. RMLLVTC0008b

+

Title: Cycle: Joins

+

Description: Test a cycle in two joins of two logical views

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :csvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv_birthyear" ;
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+
+

35. RMLLVTC0008c

+

Title: Cycle: Self-Join

+

Description: Test a cycle in a join of a logical view: self-join

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "newName" ;
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+
+ + + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/docs/index.html b/src/test/resources/rml-lv/docs/index.html index f95999f8..c74314d0 100644 --- a/src/test/resources/rml-lv/docs/index.html +++ b/src/test/resources/rml-lv/docs/index.html @@ -1,6 +1,6 @@ - + + + +RML-Core: Test Cases + + + + + + + + + + + + + + + + + + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rml:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

6. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rml:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

7. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

8. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

9. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rml:path"

+

Description: "Tests the presence of an undefined rml:path"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

10. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

11. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rml:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

12. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

13. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

14. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

15. RMLTC0006a-JSON

+

Title: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Description: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

16. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

17. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

18. RMLTC0007c-JSON

+

Title: "One row mapping, using rml:class"

+

Description: "Tests subjectmap with more than one class IRIs, rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

19. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

20. RMLTC0007e-JSON

+

Title: "One column mapping, using rml:graphMap and rml:class"

+

Description: "Tests subjectmap with rml:graphMap and rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

21. RMLTC0007f-JSON

+

Title: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

22. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

23. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.ID";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

24. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rml:graphMap and rml:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

25. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

26. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

27. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {
+      "ID": 100,
+      "Name": "Tennis"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

28. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {
+      "ID": 100,
+      "Name": "Tennis"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

29. RMLTC0010a-JSON

+

Title: "Template with table column with blank space"

+

Description: "Tests a template with blank space in column value"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

30. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

31. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

32. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {"ID":110, "Description":"Tennis"},
+    {"ID":111, "Description":"Football"},
+    {"ID":112, "Description":"Formula1"}
+  ]
+}
+
+

Input 2

+
{
+  "links": [
+    {"ID_Student":10, "ID_Sport":110},
+    {"ID_Student":11, "ID_Sport":111},
+    {"ID_Student":11, "ID_Sport":112},
+    {"ID_Student":12, "ID_Sport":111}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

33. RMLTC0012a-JSON

+

Title: "Blank node referencing multiple columns"

+

Description: "Tests that blank nodes can be generated by referencing multiple columns"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30" .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

34. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "lives": [
+    {"fname":"Bob","lname":"Smith","city":"London"},
+    {"fname":"Sue","lname":"Jones","city":"Madrid"},
+    {"fname":"Bob","lname":"Smith","city":"London"}
+  ]
+}
+
+

Input 1

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

35. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

36. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

37. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

38. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"},
+    {"Code": "IE", "Name": "Irlanda"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

39. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rml:language value"

+

Description: "Tests a term map with an invalid rml:language value, which is an error"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"},
+    {"Code": "IE", "Name": "Irlanda"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

40. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

41. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+
+

42. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

43. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

44. RMLTC0022a-JSON

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus",
+    "Age": 21
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "$.Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

45. RMLTC0022b-JSON

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[
+    { "FOO": 1, "BAR": "string"},
+    { "FOO": 2, "BAR": "int"}
+]
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

46. RMLTC0022c-JSON

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[
+    { "FOO": 1, "BAR": "string"},
+    { "FOO": 2, "BAR": "int"}
+]
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://example.com/datatype#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://example.com/datatype#int> .
+
+
+

47. RMLTC0023a-JSON

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

48. RMLTC0023b-JSON

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

49. RMLTC0023c-JSON

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

50. RMLTC0023d-JSON

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\\\{Name\\\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

51. RMLTC0023e-JSON

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+

52. RMLTC0023f-JSON

+

Title: "Valid IRI template with backslash-escape"

+

Description: "Test handling of a valid IRI template using backslash-escape"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+ + + + Error response + + +

Error response

+

Error code: 404

+

Message: File not found.

+

Error code explanation: 404 - Nothing matches the given URI.

+ +
+

53. RMLTC0024a-JSON

+

Title: "Usage of constant term maps in combination with explicitly defined term types"

+

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subjectMap [
+      rml:constant "School";
+      rml:termType rml:BlankNode
+  ] .
+
+
+

54. RMLTC0025a-JSON

+

Title: "Generation of triples from arrays"

+

Description: "Tests the generation of triples from array input data structures"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts[*]"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Student/Bob/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

55. RMLTC0025b-JSON

+

Title: "Generation of triples from arrays with wrong reference"

+

Description: "Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+
+

56. RMLTC0025c-JSON

+

Title: "Generation of triples from arrays in subject and object"

+

Description: "Tests the generation of triples from array input data structures in subject and object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"names":["Bob", "Smith"],"amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts[*]"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.names[*]}"
+    ] .
+
+

Output

+
<http://example.com/Student/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Smith> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

57. RMLTC0026a-JSON

+

Title: "Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs"

+

Description: "Tests the generation of triples from relative IRIs using base IRI"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

58. RMLTC0026b-JSON

+

Title: "Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter"

+

Description: "Tests the generation of triples from relative IRI using base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://tp1.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://tp1.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://tp1.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

59. RMLTC0026c-JSON

+

Title: "Two triples maps, both with rml:baseIRI defined"

+

Description: "Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

60. RMLTC0026d-JSON

+

Title: "Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined"

+

Description: "Tests the generation of triples by with base IRIs different than the base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example2.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:baseIRI <http://example2.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://example2.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

61. RMLTC0027a-JSON

+

Title: "Generation of triples using the URI term type"

+

Description: "Tests the generation of triples with a URI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:URI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

62. RMLTC0027b-JSON

+

Title: "Generation of triples using the UnsafeURI term type"

+

Description: "Tests the generation of triples with a UnsafeURI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:UnsafeURI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

63. RMLTC0027c-JSON

+

Title: "Generation of triples using the UnsafeIRI term type"

+

Description: "Tests the generation of triples with a UnsafeIRI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:UnsafeIRI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

64. RMLTC0028a-JSON

+

Title: "Generation of the right datatype for a constant in the mapping"

+

Description: "Test the honoring of the datatype specified by the constant term in the mapping"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "foo": "bar"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+    rml:logicalSource [
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+    ];
+    rml:predicateObjectMap [
+      rml:predicate <http://example.org/ns/p> ;
+      rml:object true ; # datatype is boolean
+    ] .
+
+

Output

+
<https://example.org/instances/0> <http://example.org/ns/p> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

65. RMLTC0028b-JSON

+

Title: "Generation of all named graphs when rml:defaultGraph is involved"

+

Description: "Test if the default graph is also generated correctly."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "name": "Alice"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix s: <http://schema.org/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+    rml:logicalSource [
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+      rml:class s:Person ;
+      rml:graph <graph:1> ;
+    ];
+    rml:predicateObjectMap [
+      rml:predicate s:givenName ;
+      rml:objectMap [ rml:reference "name" ] ;
+      rml:graph rml:defaultGraph ;
+    ].
+
+

Output

+
<https://example.org/instances/0> <http://schema.org/givenName> "Alice".
+<https://example.org/instances/0> <http://schema.org/givenName> "Alice" <graph:1> .
+<https://example.org/instances/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> <graph:1> .
+
+
+

66. RMLTC0028c-JSON

+

Title: "Generation of the right language tag for a constant in the mapping"

+

Description: "Test the honoring of the language tag specified by the constant term in the mapping"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "foo": "bar"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+    rml:logicalSource [
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+    ];
+    rml:predicateObjectMap [
+      rml:predicate <http://example.org/ns/p> ;
+      rml:object "train"@en ;
+    ] .
+
+

Output

+
<https://example.org/instances/0> <http://example.org/ns/p> "train"@en .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/docs/index.html b/src/test/resources/rml-core/docs/index.html index ba5fb3da..7039cea4 100644 --- a/src/test/resources/rml-core/docs/index.html +++ b/src/test/resources/rml-core/docs/index.html @@ -244,17 +244,17 @@ "copyrightStart": "2024", "doJsonLd": true, "group": "kg-construct", - "publishISODate": "2025-09-08T00:00:00.000Z", - "generatedSubtitle": "Draft Community Group Report 08 September 2025" + "publishISODate": "2025-09-15T00:00:00.000Z", + "generatedSubtitle": "Draft Community Group Report 15 September 2025" } -
+

RML-Core: Test Cases

Draft Community Group Report - +

@@ -351,7 +351,7 @@

RML-Core: Test Cases

discussion of this specification. -

+

1. Introduction

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). @@ -1446,7 +1446,7 @@

RML-Core: Test Cases

Output

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
 <http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
 <http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
 <http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
 
@@ -1947,22 +1947,22 @@ 

RML-Core: Test Cases

] .

Output

-
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
-<http://example.com/student/10> <http://example.com/firstName> "Venus" .
-<http://example.com/student/12> <http://example.com/lastName> "Villa" .
-<http://example.com/student/12> <http://example.com/firstName> "David" .
-<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
-<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
-<http://example.com/sport/110> <http://example.com/description> "Tennis" .
-<http://example.com/sport/110> <http://example.com/id> "110" .
-<http://example.com/sport/111> <http://example.com/description> "Football" .
-<http://example.com/sport/111> <http://example.com/id> "111" .
-<http://example.com/sport/112> <http://example.com/description> "Formula1" .
-<http://example.com/sport/112> <http://example.com/id> "112" .
-<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
-<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
-<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
-<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
 
 
@@ -2691,38 +2691,6 @@

RML-Core: Test Cases

Default Base IRI: http://example.com/

Error expected? Yes

Input

-
{
-  "students": [{
-    "ID": 10,
-    "Name":"Venus"
-  }]
-}
-
-

Mapping

-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-@prefix rml: <http://w3id.org/rml/> .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap;
-  rml:logicalSource [ a rml:LogicalSource;
-      rml:referenceFormulation rml:JSONPath;
-      rml:iterator "$.students[*]";
-      rml:source [ a rml:RelativePathSource;
-          rml:root rml:MappingDirectory;
-          rml:path "student.json"
-        ]
-    ];
-  rml:subjectMap [
-      rml:template "http://example.com/{NON_EXISTING_COLUMN}";
-      rml:class foaf:Person;
-    ] .
-
-
-

48. RMLTC0023b-JSON

-

Title: "Invalid IRI template 2"

-

Description: "Test handling of invalid IRI template"

-

Default Base IRI: http://example.com/

-

Error expected? Yes

-

Input

{
   "students": [{
     "ID": 10,
@@ -2749,8 +2717,8 @@ 

RML-Core: Test Cases

] .
-

49. RMLTC0023c-JSON

-

Title: "Invalid IRI template 3"

+

48. RMLTC0023b-JSON

+

Title: "Invalid IRI template 2"

Description: "Test handling of invalid IRI template"

Default Base IRI: http://example.com/

Error expected? Yes

@@ -2782,8 +2750,8 @@

RML-Core: Test Cases

-

50. RMLTC0023d-JSON

-

Title: "Invalid IRI template 4"

+

49. RMLTC0023c-JSON

+

Title: "Invalid IRI template 3"

Description: "Test handling of invalid IRI template"

Default Base IRI: http://example.com/

Error expected? Yes

@@ -2815,8 +2783,8 @@

RML-Core: Test Cases

-

51. RMLTC0023e-JSON

-

Title: "Invalid IRI template 5"

+

50. RMLTC0023d-JSON

+

Title: "Invalid IRI template 4"

Description: "Test handling of invalid IRI template"

Default Base IRI: http://example.com/

Error expected? Yes

@@ -2848,8 +2816,8 @@

RML-Core: Test Cases

-

52. RMLTC0023f-JSON

-

Title: "Invalid IRI template 6"

+

51. RMLTC0023e-JSON

+

Title: "Invalid IRI template 5"

Description: "Test handling of invalid IRI template"

Default Base IRI: http://example.com/

Error expected? Yes

@@ -2880,7 +2848,7 @@

RML-Core: Test Cases

] .
-

53. RMLTC0023g-JSON

+

52. RMLTC0023f-JSON

Title: "Valid IRI template with backslash-escape"

Description: "Test handling of a valid IRI template using backslash-escape"

Default Base IRI: http://example.com/

@@ -2916,7 +2884,20 @@

RML-Core: Test Cases

<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
 
-

54. RMLTC0024a-JSON

+
+ + + + Error response + + +

Error response

+

Error code: 404

+

Message: File not found.

+

Error code explanation: 404 - Nothing matches the given URI.

+ +
+

53. RMLTC0024a-JSON

Title: "Usage of constant term maps in combination with explicitly defined term types"

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

Default Base IRI: http://example.com/

@@ -2957,7 +2938,7 @@

RML-Core: Test Cases

] .
-

55. RMLTC0025a-JSON

+

54. RMLTC0025a-JSON

Title: "Generation of triples from arrays"

Description: "Tests the generation of triples from array input data structures"

Default Base IRI: http://example.com/

@@ -2999,7 +2980,7 @@

RML-Core: Test Cases

<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
-

56. RMLTC0025b-JSON

+

55. RMLTC0025b-JSON

Title: "Generation of triples from arrays with wrong reference"

Description: "Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array"

Default Base IRI: http://example.com/

@@ -3036,7 +3017,7 @@

RML-Core: Test Cases

] .
-

57. RMLTC0025c-JSON

+

56. RMLTC0025c-JSON

Title: "Generation of triples from arrays in subject and object"

Description: "Tests the generation of triples from array input data structures in subject and object"

Default Base IRI: http://example.com/

@@ -3081,7 +3062,7 @@

RML-Core: Test Cases

<http://example.com/Student/Bob> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
-

58. RMLTC0026a-JSON

+

57. RMLTC0026a-JSON

Title: "Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs"

Description: "Tests the generation of triples from relative IRIs using base IRI"

Default Base IRI: http://example.com/

@@ -3145,7 +3126,7 @@

RML-Core: Test Cases

<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
-

59. RMLTC0026b-JSON

+

58. RMLTC0026b-JSON

Title: "Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter"

Description: "Tests the generation of triples from relative IRI using base IRI parameter"

Default Base IRI: http://example.com/

@@ -3209,7 +3190,7 @@

RML-Core: Test Cases

<http://tp1.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
-

60. RMLTC0026c-JSON

+

59. RMLTC0026c-JSON

Title: "Two triples maps, both with rml:baseIRI defined"

Description: "Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter"

Default Base IRI: http://example.com/

@@ -3274,7 +3255,7 @@

RML-Core: Test Cases

<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
-

61. RMLTC0026d-JSON

+

60. RMLTC0026d-JSON

Title: "Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined"

Description: "Tests the generation of triples by with base IRIs different than the base IRI parameter"

Default Base IRI: http://example.com/

@@ -3339,7 +3320,7 @@

RML-Core: Test Cases

<http://example2.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
-

62. RMLTC0027a-JSON

+

61. RMLTC0027a-JSON

Title: "Generation of triples using the URI term type"

Description: "Tests the generation of triples with a URI term type in the subject or object"

Default Base IRI: http://example.com/

@@ -3386,7 +3367,7 @@

RML-Core: Test Cases

<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-

63. RMLTC0027b-JSON

+

62. RMLTC0027b-JSON

Title: "Generation of triples using the UnsafeURI term type"

Description: "Tests the generation of triples with a UnsafeURI term type in the subject or object"

Default Base IRI: http://example.com/

@@ -3433,7 +3414,7 @@

RML-Core: Test Cases

<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-

64. RMLTC0027c-JSON

+

63. RMLTC0027c-JSON

Title: "Generation of triples using the UnsafeIRI term type"

Description: "Tests the generation of triples with a UnsafeIRI term type in the subject or object"

Default Base IRI: http://example.com/

@@ -3480,7 +3461,7 @@

RML-Core: Test Cases

<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
-

65. RMLTC0028a-JSON

+

64. RMLTC0028a-JSON

Title: "Generation of the right datatype for a constant in the mapping"

Description: "Test the honoring of the datatype specified by the constant term in the mapping"

Default Base IRI: http://example.com/

@@ -3491,12 +3472,14 @@

RML-Core: Test Cases

Mapping

@prefix rml: <http://w3id.org/rml/> .
 
- [
-    a rml:TriplesMap;
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
     rml:logicalSource [
-      rml:source "data.json" ;
       rml:referenceFormulation rml:JSONPath ;
       rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
     ];
     rml:subjectMap [
       rml:template "https://example.org/instances/{id}";
@@ -3504,14 +3487,13 @@ 

RML-Core: Test Cases

rml:predicateObjectMap [ rml:predicate <http://example.org/ns/p> ; rml:object true ; # datatype is boolean - ]; - ] . + ] .

Output

<https://example.org/instances/0> <http://example.org/ns/p> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
 
-

66. RMLTC0028b-JSON

+

65. RMLTC0028b-JSON

Title: "Generation of all named graphs when rml:defaultGraph is involved"

Description: "Test if the default graph is also generated correctly."

Default Base IRI: http://example.com/

@@ -3523,12 +3505,14 @@

RML-Core: Test Cases

@prefix rml: <http://w3id.org/rml/> .
 @prefix s: <http://schema.org/> .
 
- [
-    a rml:TriplesMap;
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
     rml:logicalSource [
-      rml:source "data.json" ;
       rml:referenceFormulation rml:JSONPath ;
       rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
     ];
     rml:subjectMap [
       rml:template "https://example.org/instances/{id}";
@@ -3539,8 +3523,7 @@ 

RML-Core: Test Cases

rml:predicate s:givenName ; rml:objectMap [ rml:reference "name" ] ; rml:graph rml:defaultGraph ; - ]; - ] . + ].

Output

<https://example.org/instances/0> <http://schema.org/givenName> "Alice".
@@ -3548,7 +3531,7 @@ 

RML-Core: Test Cases

<https://example.org/instances/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> <graph:1> .
-

67. RMLTC0028c-JSON

+

66. RMLTC0028c-JSON

Title: "Generation of the right language tag for a constant in the mapping"

Description: "Test the honoring of the language tag specified by the constant term in the mapping"

Default Base IRI: http://example.com/

@@ -3558,12 +3541,15 @@

RML-Core: Test Cases

Mapping

@prefix rml: <http://w3id.org/rml/> .
- [
-    a rml:TriplesMap;
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
     rml:logicalSource [
-      rml:source "data.json" ;
       rml:referenceFormulation rml:JSONPath ;
       rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
     ];
     rml:subjectMap [
       rml:template "https://example.org/instances/{id}";
@@ -3571,8 +3557,7 @@ 

RML-Core: Test Cases

rml:predicateObjectMap [ rml:predicate <http://example.org/ns/p> ; rml:object "train"@en ; - ]; - ] . + ] .

Output

<https://example.org/instances/0> <http://example.org/ns/p> "train"@en .
diff --git a/src/test/resources/rml-core/manifest.ttl b/src/test/resources/rml-core/manifest.ttl
index 5762cdd9..a5ed034d 100644
--- a/src/test/resources/rml-core/manifest.ttl
+++ b/src/test/resources/rml-core/manifest.ttl
@@ -1,788 +1,779 @@
-  "student_sport.json" .
-  "application/json" .
-   .
-  "sport.json" .
-  "application/json" .
-   .
-  "data.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0026a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0026d-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0028c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0013a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "data.json" .
-  "application/json" .
-   .
-  "RMLTC0002g-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0028b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0004b-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0015b-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "RMLTC0004a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0019b-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "RMLTC0000-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "ious.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0008a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0023f-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0023b-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "RMLTC0023e-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "RMLTC0010b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0023a-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "RMLTC0012d-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0025c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0010a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0012c-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "country_info.json" .
-  "application/json" .
-   .
-  "RMLTC0025b-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "RMLTC0027a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0001b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0007h-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0001a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0003c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0007g-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "sport.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0005a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0007c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "RMLTC0007b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "country_es.json" .
-  "application/json" .
-   .
-   .
-  "RMLTC0009a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0020a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0022c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-   .
-   .
-  "RMLTC0011b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0024a-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0026c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0026b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "RMLTC0028a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "RMLTC0002b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0002e-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "RMLTC0015a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "country_es.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0002a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "RMLTC0019a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0006a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "lives.json" .
-  "application/json" .
-   .
-  "RMLTC0008c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0008b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "country_info.json" .
-  "application/json" .
-   .
-  "RMLTC0023d-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "RMLTC0023g-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0021a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0023c-JSON" .
-   .
-   .
-  "true"^^ .
-  "mapping.ttl" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "data.json" .
-  "application/json" .
-   .
-  "sport.json" .
-  "application/json" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "RMLTC0010c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-   .
-  "RMLTC0012b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student_sport.json" .
-  "application/json" .
-   .
-  "RMLTC0025a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "data.json" .
-  "application/json" .
-   .
-  "RMLTC0027c-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0012a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0027b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "data.json" .
-  "application/json" .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "RMLTC0007f-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "student.json" .
-  "application/json" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "country_info.json" .
-  "application/json" .
-   .
-  "RMLTC0007e-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0007a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0007d-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-   .
-  "RMLTC0009b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "RMLTC0022b-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "output.nq" .
-  "application/n-quads" .
-   .
-  "RMLTC0022a-JSON" .
-   .
-   .
-  "false"^^ .
-  "mapping.ttl" .
-   .
-   .
-  "persons.json" .
-  "application/json" .
-   .
-  "persons.json" .
-  "application/json" .
-   .
+  "country_info.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0008b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0021a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0023c-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+   .
+  "RMLTC0023f-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0010c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0023b-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+   .
+  "RMLTC0025a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0012a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "sport.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0012d-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0027b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "data.json" .
+  "application/json" .
+   .
+  "student_sport.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0027a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "country_es.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0007e-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0007h-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+  "data.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0007a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0007d-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "country_info.json" .
+  "application/json" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0009b-JSON" .
+   .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "ious.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0009a-JSON" .
+   .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0022a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "country_es.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0026d-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+   .
+  "RMLTC0011b-JSON" .
+   .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0002g-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+   .
+  "RMLTC0013a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0026c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "country_info.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0028b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student_sport.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0015b-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+   .
+  "RMLTC0028a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0002b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0004a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0019b-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+  "lives.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "data.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0008a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0019a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0023e-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0010b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0023a-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+   .
+  "RMLTC0023d-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+   .
+  "RMLTC0025c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0000-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0010a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0012c-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0025b-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0001b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0012b-JSON" .
+   .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0027c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0001a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0003c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0007g-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0005a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0007c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0007f-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "sport.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0007b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "persons.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0020a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0022c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "sport.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0022b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0024a-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0026b-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "data.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0002e-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+   .
+  "RMLTC0015a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+   .
+  "RMLTC0026a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0028c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0002a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "student.json" .
+  "application/json" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+  "output.nq" .
+  "application/n-quads" .
+   .
+   .
+  "RMLTC0004b-JSON" .
+   .
+  "mapping.ttl" .
+  "true"^^ .
+   .
+   .
+  "RMLTC0006a-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
+  "data.json" .
+  "application/json" .
+   .
+   .
+  "RMLTC0008c-JSON" .
+   .
+   .
+  "mapping.ttl" .
+  "false"^^ .
+   .
diff --git a/src/test/resources/rml-core/metadata.csv b/src/test/resources/rml-core/metadata.csv
index a47dc6d4..23b49974 100644
--- a/src/test/resources/rml-core/metadata.csv
+++ b/src/test/resources/rml-core/metadata.csv
@@ -1,65 +1,64 @@
 ID,title,description,specification,base_iri,mapping,input_format1,input_format2,input_format3,output_format1,output_format2,output_format3,input1,input2,input3,output1,output2,output3,error
-RMLTC0000-JSON,"""one table, one column, zero rows""","""Tests if an empty table produces an empty RDF graph""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0001a-JSON,"""One column mapping, subject URI generation by using rml:template""","""Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0001b-JSON,"""One column mapping, generation of a BlankNode subject by using rml:termType""","""Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0002a-JSON,"""Two columns mapping, generation of a subject URI by the concatenation of two column values""","""Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0002b-JSON,"""Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType""","""Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0002e-JSON,"""Two columns mapping, an undefined rml:path""","""Tests the presence of an undefined rml:path""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0002g-JSON,"""Two columns mapping, invalid JSONPath""","""Test the presence of an invalid JSONPath""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0003c-JSON,"""Three columns mapping, by using a rml:template to produce literal""","""Tests: (1) three column mapping; and (2) the use of rml:template to produce literal""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0004a-JSON,"""Two column mapping, from one row table to two different triples""","""Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student_sport.json,,,output.nq,,,false
-RMLTC0004b-JSON,"""One column mapping, presence of rml:termType rml:Literal on rml:subjectMap""","""Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0005a-JSON,"""Typing of resources""","""Tests the typing of resources""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,ious.json,,,output.nq,,,false
-RMLTC0006a-JSON,"""Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""","""Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007a-JSON,"""Typing resources by relying on rdf:type predicate""","""Tests the typing resources by relying on rdf:type predicate""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007b-JSON,"""Assigning triples to Named Graphs""","""Tests the generation of triples to a named graph""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007c-JSON,"""One row mapping, using rml:class""","""Tests subjectmap with more than one class IRIs, rml:class""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007d-JSON,"""One column mapping, specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007e-JSON,"""One column mapping, using rml:graphMap and rml:class""","""Tests subjectmap with rml:graphMap and rml:class""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007f-JSON,"""One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007g-JSON,"""Assigning triples to the default graph""","""Tests the generation of triples to the default graph""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0007h-JSON,"""Assigning triples to a non-IRI named graph""","""Tests the generation of triples to a non-IRI named graph, which is an error""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0008a-JSON,"""Generation of triples to a target graph by using rml:graphMap and rml:template""","""Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0008b-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map without join""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0008c-JSON,"""Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""","""Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0009a-JSON,"""Generation of triples from foreign key relations""","""Test foreign key relationships among logical tables""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false
-RMLTC0009b-JSON,"""Generation of triples to multiple graphs""","""Test that results from distinct parts of the mapping can be directed to different target graphs.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false
-RMLTC0010a-JSON,"""Template with table column with blank space""","""Tests a template with blank space in column value""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
-RMLTC0010b-JSON,"""Template with table columns with special chars""","""Tests a template with special chars in column value""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
-RMLTC0010c-JSON,"""Template with table columns with special chars and backslashes""","""Tests a template with special chars in reference value and backslash escapes in string templates""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
-RMLTC0011b-JSON,"""M to M relation, by using an additional Triples Map""","""Tests, M to M relations, by using an additional Triples Map""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,application/json,application/json,application/n-quads,,,student.json,sport.json,student_sport.json,output.nq,,,false
-RMLTC0012a-JSON,"""Blank node referencing multiple columns""","""Tests that blank nodes can be generated by referencing multiple columns""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0012b-JSON,"""Duplicate tuples generate same blank node""","""Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,lives.json,persons.json,,output.nq,,,false
-RMLTC0012c-JSON,"""TriplesMap without subjectMap""","""Tests a RML with missing information, TriplesMap without subjectMap.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
-RMLTC0012d-JSON,"""TriplesMap with two subjectMap""","""Tests a RML with wrong information, TriplesMap with two subjectMap.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
-RMLTC0013a-JSON,"""Null value in JSON file""","""Tests if null values in JSON files are handled correctly.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0015a-JSON,"""Generation of language tags from a table with language information""","""Generation of language tags from a table with language information""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_es.json,,,output.nq,,,false
-RMLTC0015b-JSON,"""Generation of language tags from a table with language information, and a term map with invalid rml:language value""","""Tests a term map with an invalid rml:language value, which is an error""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,country_es.json,,,,,,true
-RMLTC0019a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0019b-JSON,"""Generation of triples by using IRI value in columns, with data error""","""Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
-RMLTC0020a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0021a-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map with same logical source and join condition""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0022a-JSON,"""Generating of triples with constant datatype""","""Test triples with a fixed constant datatype""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0022b-JSON,"""Generating of triples with datatypeMap""","""Test triples with a XSD datatype generated from the data""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
-RMLTC0022c-JSON,"""Generating of triples with datatypeMap with custom datatype""","""Test triples with a custom datype from the data""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
-RMLTC0023a-JSON,"""Invalid IRI template 1""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023b-JSON,"""Invalid IRI template 2""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023c-JSON,"""Invalid IRI template 3""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023d-JSON,"""Invalid IRI template 4""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023e-JSON,"""Invalid IRI template 5""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023f-JSON,"""Invalid IRI template 6""","""Test handling of invalid IRI template""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0023g-JSON,"""Valid IRI template with backslash-escape""","""Test handling of a valid IRI template using backslash-escape""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0024a-JSON,"""Usage of constant term maps in combination with explicitly defined term types""","""Tests the usage of constant term maps in combination with explicitly defined term types""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
-RMLTC0025a-JSON,"""Generation of triples from arrays""","""Tests the generation of triples from array input data structures""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0025b-JSON,"""Generation of triples from arrays with wrong reference""","""Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
-RMLTC0025c-JSON,"""Generation of triples from arrays in subject and object""","""Tests the generation of triples from array input data structures in subject and object""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0026a-JSON,"""Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs""","""Tests the generation of triples from relative IRIs using base IRI""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0026b-JSON,"""Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter""","""Tests the generation of triples from relative IRI using base IRI parameter""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0026c-JSON,"""Two triples maps, both with rml:baseIRI defined""","""Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0026d-JSON,"""Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined""","""Tests the generation of triples by with base IRIs different than the base IRI parameter""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
-RMLTC0027a-JSON,"""Generation of triples using the URI term type""","""Tests the generation of triples with a URI term type in the subject or object""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0027b-JSON,"""Generation of triples using the UnsafeURI term type""","""Tests the generation of triples with a UnsafeURI term type in the subject or object""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0027c-JSON,"""Generation of triples using the UnsafeIRI term type""","""Tests the generation of triples with a UnsafeIRI term type in the subject or object""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
-RMLTC0028a-JSON,"""Generation of the right datatype for a constant in the mapping""","""Test the honoring of the datatype specified by the constant term in the mapping""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
-RMLTC0028b-JSON,"""Generation of all named graphs when rml:defaultGraph is involved""","""Test if the default graph is also generated correctly.""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
-RMLTC0028c-JSON,"""Generation of the right language tag for a constant in the mapping""","""Test the honoring of the language tag specified by the constant term in the mapping""",http://w3id.org/rml/core/,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0000-JSON,"""one table, one column, zero rows""","""Tests if an empty table produces an empty RDF graph""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0001a-JSON,"""One column mapping, subject URI generation by using rml:template""","""Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0001b-JSON,"""One column mapping, generation of a BlankNode subject by using rml:termType""","""Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0002a-JSON,"""Two columns mapping, generation of a subject URI by the concatenation of two column values""","""Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0002b-JSON,"""Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType""","""Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0002e-JSON,"""Two columns mapping, an undefined rml:path""","""Tests the presence of an undefined rml:path""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0002g-JSON,"""Two columns mapping, invalid JSONPath""","""Test the presence of an invalid JSONPath""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0003c-JSON,"""Three columns mapping, by using a rml:template to produce literal""","""Tests: (1) three column mapping; and (2) the use of rml:template to produce literal""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0004a-JSON,"""Two column mapping, from one row table to two different triples""","""Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student_sport.json,,,output.nq,,,false
+RMLTC0004b-JSON,"""One column mapping, presence of rml:termType rml:Literal on rml:subjectMap""","""Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0005a-JSON,"""Typing of resources""","""Tests the typing of resources""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,ious.json,,,output.nq,,,false
+RMLTC0006a-JSON,"""Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""","""Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007a-JSON,"""Typing resources by relying on rdf:type predicate""","""Tests the typing resources by relying on rdf:type predicate""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007b-JSON,"""Assigning triples to Named Graphs""","""Tests the generation of triples to a named graph""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007c-JSON,"""One row mapping, using rml:class""","""Tests subjectmap with more than one class IRIs, rml:class""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007d-JSON,"""One column mapping, specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007e-JSON,"""One column mapping, using rml:graphMap and rml:class""","""Tests subjectmap with rml:graphMap and rml:class""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007f-JSON,"""One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type""","""Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007g-JSON,"""Assigning triples to the default graph""","""Tests the generation of triples to the default graph""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0007h-JSON,"""Assigning triples to a non-IRI named graph""","""Tests the generation of triples to a non-IRI named graph, which is an error""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0008a-JSON,"""Generation of triples to a target graph by using rml:graphMap and rml:template""","""Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0008b-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map without join""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0008c-JSON,"""Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""","""Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0009a-JSON,"""Generation of triples from foreign key relations""","""Test foreign key relationships among logical tables""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false
+RMLTC0009b-JSON,"""Generation of triples to multiple graphs""","""Test that results from distinct parts of the mapping can be directed to different target graphs.""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,student.json,sport.json,,output.nq,,,false
+RMLTC0010a-JSON,"""Template with table column with blank space""","""Tests a template with blank space in column value""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
+RMLTC0010b-JSON,"""Template with table columns with special chars""","""Tests a template with special chars in column value""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
+RMLTC0010c-JSON,"""Template with table columns with special chars and backslashes""","""Tests a template with special chars in reference value and backslash escapes in string templates""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_info.json,,,output.nq,,,false
+RMLTC0011b-JSON,"""M to M relation, by using an additional Triples Map""","""Tests, M to M relations, by using an additional Triples Map""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,application/json,application/json,application/n-quads,,,student.json,sport.json,student_sport.json,output.nq,,,false
+RMLTC0012a-JSON,"""Blank node referencing multiple columns""","""Tests that blank nodes can be generated by referencing multiple columns""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0012b-JSON,"""Duplicate tuples generate same blank node""","""Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,application/json,,application/n-quads,,,lives.json,persons.json,,output.nq,,,false
+RMLTC0012c-JSON,"""TriplesMap without subjectMap""","""Tests a RML with missing information, TriplesMap without subjectMap.""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
+RMLTC0012d-JSON,"""TriplesMap with two subjectMap""","""Tests a RML with wrong information, TriplesMap with two subjectMap.""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
+RMLTC0013a-JSON,"""Null value in JSON file""","""Tests if null values in JSON files are handled correctly.""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0015a-JSON,"""Generation of language tags from a table with language information""","""Generation of language tags from a table with language information""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,country_es.json,,,output.nq,,,false
+RMLTC0015b-JSON,"""Generation of language tags from a table with language information, and a term map with invalid rml:language value""","""Tests a term map with an invalid rml:language value, which is an error""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,country_es.json,,,,,,true
+RMLTC0019a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0019b-JSON,"""Generation of triples by using IRI value in columns, with data error""","""Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
+RMLTC0020a-JSON,"""Generation of triples by using IRI value in columns""","""Test the generation of triples by using IRI value in attributes""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0021a-JSON,"""Generation of triples referencing object map""","""Tests the mapping specification referencing object map with same logical source and join condition""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0022a-JSON,"""Generating of triples with constant datatype""","""Test triples with a fixed constant datatype""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0022b-JSON,"""Generating of triples with datatypeMap""","""Test triples with a XSD datatype generated from the data""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0022c-JSON,"""Generating of triples with datatypeMap with custom datatype""","""Test triples with a custom datype from the data""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0023a-JSON,"""Invalid IRI template 1""","""Test handling of invalid IRI template""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023b-JSON,"""Invalid IRI template 2""","""Test handling of invalid IRI template""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023c-JSON,"""Invalid IRI template 3""","""Test handling of invalid IRI template""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023d-JSON,"""Invalid IRI template 4""","""Test handling of invalid IRI template""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023e-JSON,"""Invalid IRI template 5""","""Test handling of invalid IRI template""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0023f-JSON,"""Valid IRI template with backslash-escape""","""Test handling of a valid IRI template using backslash-escape""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0024a-JSON,"""Usage of constant term maps in combination with explicitly defined term types""","""Tests the usage of constant term maps in combination with explicitly defined term types""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,student.json,,,,,,true
+RMLTC0025a-JSON,"""Generation of triples from arrays""","""Tests the generation of triples from array input data structures""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0025b-JSON,"""Generation of triples from arrays with wrong reference""","""Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,,,,persons.json,,,,,,true
+RMLTC0025c-JSON,"""Generation of triples from arrays in subject and object""","""Tests the generation of triples from array input data structures in subject and object""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0026a-JSON,"""Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs""","""Tests the generation of triples from relative IRIs using base IRI""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0026b-JSON,"""Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter""","""Tests the generation of triples from relative IRI using base IRI parameter""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0026c-JSON,"""Two triples maps, both with rml:baseIRI defined""","""Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0026d-JSON,"""Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined""","""Tests the generation of triples by with base IRIs different than the base IRI parameter""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,persons.json,,,output.nq,,,false
+RMLTC0027a-JSON,"""Generation of triples using the URI term type""","""Tests the generation of triples with a URI term type in the subject or object""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0027b-JSON,"""Generation of triples using the UnsafeURI term type""","""Tests the generation of triples with a UnsafeURI term type in the subject or object""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0027c-JSON,"""Generation of triples using the UnsafeIRI term type""","""Tests the generation of triples with a UnsafeIRI term type in the subject or object""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,student.json,,,output.nq,,,false
+RMLTC0028a-JSON,"""Generation of the right datatype for a constant in the mapping""","""Test the honoring of the datatype specified by the constant term in the mapping""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0028b-JSON,"""Generation of all named graphs when rml:defaultGraph is involved""","""Test if the default graph is also generated correctly.""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false
+RMLTC0028c-JSON,"""Generation of the right language tag for a constant in the mapping""","""Test the honoring of the language tag specified by the constant term in the mapping""",http://w3id.org/rml/core,http://example.org/,mapping.ttl,application/json,,,application/n-quads,,,data.json,,,output.nq,,,false

From 6bc9544b1a61bd0179d5b93f3242e33f0908149c Mon Sep 17 00:00:00 2001
From: Christophe Debruyne 
Date: Mon, 6 Oct 2025 16:14:24 +0200
Subject: [PATCH 13/28] Preparation for new shapes files

---
 fetch-test-cases.sh                           |   16 +
 src/main/java/burp/model/LogicalView.java     |    6 -
 src/main/java/burp/parse/Parse.java           |   12 +-
 src/main/resources/shapes/{ => rml-cc}/cc.ttl |   20 +-
 .../shapes/rml-cc/external_shapes.ttl         |   24 +
 .../resources/shapes/rml-cc/gather_map.ttl    |   90 +
 .../resources/shapes/rml-cc/generate_shape.py |   79 +
 .../shapes/rml-cc/mapping_validator.py        |   40 +
 .../resources/shapes/rml-cc/requirements.txt  |    3 +
 src/main/resources/shapes/rml-cc/shacl.ttl    |  406 ++
 src/main/resources/shapes/rml-cc/tests.py     |   76 +
 src/main/resources/shapes/rml-core/README.md  |    7 +
 .../resources/shapes/rml-core/child_map.ttl   |   46 +
 .../resources/shapes/{ => rml-core}/core.ttl  |   79 +-
 .../shapes/rml-core/datatype_map.ttl          |   47 +
 .../shapes/rml-core/expression_map.ttl        |  137 +
 .../shapes/rml-core/external_shapes.ttl       |   16 +
 .../shapes/rml-core/generate_shape.py         |   79 +
 .../resources/shapes/rml-core/graph_map.ttl   |   55 +
 .../resources/shapes/rml-core/iterable.ttl    |   65 +
 src/main/resources/shapes/rml-core/join.ttl   |   93 +
 .../shapes/rml-core/language_map.ttl          |   50 +
 .../shapes/rml-core/mapping_validator.py      |   40 +
 .../resources/shapes/rml-core/object_map.ttl  |  100 +
 .../resources/shapes/rml-core/parent_map.ttl  |   46 +
 .../shapes/rml-core/predicate_map.ttl         |   52 +
 .../shapes/rml-core/predicate_object_map.ttl  |  107 +
 .../shapes/rml-core/ref_object_map.ttl        |   46 +
 .../shapes/rml-core/requirements.txt          |    3 +
 src/main/resources/shapes/rml-core/shacl.ttl  |  406 ++
 .../shapes/rml-core/shared_properties.ttl     |  198 +
 .../resources/shapes/rml-core/subject_map.ttl |   67 +
 .../resources/shapes/rml-core/term_map.ttl    |   43 +
 src/main/resources/shapes/rml-core/tests.py   |   80 +
 .../resources/shapes/rml-core/triples_map.ttl |   33 +
 src/main/resources/shapes/rml-fnml/README.md  |   20 +
 .../shapes/rml-fnml/external_shapes.ttl       |   20 +
 .../resources/shapes/{ => rml-fnml}/fnml.ttl  |   70 +-
 .../shapes/rml-fnml/function_execution.ttl    |   74 +
 .../shapes/rml-fnml/function_map.ttl          |   28 +
 .../shapes/rml-fnml/generate_shape.py         |   79 +
 src/main/resources/shapes/rml-fnml/input.ttl  |  107 +
 .../shapes/rml-fnml/mapping_validator.py      |   43 +
 .../shapes/rml-fnml/parameter_map.ttl         |   28 +
 .../shapes/rml-fnml/requirements.txt          |    3 +
 .../resources/shapes/rml-fnml/return_map.ttl  |   28 +
 src/main/resources/shapes/rml-fnml/shacl.ttl  |  406 ++
 src/main/resources/shapes/rml-fnml/tests.py   |   83 +
 .../resources/shapes/rml-io/generate_shape.py |   79 +
 src/main/resources/shapes/{ => rml-io}/io.ttl |  181 +-
 .../shapes/rml-io/logical_source.ttl          |   43 +
 .../shapes/rml-io/logical_target.ttl          |   44 +
 .../shapes/rml-io/mapping_validator.py        |   45 +
 .../shapes/rml-io/relative_path_source.ttl    |   56 +
 .../shapes/rml-io/relative_path_target.ttl    |   56 +
 .../resources/shapes/rml-io/requirements.txt  |    3 +
 .../resources/shapes/rml-io/shapes_graph.ttl  |    5 +
 src/main/resources/shapes/rml-io/source.ttl   |   91 +
 src/main/resources/shapes/rml-io/target.ttl   |   92 +
 src/main/resources/shapes/rml-io/tests.py     |   72 +
 src/main/resources/shapes/rml-io/utils.py     |   25 +
 src/main/resources/shapes/{ => rml-lv}/lv.ttl |    0
 .../shapes/rml-lv/mapping_validator.py        |   45 +
 .../resources/shapes/rml-lv/requirements.txt  |    3 +
 src/main/resources/shapes/rml-lv/tests.py     |   72 +
 src/main/resources/shapes/rml-lv/utils.py     |   25 +
 .../shapes/rml-star/assertedtriples_map.ttl   |   38 +
 .../shapes/rml-star/external_shapes.ttl       |   20 +
 .../shapes/rml-star/generate_shape.py         |   79 +
 .../shapes/rml-star/mapping_validator.py      |   40 +
 .../rml-star/nonassertedtriples_map.ttl       |   38 +
 .../shapes/rml-star/requirements.txt          |    3 +
 src/main/resources/shapes/rml-star/shacl.ttl  |  406 ++
 .../shapes/rml-star/shared_properties.ttl     |   48 +
 .../resources/shapes/{ => rml-star}/star.ttl  |    8 +-
 .../resources/shapes/rml-star/star_map.ttl    |   61 +
 src/main/resources/shapes/rml-star/tests.py   |   77 +
 .../rml-core/RMLTC0012a-JSON/README.md        |    4 +-
 src/test/resources/rml-core/dev.html          |    1 -
 .../rml-core/docs/20250930/index.html         | 3878 +++++++++++++++++
 src/test/resources/rml-core/docs/index.html   |   23 +-
 81 files changed, 9133 insertions(+), 184 deletions(-)
 rename src/main/resources/shapes/{ => rml-cc}/cc.ttl (89%)
 create mode 100644 src/main/resources/shapes/rml-cc/external_shapes.ttl
 create mode 100644 src/main/resources/shapes/rml-cc/gather_map.ttl
 create mode 100755 src/main/resources/shapes/rml-cc/generate_shape.py
 create mode 100644 src/main/resources/shapes/rml-cc/mapping_validator.py
 create mode 100644 src/main/resources/shapes/rml-cc/requirements.txt
 create mode 100644 src/main/resources/shapes/rml-cc/shacl.ttl
 create mode 100755 src/main/resources/shapes/rml-cc/tests.py
 create mode 100644 src/main/resources/shapes/rml-core/README.md
 create mode 100644 src/main/resources/shapes/rml-core/child_map.ttl
 rename src/main/resources/shapes/{ => rml-core}/core.ttl (97%)
 create mode 100644 src/main/resources/shapes/rml-core/datatype_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/expression_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/external_shapes.ttl
 create mode 100755 src/main/resources/shapes/rml-core/generate_shape.py
 create mode 100644 src/main/resources/shapes/rml-core/graph_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/iterable.ttl
 create mode 100644 src/main/resources/shapes/rml-core/join.ttl
 create mode 100644 src/main/resources/shapes/rml-core/language_map.ttl
 create mode 100755 src/main/resources/shapes/rml-core/mapping_validator.py
 create mode 100644 src/main/resources/shapes/rml-core/object_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/parent_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/predicate_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/predicate_object_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/ref_object_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/requirements.txt
 create mode 100644 src/main/resources/shapes/rml-core/shacl.ttl
 create mode 100644 src/main/resources/shapes/rml-core/shared_properties.ttl
 create mode 100644 src/main/resources/shapes/rml-core/subject_map.ttl
 create mode 100644 src/main/resources/shapes/rml-core/term_map.ttl
 create mode 100755 src/main/resources/shapes/rml-core/tests.py
 create mode 100644 src/main/resources/shapes/rml-core/triples_map.ttl
 create mode 100644 src/main/resources/shapes/rml-fnml/README.md
 create mode 100644 src/main/resources/shapes/rml-fnml/external_shapes.ttl
 rename src/main/resources/shapes/{ => rml-fnml}/fnml.ttl (83%)
 create mode 100644 src/main/resources/shapes/rml-fnml/function_execution.ttl
 create mode 100644 src/main/resources/shapes/rml-fnml/function_map.ttl
 create mode 100755 src/main/resources/shapes/rml-fnml/generate_shape.py
 create mode 100644 src/main/resources/shapes/rml-fnml/input.ttl
 create mode 100644 src/main/resources/shapes/rml-fnml/mapping_validator.py
 create mode 100644 src/main/resources/shapes/rml-fnml/parameter_map.ttl
 create mode 100644 src/main/resources/shapes/rml-fnml/requirements.txt
 create mode 100644 src/main/resources/shapes/rml-fnml/return_map.ttl
 create mode 100644 src/main/resources/shapes/rml-fnml/shacl.ttl
 create mode 100755 src/main/resources/shapes/rml-fnml/tests.py
 create mode 100755 src/main/resources/shapes/rml-io/generate_shape.py
 rename src/main/resources/shapes/{ => rml-io}/io.ttl (60%)
 create mode 100644 src/main/resources/shapes/rml-io/logical_source.ttl
 create mode 100644 src/main/resources/shapes/rml-io/logical_target.ttl
 create mode 100644 src/main/resources/shapes/rml-io/mapping_validator.py
 create mode 100644 src/main/resources/shapes/rml-io/relative_path_source.ttl
 create mode 100644 src/main/resources/shapes/rml-io/relative_path_target.ttl
 create mode 100644 src/main/resources/shapes/rml-io/requirements.txt
 create mode 100644 src/main/resources/shapes/rml-io/shapes_graph.ttl
 create mode 100644 src/main/resources/shapes/rml-io/source.ttl
 create mode 100644 src/main/resources/shapes/rml-io/target.ttl
 create mode 100755 src/main/resources/shapes/rml-io/tests.py
 create mode 100644 src/main/resources/shapes/rml-io/utils.py
 rename src/main/resources/shapes/{ => rml-lv}/lv.ttl (100%)
 create mode 100755 src/main/resources/shapes/rml-lv/mapping_validator.py
 create mode 100644 src/main/resources/shapes/rml-lv/requirements.txt
 create mode 100755 src/main/resources/shapes/rml-lv/tests.py
 create mode 100644 src/main/resources/shapes/rml-lv/utils.py
 create mode 100644 src/main/resources/shapes/rml-star/assertedtriples_map.ttl
 create mode 100644 src/main/resources/shapes/rml-star/external_shapes.ttl
 create mode 100755 src/main/resources/shapes/rml-star/generate_shape.py
 create mode 100755 src/main/resources/shapes/rml-star/mapping_validator.py
 create mode 100644 src/main/resources/shapes/rml-star/nonassertedtriples_map.ttl
 create mode 100644 src/main/resources/shapes/rml-star/requirements.txt
 create mode 100644 src/main/resources/shapes/rml-star/shacl.ttl
 create mode 100644 src/main/resources/shapes/rml-star/shared_properties.ttl
 rename src/main/resources/shapes/{ => rml-star}/star.ttl (98%)
 create mode 100644 src/main/resources/shapes/rml-star/star_map.ttl
 create mode 100755 src/main/resources/shapes/rml-star/tests.py
 create mode 100644 src/test/resources/rml-core/docs/20250930/index.html

diff --git a/fetch-test-cases.sh b/fetch-test-cases.sh
index 554f0aba..fb070632 100755
--- a/fetch-test-cases.sh
+++ b/fetch-test-cases.sh
@@ -4,6 +4,7 @@ set -Eeuo pipefail
 # --- config ---
 target_dir="target"
 resources_dir="src/test/resources"
+shapes_resources_dir="src/main/resources/shapes"
 repos=(
   "rml-core"
   "rml-cc"
@@ -47,6 +48,21 @@ for repo in "${repos[@]}"; do
   fi
 done
 
+# Copy shapes into ../src/main/resources/
+echo "Copying shapes directories to ../$shapes_resources_dir ..."
+for repo in "${repos[@]}"; do
+  src="$repo/shapes"
+  dest="../$shapes_resources_dir/$repo"
+  if [[ -d "$src" ]]; then
+    mkdir -p "$dest"
+    # -a to preserve attrs; -r for recursive; --no-target-directory not needed here
+    cp -a "$src/." "$dest/"
+    echo "• Copied $src -> $dest"
+  else
+    echo "• Skipped $repo (no shapes directory found)"
+  fi
+done
+
 # Remove cloned repositories
 echo "Cleaning up cloned repositories..."
 for repo in "${repos[@]}"; do
diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java
index 23b97748..8760bbf7 100644
--- a/src/main/java/burp/model/LogicalView.java
+++ b/src/main/java/burp/model/LogicalView.java
@@ -1,11 +1,5 @@
 package burp.model;
 
-import burp.ls.CSVIteration;
-import com.opencsv.CSVIterator;
-import com.opencsv.CSVParserBuilder;
-import com.opencsv.CSVReader;
-import com.opencsv.CSVReaderBuilder;
-
 import java.io.FileReader;
 import java.util.*;
 
diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java
index 8e2f9d8c..5e5992c8 100644
--- a/src/main/java/burp/parse/Parse.java
+++ b/src/main/java/burp/parse/Parse.java
@@ -66,12 +66,12 @@ public static List parseMappingFile(String mappingFile) throws Excep
 
 	private static boolean isValid(Model mapping) {
 		Model core = ModelFactory.createDefaultModel();
-		core.read(Parse.class.getResourceAsStream("/shapes/core.ttl"), "urn:dummy", FileUtils.langTurtle);
-		core.read(Parse.class.getResourceAsStream("/shapes/cc.ttl"), "urn:dummy", FileUtils.langTurtle);
-		core.read(Parse.class.getResourceAsStream("/shapes/io.ttl"), "urn:dummy", FileUtils.langTurtle);
-        core.read(Parse.class.getResourceAsStream("/shapes/fnml.ttl"), "urn:dummy", FileUtils.langTurtle);
-        core.read(Parse.class.getResourceAsStream("/shapes/lv.ttl"), "urn:dummy", FileUtils.langTurtle);
-        core.read(Parse.class.getResourceAsStream("/shapes/star.ttl"), "urn:dummy", FileUtils.langTurtle);
+		core.read(Parse.class.getResourceAsStream("/shapes/rml-core/core.ttl"), "urn:dummy", FileUtils.langTurtle);
+		core.read(Parse.class.getResourceAsStream("/shapes/rml-cc/cc.ttl"), "urn:dummy", FileUtils.langTurtle);
+		//core.read(Parse.class.getResourceAsStream("/shapes/rml-io/io.ttl"), "urn:dummy", FileUtils.langTurtle);
+        //core.read(Parse.class.getResourceAsStream("/shapes/rml-fnml/fnml.ttl"), "urn:dummy", FileUtils.langTurtle);
+        //core.read(Parse.class.getResourceAsStream("/shapes/rml-lv/lv.ttl"), "urn:dummy", FileUtils.langTurtle);
+        //core.read(Parse.class.getResourceAsStream("/shapes/rml-star/star.ttl"), "urn:dummy", FileUtils.langTurtle);
 
 		ValidationReport report = ShaclValidator.get().validate(core.getGraph(), mapping.getGraph());
 	    if(!report.conforms()) {
diff --git a/src/main/resources/shapes/cc.ttl b/src/main/resources/shapes/rml-cc/cc.ttl
similarity index 89%
rename from src/main/resources/shapes/cc.ttl
rename to src/main/resources/shapes/rml-cc/cc.ttl
index 1496df3f..a3888dfd 100644
--- a/src/main/resources/shapes/cc.ttl
+++ b/src/main/resources/shapes/rml-cc/cc.ttl
@@ -30,7 +30,7 @@
 @prefix xsd:  .
 
  a sh:NodeShape ;
-    sh:and (   [ sh:description """
+    sh:and (   [ rdfs:comment """
             rml:strategy specifies the collection strategy to use: rml:append
             or rml:cartesianProduct. rml:append is the default strategy.
             """ ;
@@ -39,10 +39,10 @@
             Zero or one rml:strategy is required.
             """ ;
                 sh:minCount 0 ;
-                sh:name "strategy" ;
+                rdfs:label "strategy" ;
                 sh:node  ;
                 sh:nodeKind sh:IRI ;
-                sh:path rml:strategy ] [ sh:description """
+                sh:path rml:strategy ] [ rdfs:comment """
             rml:gatherAs specifies how to gather the collection e.g. a rdf:Alt,
             rdf:List, rdf:Bag, or rdf:Seq.
             """ ;
@@ -52,10 +52,10 @@
             One rml:gatherAs is required.
             """ ;
                 sh:minCount 1 ;
-                sh:name "gatherAs" ;
+                rdfs:label "gatherAs" ;
                 sh:nodeKind sh:IRI ;
                 sh:path rml:gatherAs ] [ sh:datatype xsd:boolean ;
-                sh:description """
+                rdfs:comment """
             Defines the behavior when the collection is empty. True will generate
             a rdf:nil for a RDF collection or a resource with no members for an RDF
             container. False will not generate any collection or container.
@@ -67,9 +67,9 @@
             xsd:boolean.
             """ ;
                 sh:minCount 0 ;
-                sh:name "allowEmptyListAndContainer" ;
+                rdfs:label "allowEmptyListAndContainer" ;
                 sh:nodeKind sh:Literal ;
-                sh:path rml:allowEmptyListAndContainer ] [ sh:description """
+                sh:path rml:allowEmptyListAndContainer ] [ rdfs:comment """
             RML Term Maps to gather in the collection or container.
             """ ;
                 sh:message """
@@ -77,17 +77,17 @@
             RML Term Map.
             """ ;
                 sh:minCount 1 ;
-                sh:name "gather" ;
+                rdfs:label "gather" ;
                 sh:nodeKind sh:BlankNodeOrIRI ;
                 sh:path rml:gather ] ) ;
-    sh:description """
+    rdfs:comment """
     Represents a Gather Map.
     """ ;
     sh:message """
     Gather Map requires one rml:strategy, one rml:gatherAs, and a list of
     Term Map with rml:gather.
     """ ;
-    sh:name "GatherMap" .
+    rdfs:label "GatherMap" .
 
  a sh:NodeShape .
 
diff --git a/src/main/resources/shapes/rml-cc/external_shapes.ttl b/src/main/resources/shapes/rml-cc/external_shapes.ttl
new file mode 100644
index 00000000..79e83045
--- /dev/null
+++ b/src/main/resources/shapes/rml-cc/external_shapes.ttl
@@ -0,0 +1,24 @@
+###############################################################################
+# RML FNML external resources shapes                                          #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023)                     #
+###############################################################################
+@prefix sh:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+# Shapes are defined in the corresponding repositories of each specification
+# Provide their IRI as stub to allow validation in CC.
+
+:RMLTermMapShape
+    a sh:NodeShape;   
+.
+
+:RMLLogicalTargetPropertiesShape
+    a sh:NodeShape;
+.
+
+:RMLStrategyAppendShape
+    a sh:NodeShape;
+.
diff --git a/src/main/resources/shapes/rml-cc/gather_map.ttl b/src/main/resources/shapes/rml-cc/gather_map.ttl
new file mode 100644
index 00000000..cf053a74
--- /dev/null
+++ b/src/main/resources/shapes/rml-cc/gather_map.ttl
@@ -0,0 +1,90 @@
+###############################################################################
+# RMLCC Gather Map shape                                                      #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLGatherMapShape
+    a sh:NodeShape ;
+    rdfs:label "GatherMap" ;
+    rdfs:comment """
+    Represents a Gather Map.
+    """ ;
+    sh:message """
+    Gather Map requires one rml:strategy, one rml:gatherAs, and a list of
+    Term Map with rml:gather.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTermMapShape
+        :RMLLogicalTargetPropertiesShape
+        # Gather Map specific shapes
+        [
+            sh:path rml:strategy ;
+            rdfs:label "strategy" ;
+            rdfs:comment """
+            rml:strategy specifies the collection strategy to use: rml:append
+            or rml:cartesianProduct. rml:append is the default strategy.
+            """ ;
+            sh:message """
+            Zero or one rml:strategy is required.
+            """ ;
+            sh:node :RMLStrategyAppendShape ;
+            sh:nodeKind sh:IRI ;
+            sh:minCount 0 ;
+            sh:maxCount 1 ;
+        ]
+        [
+            sh:path rml:gatherAs ;
+            rdfs:label "gatherAs" ;
+            rdfs:comment """
+            rml:gatherAs specifies how to gather the collection e.g. a rdf:Alt,
+            rdf:List, rdf:Bag, or rdf:Seq.
+            """ ;
+            sh:message """
+            One rml:gatherAs is required.
+            """ ;
+            sh:in (rdf:Alt rdf:List rdf:Bag rdf:Seq) ;
+            sh:nodeKind sh:IRI;
+            sh:minCount 1 ;
+            sh:maxCount 1 ;
+        ]
+        [
+            sh:path rml:allowEmptyListAndContainer ;
+            rdfs:label "allowEmptyListAndContainer" ;
+            rdfs:comment """
+            Defines the behavior when the collection is empty. True will generate
+            a rdf:nil for a RDF collection or a resource with no members for an RDF
+            container. False will not generate any collection or container.
+            Default is false.
+            """ ;
+            sh:message """
+            Zero or one rml:allowEmptyListAndContainer is required with datatype
+            xsd:boolean.
+            """ ;
+            sh:minCount 0 ;
+            sh:maxCount 1 ;
+            sh:nodeKind sh:Literal ;
+            sh:datatype xsd:boolean ;
+        ]
+        [
+            sh:path rml:gather ;
+            rdfs:label "gather" ;
+            rdfs:comment """
+            RML Term Maps to gather in the collection or container.
+            """ ;
+            sh:message """
+            one or more rml:gather properties are needed, each pointing to a
+            RML Term Map.
+            """ ;
+            sh:nodeKind sh:BlankNodeOrIRI ;
+            sh:minCount 1 ;
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-cc/generate_shape.py b/src/main/resources/shapes/rml-cc/generate_shape.py
new file mode 100755
index 00000000..5d4db637
--- /dev/null
+++ b/src/main/resources/shapes/rml-cc/generate_shape.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+
+import argparse
+import sys
+from os import path
+from glob import glob
+from rdflib import Graph, Namespace
+from rdflib.plugins.serializers.turtle import TurtleSerializer
+from rdflib import plugin
+
+SUBSHAPE_FORMAT = 'turtle'
+SUBSHAPE_GLOB_PATTERN = '*.ttl'
+SHACL = Namespace('http://www.w3.org/ns/shacl#')
+RML = Namespace('http://w3id.org/rml/')
+
+
+class TurtleWithPrefixes(TurtleSerializer):
+    """
+    A turtle serializer that always emits prefixes
+    Workaround for https://github.com/RDFLib/rdflib/issues/1048
+    """
+    roundtrip_prefixes = True  # Undocumented, forces to write all prefixes
+
+
+class ShapeGenerator:
+    """
+    Generates a complete SHACL shape of all the SHACL subshapes.
+    Useful for using the shapes in the shacl.org Playground.
+    """
+    def __init__(self, glob_pattern: str, rdf_format: str,
+                 destination: str) -> None:
+        self._glob_pattern: str = glob_pattern
+        self._rdf_format: str = rdf_format
+        self._destination: str = destination
+        self._shape = Graph()
+        self._shape.bind('sh', SHACL)
+        self._shape.bind('rml', RML)
+        # Register TurtleWithPrefixes serializer as 'tortoise' format
+        plugin.register('tortoise',
+                        plugin.Serializer,
+                        'generate_shape',
+                        'TurtleWithPrefixes')
+
+    def generate(self) -> None:
+        """
+        Generate a full shape from the sub shapes.
+        """
+        print('Reading subshapes:')
+        for sub_shape in glob(self._glob_pattern):
+            if 'cc' in sub_shape or 'shacl' in sub_shape:
+                continue
+            print(f"\t{sub_shape}")
+            g = Graph()
+            g.bind('sh', SHACL)
+            g.bind('rml', RML)
+            self._shape += g.parse(sub_shape, format=self._rdf_format)
+
+        print(f'Writing shape to {self._destination}')
+        self._shape.serialize(destination=self._destination, format='tortoise')
+
+
+if __name__ == '__main__':
+    p = argparse.ArgumentParser(description='Generate a complete SHACL shape '
+                                'from the subshapes.')
+    p.add_argument('destination', type=str, help='Location to write the '
+                   'complete SHACL shape as Turtle.')
+    # Arguments parsing
+    args = p.parse_args()
+    if not path.exists(args.destination):
+        print(f'{args.destination} file path does not exist!')
+        sys.exit(1)
+
+    if path.isdir(args.destination):
+        args.destination = path.join(args.destination, 'cc.ttl')
+
+    # Generate shape
+    generator = ShapeGenerator(SUBSHAPE_GLOB_PATTERN, SUBSHAPE_FORMAT,
+                               args.destination)
+    generator.generate()
diff --git a/src/main/resources/shapes/rml-cc/mapping_validator.py b/src/main/resources/shapes/rml-cc/mapping_validator.py
new file mode 100644
index 00000000..f239f596
--- /dev/null
+++ b/src/main/resources/shapes/rml-cc/mapping_validator.py
@@ -0,0 +1,40 @@
+from logging import debug, info, critical
+from pyshacl import validate
+from rdflib import Graph
+from shutil import get_terminal_size
+
+
+class MappingValidator:
+    def __init__(self, shape: str) -> None:
+        g = Graph()
+        g.parse(shape, format='turtle')
+        self._shape = g
+
+    def validate(self, rules: Graph, print_report: bool = True) -> None:
+        valid: bool
+        report_graph: Graph
+        report_text: str
+        valid, report_graph, report_text = validate(rules,
+                                                    shacl_graph=self._shape)
+        debug(f'RML rules valid: {valid}')
+        debug(f'SHACL validation report: {report_text}')
+
+        # If mapping rules are invalid, print SHACL report and raise exception
+        if not valid and print_report:
+            self._print_report(report_text)
+            msg = 'RML mapping rules are invalid, a detailed explanation' \
+                ' is available in the report'
+            critical(msg)
+            raise ValueError(msg)
+
+    def _print_report(self, report_text: str) -> None:
+        tty_columns: int
+        tty_columns, _ = get_terminal_size()
+        info('-' * tty_columns)
+        title: str = 'RML rules validation report'
+        white_space: int = int((tty_columns - len(title)) / 2)
+        title = ' ' * white_space + title + ' ' * white_space
+        info(title)
+        info('-' * tty_columns)
+        info(report_text)
+        info('-' * tty_columns)
\ No newline at end of file
diff --git a/src/main/resources/shapes/rml-cc/requirements.txt b/src/main/resources/shapes/rml-cc/requirements.txt
new file mode 100644
index 00000000..e9fdd848
--- /dev/null
+++ b/src/main/resources/shapes/rml-cc/requirements.txt
@@ -0,0 +1,3 @@
+parameterized
+rdflib
+pyshacl
\ No newline at end of file
diff --git a/src/main/resources/shapes/rml-cc/shacl.ttl b/src/main/resources/shapes/rml-cc/shacl.ttl
new file mode 100644
index 00000000..e37856a1
--- /dev/null
+++ b/src/main/resources/shapes/rml-cc/shacl.ttl
@@ -0,0 +1,406 @@
+@prefix rdf:   .
+@prefix rdfs:  .
+@prefix sh:    .
+@prefix xsd:   .
+
+@prefix shsh:  .
+
+shsh:
+	rdfs:label "SHACL for SHACL"@en ;
+	rdfs:comment "This shapes graph can be used to validate SHACL shapes graphs against a subset of the SHACL syntax rules."@en ;
+	sh:declare [
+		sh:prefix "shsh" ;
+		sh:namespace "http://www.w3.org/ns/shacl-shacl#" ;
+	] .
+
+	
+shsh:ListShape
+	a sh:NodeShape ;
+	rdfs:label "List shape"@en ;
+	rdfs:comment "A shape describing well-formed RDF lists. Currently does not check for non-recursion. This could be expressed using SHACL-SPARQL."@en ;
+	rdfs:seeAlso  ;
+	sh:property [
+		sh:path [ sh:zeroOrMorePath rdf:rest ] ;
+		rdfs:comment "Each list member (including this node) must be have the shape shsh:ListNodeShape."@en ;
+		sh:hasValue rdf:nil ;
+		sh:node shsh:ListNodeShape ;
+	] .
+
+shsh:ListNodeShape
+	a sh:NodeShape ;
+	rdfs:label "List node shape"@en ;
+	rdfs:comment "Defines constraints on what it means for a node to be a node within a well-formed RDF list. Note that this does not check whether the rdf:rest items are also well-formed lists as this would lead to unsupported recursion."@en ;
+	sh:or ( [
+				sh:hasValue rdf:nil ;
+        		sh:property [
+					sh:path rdf:first ;
+					sh:maxCount 0 ;
+				] ;
+				sh:property [
+					sh:path rdf:rest ;
+					sh:maxCount 0 ;
+				] ;
+			]
+			[
+				sh:not [ sh:hasValue rdf:nil ] ;
+				sh:property [
+					sh:path rdf:first ;
+					sh:maxCount 1 ;
+					sh:minCount 1 ;
+				] ;
+				sh:property [
+					sh:path rdf:rest ;
+					sh:maxCount 1 ;
+					sh:minCount 1 ;
+				] ;
+			] ) .
+
+shsh:ShapeShape
+	a sh:NodeShape ;
+	rdfs:label "Shape shape"@en ;
+	rdfs:comment "A shape that can be used to validate syntax rules for other shapes."@en ;
+	
+	# See https://www.w3.org/TR/shacl/#shapes for what counts as a shape
+	sh:targetClass sh:NodeShape ;
+	sh:targetClass sh:PropertyShape ;
+	sh:targetSubjectsOf sh:targetClass, sh:targetNode, sh:targetObjectsOf, sh:targetSubjectsOf ;
+	sh:targetSubjectsOf sh:and, sh:class, sh:closed, sh:datatype, sh:disjoint, sh:equals, sh:flags, sh:hasValue,
+		sh:ignoredProperties, sh:in, sh:languageIn, sh:lessThan, sh:lessThanOrEquals, sh:maxCount, sh:maxExclusive,
+		sh:maxInclusive, sh:maxLength, sh:minCount, sh:minExclusive, sh:minInclusive, sh:minLength, sh:node, sh:nodeKind,
+		sh:not, sh:or, sh:pattern, sh:property, sh:qualifiedMaxCount, sh:qualifiedMinCount, sh:qualifiedValueShape,
+		sh:qualifiedValueShape, sh:qualifiedValueShapesDisjoint, sh:qualifiedValueShapesDisjoint, sh:uniqueLang, sh:xone ;
+
+	sh:targetObjectsOf sh:node ;        # node-node
+	sh:targetObjectsOf sh:not ;         # not-node
+	sh:targetObjectsOf sh:property ;    # property-node
+	sh:targetObjectsOf sh:qualifiedValueShape ; # qualifiedValueShape-node
+
+	# Shapes are either node shapes or property shapes
+	sh:xone ( shsh:NodeShapeShape shsh:PropertyShapeShape ) ;
+
+	sh:property [
+		sh:path sh:targetNode ;
+		sh:nodeKind	sh:IRIOrLiteral ;   # targetNode-nodeKind
+	] ; 
+	sh:property [
+		sh:path sh:targetClass ;
+		sh:nodeKind sh:IRI ;            # targetClass-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:targetSubjectsOf ;
+		sh:nodeKind sh:IRI ;            # targetSubjectsOf-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:targetObjectsOf ;
+		sh:nodeKind sh:IRI ;            # targetObjectsOf-nodeKind
+	] ;
+	sh:or ( [ sh:not [ 
+				sh:class rdfs:Class ; 
+				sh:or ( [ sh:class sh:NodeShape ] [ sh:class sh:PropertyShape ] )
+			] ]
+			[ sh:nodeKind sh:IRI ]
+		  ) ;                           # implicit-targetClass-nodeKind
+	
+	sh:property [
+		sh:path sh:severity ;
+		sh:maxCount 1 ;                 # severity-maxCount
+		sh:nodeKind sh:IRI ;            # severity-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:message ;
+		sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ;   # message-datatype
+	] ;
+	sh:property [
+		sh:path sh:deactivated ;
+		sh:maxCount 1 ;                 # deactivated-maxCount
+		sh:in ( true false ) ;          # deactivated-datatype
+	] ;
+
+	sh:property [
+		sh:path sh:and ;
+		sh:node shsh:ListShape ;        # and-node
+	] ;
+	sh:property [
+		sh:path sh:class ;
+		sh:nodeKind sh:IRI ;            # class-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:closed ;
+		sh:datatype xsd:boolean ;       # closed-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:ignoredProperties ;
+		sh:node shsh:ListShape ;        # ignoredProperties-node
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path ( sh:ignoredProperties [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:nodeKind sh:IRI ;            # ignoredProperties-members-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:datatype ;
+		sh:nodeKind sh:IRI ;            # datatype-nodeKind
+		sh:maxCount 1 ;                 # datatype-maxCount
+	] ;
+	sh:property [
+		sh:path sh:disjoint ;
+		sh:nodeKind sh:IRI ;            # disjoint-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:equals ;
+		sh:nodeKind sh:IRI ;            # equals-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:in ;
+		sh:maxCount 1 ;                 # in-maxCount		
+		sh:node shsh:ListShape ;        # in-node
+	] ;
+	sh:property [
+		sh:path sh:languageIn ;
+		sh:maxCount 1 ;                 # languageIn-maxCount
+		sh:node shsh:ListShape ;        # languageIn-node
+	] ;
+	sh:property [
+		sh:path ( sh:languageIn [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:datatype xsd:string ;        # languageIn-members-datatype
+	] ;
+	sh:property [
+		sh:path sh:lessThan ;
+		sh:nodeKind sh:IRI ;            # lessThan-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:lessThanOrEquals ;
+		sh:nodeKind sh:IRI ;            # lessThanOrEquals-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxCount ;
+		sh:datatype xsd:integer ;       # maxCount-datatype
+		sh:maxCount 1 ;                 # maxCount-maxCount
+	] ;
+	sh:property [
+		sh:path sh:maxExclusive ;
+		sh:maxCount 1 ;                 # maxExclusive-maxCount
+		sh:nodeKind sh:Literal ;        # maxExclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxInclusive ;
+		sh:maxCount 1 ;                 # maxInclusive-maxCount
+		sh:nodeKind sh:Literal ;        # maxInclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxLength ;
+		sh:datatype xsd:integer ;       # maxLength-datatype
+		sh:maxCount 1 ;                 # maxLength-maxCount
+	] ;
+	sh:property [
+		sh:path sh:minCount ;
+		sh:datatype xsd:integer ;       # minCount-datatype
+		sh:maxCount 1 ;                 # minCount-maxCount
+	] ;
+	sh:property [
+		sh:path sh:minExclusive ;
+		sh:maxCount 1 ;                 # minExclusive-maxCount
+		sh:nodeKind sh:Literal ;        # minExclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:minInclusive ;
+		sh:maxCount 1 ;                 # minInclusive-maxCount
+		sh:nodeKind sh:Literal ;        # minInclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:minLength ;
+		sh:datatype xsd:integer ;       # minLength-datatype
+		sh:maxCount 1 ;                 # minLength-maxCount
+	] ;
+	sh:property [
+		sh:path sh:nodeKind ;
+		sh:in ( sh:BlankNode sh:IRI sh:Literal sh:BlankNodeOrIRI sh:BlankNodeOrLiteral sh:IRIOrLiteral ) ;	# nodeKind-in
+		sh:maxCount 1 ;                 # nodeKind-maxCount
+	] ;
+	sh:property [
+		sh:path sh:or ;
+		sh:node shsh:ListShape ;        # or-node
+	] ;
+	sh:property [
+		sh:path sh:pattern ;
+		sh:datatype xsd:string ;        # pattern-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+		# Not implemented: syntax rule pattern-regex
+	] ;
+	sh:property [
+		sh:path sh:flags ;
+		sh:datatype xsd:string ;        # flags-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedMaxCount ;
+		sh:datatype xsd:integer ;       # qualifiedMaxCount-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedMinCount ;
+		sh:datatype xsd:integer ;       # qualifiedMinCount-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShape ;
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShapesDisjoint ;
+		sh:datatype xsd:boolean ;       # qualifiedValueShapesDisjoint-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:uniqueLang ;
+		sh:datatype xsd:boolean ;       # uniqueLang-datatype
+		sh:maxCount 1 ;                 # uniqueLang-maxCount
+	] ;
+	sh:property [
+		sh:path sh:xone ;
+		sh:node shsh:ListShape ;        # xone-node
+	] .
+	
+shsh:NodeShapeShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:node ;        # node-node
+	sh:property [
+		sh:path sh:path ;
+		sh:maxCount 0 ;                 # NodeShape-path-maxCount
+	] ;
+	sh:property [
+		sh:path sh:lessThan ;
+		sh:maxCount 0 ;                 # lessThan-scope
+	] ;
+	sh:property [
+		sh:path sh:lessThanOrEquals ;
+		sh:maxCount 0 ;                 # lessThanOrEquals-scope
+	] ;
+	sh:property [
+		sh:path sh:maxCount ;
+		sh:maxCount 0 ;                 # maxCount-scope
+	] ;
+	sh:property [
+		sh:path sh:minCount ;
+		sh:maxCount 0 ;                 # minCount-scope
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShape ;
+		sh:maxCount 0 ;                 # qualifiedValueShape-scope
+	] ;
+	sh:property [
+		sh:path sh:uniqueLang ;
+		sh:maxCount 0 ;                 # uniqueLang-scope
+	] .
+
+shsh:PropertyShapeShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:property ;    # property-node
+	sh:property [
+		sh:path sh:path ;
+		sh:maxCount 1 ;                 # path-maxCount
+		sh:minCount 1 ;                 # PropertyShape-path-minCount
+		sh:node shsh:PathShape ;        # path-node
+	] .
+
+# Values of sh:and, sh:or and sh:xone must be lists of shapes
+shsh:ShapesListShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:and ;         # and-members-node
+	sh:targetObjectsOf sh:or ;          # or-members-node
+	sh:targetObjectsOf sh:xone ;        # xone-members-node
+	sh:property [
+		sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:node shsh:ShapeShape ;
+	] .
+
+
+# A path of blank node path syntax, used to simulate recursion
+_:PathPath
+	sh:alternativePath (
+		( [ sh:zeroOrMorePath rdf:rest ] rdf:first )
+		( sh:alternativePath [ sh:zeroOrMorePath rdf:rest ] rdf:first )
+		sh:inversePath
+		sh:zeroOrMorePath
+		sh:oneOrMorePath
+		sh:zeroOrOnePath 
+	) .
+
+shsh:PathShape
+	a sh:NodeShape ;
+	rdfs:label "Path shape"@en ;
+	rdfs:comment "A shape that can be used to validate the syntax rules of well-formed SHACL paths."@en ;
+	rdfs:seeAlso  ;
+	sh:property [
+		sh:path [ sh:zeroOrMorePath _:PathPath ] ;
+		sh:node shsh:PathNodeShape ;
+	] .
+
+shsh:PathNodeShape
+	sh:xone (                           # path-metarule
+			[ sh:nodeKind sh:IRI ]          # 2.3.1.1: Predicate path
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.2: Sequence path
+			  sh:node shsh:PathListWithAtLeast2Members ;
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.3: Alternative path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:alternativePath ;
+			    sh:node shsh:PathListWithAtLeast2Members ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ]
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.4: Inverse path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:inversePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.5: Zero-or-more path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:zeroOrMorePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.6: One-or-more path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:oneOrMorePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.7: Zero-or-one path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:zeroOrOnePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+		) .
+
+shsh:PathListWithAtLeast2Members
+	a sh:NodeShape ;
+	sh:node shsh:ListShape ;
+	sh:property [
+		sh:path [ sh:oneOrMorePath rdf:rest ] ;
+		sh:minCount 2 ;    # 1 other list node plus rdf:nil
+	] .
+
+shsh:ShapesGraphShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:shapesGraph ;
+	sh:nodeKind sh:IRI .                # shapesGraph-nodeKind
+
+shsh:EntailmentShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:entailment ;
+	sh:nodeKind sh:IRI .                # entailment-nodeKind
+
diff --git a/src/main/resources/shapes/rml-cc/tests.py b/src/main/resources/shapes/rml-cc/tests.py
new file mode 100755
index 00000000..91dfdde8
--- /dev/null
+++ b/src/main/resources/shapes/rml-cc/tests.py
@@ -0,0 +1,76 @@
+#!/usr/bin/env python
+#
+# (c) Dylan Van Assche (2020 - 2023)
+# IDLab - Ghent University - imec
+# MIT license
+#
+
+import os
+import argparse
+import unittest
+import logging
+from parameterized import parameterized
+from glob import glob
+from rdflib import Graph
+
+from mapping_validator import MappingValidator
+
+TEST_CASES_DIR = os.path.join(os.path.abspath('../test-cases'),
+                              '*/mapping.ttl')
+CC_SHAPE_FILE = os.path.abspath('cc.ttl')
+SHACL_SHAPE_FILE = os.path.abspath('shacl.ttl')
+
+
+class MappingValidatorTests(unittest.TestCase):
+    def _validate_rules(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+        mapping_validator = MappingValidator(CC_SHAPE_FILE)
+        mapping_validator.validate(rules)
+
+    def _validate_shapes(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+        mapping_validator = MappingValidator(SHACL_SHAPE_FILE)
+        mapping_validator.validate(rules)
+
+    def test_non_existing_mapping_rules(self) -> None:
+        with self.assertRaises(FileNotFoundError):
+            p = os.path.abspath('does_not_exist.ttl')
+            self._validate_rules(p)
+
+    @parameterized.expand([(p,) for p in sorted(glob(TEST_CASES_DIR))],
+                          skip_on_empty=True)
+    def test_validation_rules(self, path: str) -> None:
+        """
+        Test if our SHACL shapes are able to validate our validation mapping
+        rules test cases.
+        """
+        print(f'Testing validation with: {path}')
+        self._validate_rules(path)
+
+    def test_validation_shapes(self) -> None:
+        """
+        Test if our SHACL shapes are valid according to the W3C Recommdendation
+        of SHACL. Validation with the official SHACL shapes for SHACL.
+
+        See https://www.w3.org/TR/shacl/#shacl-shacl
+        """
+        path = './cc.ttl'
+        print(f'Testing shape with: {path}')
+        self._validate_shapes(path)
+
+
+if __name__ == '__main__':
+    parser = argparse.ArgumentParser(description='Execute tests for SHACL '
+                                     'shapes on RML mapping rules.')
+    parser.add_argument('--verbose', '-v', action='count', default=1,
+                        help='Set verbosity level of messages. Example: -vvv')
+    args = parser.parse_args()
+
+    args.verbose = 70 - (10 * args.verbose) if args.verbose > 0 else 0
+    logging.basicConfig(level=args.verbose,
+                        format='%(asctime)s %(levelname)s: %(message)s',
+                        datefmt='%Y-%m-%d %H:%M:%S')
+
+    print(TEST_CASES_DIR)
+    unittest.main(failfast=True)
+
diff --git a/src/main/resources/shapes/rml-core/README.md b/src/main/resources/shapes/rml-core/README.md
new file mode 100644
index 00000000..54f12392
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/README.md
@@ -0,0 +1,7 @@
+# SHACL shapes for RML mapping rules
+
+SHACL shapes to validate RML mapping rules.
+
+## License
+
+This code is copyrighted by [IDLab – Ghent University – imec](http://idlab.ugent.be/) and released under the [MIT license](http://opensource.org/licenses/MIT).
diff --git a/src/main/resources/shapes/rml-core/child_map.ttl b/src/main/resources/shapes/rml-core/child_map.ttl
new file mode 100644
index 00000000..a867cea4
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/child_map.ttl
@@ -0,0 +1,46 @@
+###############################################################################
+# RML Child Map shape                                                        #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)             #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLChildMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:ChildMap ;
+    sh:targetObjectsOf rml:childMap ;
+    rdfs:label "ChildMap" ;
+    rdfs:comment """
+    Represents a Child Map.
+    """ ;
+    sh:message """
+    rml:ChildMap must specify a literal referencing data in the child data
+    source.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLExpressionMapShape
+        # Child Map specific shapes
+        [
+        ]
+    ) ;
+.
+
+:RMLchildShape
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:child ;
+    rdfs:label "child" ;
+    rdfs:comment """
+    A Literal reference to use as reference to the child data source.
+    """ ;
+    sh:message """
+    rml:child shortcut for rml:ChildMap must be a Literal.
+    """ ;
+    sh:nodeKind sh:Literal ;
+    sh:datatype xsd:string ;
+.
diff --git a/src/main/resources/shapes/core.ttl b/src/main/resources/shapes/rml-core/core.ttl
similarity index 97%
rename from src/main/resources/shapes/core.ttl
rename to src/main/resources/shapes/rml-core/core.ttl
index 6ecc2ec3..0bc85999 100644
--- a/src/main/resources/shapes/core.ttl
+++ b/src/main/resources/shapes/rml-core/core.ttl
@@ -67,7 +67,7 @@
             """ ;
                 sh:path rml:termType ] ) ;
     sh:message """
-    rml:GraphMap must specify an rml:template, rml:reference or rml:constant
+    rml:GraphMap must specify an rml:template, rml:reference or rml:constant 
     with the IRI of the Named Graph.
     """ ;
     sh:targetClass rml:GraphMap ;
@@ -79,12 +79,12 @@
     Represents a Join.
     """ ;
     sh:message """
-    rml:Join must specify exactly one rml:parent/rml:parentMap
+    rml:Join must specify exactly one rml:parent/rml:parentMap 
     and rml:child/rml:childMap.
     """ ;
     sh:property [ rdfs:label "parentMap/parent" ;
             rdfs:comment """
-        rml:parent/rml:parentMap may only be provided once and
+        rml:parent/rml:parentMap may only be provided once and 
         not at the same time.
         """ ;
             sh:maxCount 1 ;
@@ -113,7 +113,7 @@
         Specifies the parent of the object component for joining.
         """ ;
             sh:message """
-        rml:parentMap must point to a rml:ParentMap specifying the
+        rml:parentMap must point to a rml:ParentMap specifying the 
         parent tag of the string Literal.
         """ ;
             sh:nodeKind sh:BlankNodeOrIRI ;
@@ -128,7 +128,7 @@
             sh:targetSubjectsOf rml:parent ],
         [ rdfs:label "childMap/child" ;
             rdfs:comment """
-        rml:child/rml:childMap may only be provided once and
+        rml:child/rml:childMap may only be provided once and 
         not at the same time.
         """ ;
             sh:maxCount 1 ;
@@ -176,7 +176,7 @@
             """ ;
                 sh:path rml:termType ] ) ;
     sh:message """
-    Predicate Object Map must generate an IRI representing the predicate of an
+    Predicate Object Map must generate an IRI representing the predicate of an 
     RDF triple.
     """ ;
     sh:targetClass rml:PredicateMap ;
@@ -199,7 +199,7 @@
                 sh:targetSubjectsOf rml:predicate,
                     rml:predicateMap ] [ rdfs:label "predicateMap" ;
                 rdfs:comment """
-            A PredicateMap element to generate the predicate component of the
+            A PredicateMap element to generate the predicate component of the 
             (predicate, object) pair from a logical table row or iterator.
             """ ;
                 sh:message """
@@ -209,7 +209,7 @@
                 sh:path rml:predicateMap ;
                 sh:targetSubjectsOf rml:predicateMap ] [ rdfs:label "predicate" ;
                 rdfs:comment """
-            Specifies the predicate for the generated triple from the logical table
+            Specifies the predicate for the generated triple from the logical table 
             row or iterator.
             """ ;
                 sh:message """
@@ -230,7 +230,7 @@
                     rml:objectMap,
                     rml:quotedTriplesMap ] [ rdfs:label "objectMap" ;
                 rdfs:comment """
-            An ObjectMap element to generate the object component of the
+            An ObjectMap element to generate the object component of the 
             (predicate, object) pair from a logical table row or iterator.
             """ ;
                 sh:message """
@@ -290,7 +290,7 @@
  a sh:NodeShape ;
     rdfs:label "datatype" ;
     rdfs:comment """
-    An IRI reference for use as the graph name of all triples generated with
+    An IRI reference for use as the graph name of all triples generated with 
     the datatype.
     """ ;
     sh:message """
@@ -302,8 +302,8 @@
  a sh:NodeShape ;
     rdfs:label "graph" ;
     rdfs:comment """
-    An IRI reference for use as the graph name of all triples generated with
-    the Graph Map.
+    An IRI reference for use as the graph name of all triples generated with 
+    the Graph Map. 
     """ ;
     sh:message """
     rml:graph must be an IRI or blank node.
@@ -330,7 +330,7 @@
     An IRI, Blank Node, or Literal to use as object for all the RDF triples.
     """ ;
     sh:message """
-    rml:object shortcut for rml:objectMap must be an IRI, Blank Node,
+    rml:object shortcut for rml:objectMap must be an IRI, Blank Node, 
     or Literal.
     """ ;
     sh:targetObjectsOf rml:object .
@@ -378,7 +378,8 @@
     rml:AbstractLogicalSource must specify how to generate logical iterations on a data source for a triples map.
     """ ;
     sh:node  ;
-    sh:targetClass rml:AbstractLogicalSource .
+    sh:targetClass rml:AbstractLogicalSource ;
+    sh:targetObjectsOf rml:logicalSource .
 
  a sh:NodeShape ;
     rdfs:label "Iterable" ;
@@ -390,12 +391,12 @@
     """ ;
     sh:property [ rdfs:label "rml:referenceFormulation" ;
             rdfs:comment """
-        The reference formulation (rml:referenceFormulation) defines how to
+        The reference formulation (rml:referenceFormulation) defines how to 
         reference to elements of the data of the input source.
         """ ;
             sh:maxCount 1 ;
             sh:message """
-        rml:referenceFormulation must be a blank node or IRI specifying the
+        rml:referenceFormulation must be a blank node or IRI specifying the 
         reference formulation on how to reference elements of a data source,
         and may be provided at most once.
         """ ;
@@ -403,24 +404,22 @@
             sh:path rml:referenceFormulation ],
         [ rdfs:label "rml:iterator" ;
             rdfs:comment """
-        The logical iterator (rml:iterator) defines the iteration loop used to
+        The logical iterator (rml:iterator) defines the iteration loop used to 
         map the data of the input source. Depends on the reference formulation
-        if an iterator is necessary.
+        if an iterator is necessary.  
         """ ;
-            sh:datatype xsd:string ;
             sh:maxCount 1 ;
             sh:message """
-        rml:iterator must be a Literal specifying the iterator to iterate over
+        rml:iterator specifies the iterator to iterate over
         the data source, and may be provided at most once.
         """ ;
-            sh:nodeKind sh:Literal ;
             sh:path rml:iterator ] ;
     sh:targetClass rml:Iterable .
 
  a sh:PropertyShape ;
     rdfs:label "joinCondition" ;
     rdfs:comment """
-    Specifies the join condition for joining a child data source with
+    Specifies the join condition for joining a child data source with 
     a parent data source of the foreign key constraint.
     """ ;
     sh:message """
@@ -444,18 +443,18 @@
                 sh:minCount 0 ;
                 sh:path [ sh:alternativePath ( rml:languageMap rml:datatypeMap rml:language rml:datatype ) ] ] [ rdfs:label "languageMap" ;
                 rdfs:comment """
-            Specified the language map for the object component for the
+            Specified the language map for the object component for the 
             generated RDF triples.
             """ ;
                 sh:message """
-            rml:languageMap must point to a rml:LanguageMap specifying the
+            rml:languageMap must point to a rml:LanguageMap specifying the 
             language tag of the string Literal.
             """ ;
                 sh:nodeKind sh:BlankNodeOrIRI ;
                 sh:path rml:languageMap ;
                 sh:targetSubjectsOf rml:languageMap ] [ rdfs:label "datatypeMap" ;
                 rdfs:comment """
-            Specifies the datatype of the object component for the generated
+            Specifies the datatype of the object component for the generated 
             RDF triples.
             """ ;
                 sh:message """
@@ -503,7 +502,7 @@
                 sh:path rml:parentTriplesMap ;
                 sh:targetSubjectsOf rml:parentTriplesMap ] ) ;
     sh:message """
-    rml:RefObjectMap must specify a rml:parentTriplesMap and zero or more
+    rml:RefObjectMap must specify a rml:parentTriplesMap and zero or more 
     rml:joinConditions.
     """ ;
     sh:targetClass rml:RefObjectMap .
@@ -625,11 +624,11 @@
             rdfs:comment """
         Specifies a Graph Map. When used with a Subject Map element, all the
         RDF triples generated will be stored in the specified named graph.
-        Otherwise, the RDF triple generated using the (predicate, object)
+        Otherwise, the RDF triple generated using the (predicate, object) 
         pair will be stored in the specified named graph.
         """ ;
             sh:message """
-        rml:graphMap must be either an IRI or blank node.
+        rml:graphMap must be either an IRI or blank node. 
         """ ;
             sh:nodeKind sh:BlankNodeOrIRI ;
             sh:path rml:graphMap ],
@@ -638,7 +637,7 @@
         An IRI reference to use as the named graph of all generated triples.
         """ ;
             sh:message """
-        rml:graphMap must be an IRI.
+        rml:graphMap must be an IRI. 
         """ ;
             sh:nodeKind sh:IRI ;
             sh:path rml:graph ] ;
@@ -654,7 +653,7 @@
     """ ;
     sh:and (  [ rdfs:label "termType" ;
                 rdfs:comment """
-            An IRI indicating whether a generated term should be an IRI,
+            An IRI indicating whether a generated term should be an IRI, 
             Blank Node, or a Literal.
             """ ;
                 sh:in ( rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:Literal rml:BlankNode ) ;
@@ -690,7 +689,6 @@
         Exactly one rml:template, one rml:constant, one rml:reference,
         one rml:returnMap, or one rml:functionExecution is required.
         """ ;
-            sh:minCount 0 ;
             sh:path [ sh:alternativePath ( rml:template rml:constant rml:reference rml:returnMap rml:functionExecution ) ] ;
             sh:targetSubjectsOf rml:constant,
                 rml:functionExecution,
@@ -699,14 +697,14 @@
                 rml:template ],
         [ rdfs:label "reference" ;
             rdfs:comment """
-        A reference rml:reference is used to refer to a column in case of
-        databases, a record in case of CSV or TSV data source, an element in
+        A reference rml:reference is used to refer to a column in case of 
+        databases, a record in case of CSV or TSV data source, an element in 
         case of XML data source, an object in case of a JSON data source, etc.
 
-        A reference must be a valid identifier, considering the reference
+        A reference must be a valid identifier, considering the reference 
         formulation (rml:referenceFormulation) specified. The reference can be
-        an absolute path, or a path relative to the iterator specified at the
-        logical source.
+        an absolute path, or a path relative to the iterator specified at the 
+        logical source. 
         """ ;
             sh:datatype xsd:string ;
             sh:message """
@@ -730,8 +728,8 @@
             sh:targetSubjectsOf rml:returnMap ],
         [ rdfs:label "functionExecution" ;
             rdfs:comment """
-        A Function Execution rml:functionExecution is used to define the FnO
-        function to execute from the RML-FNML specification. RML Core only
+        A Function Execution rml:functionExecution is used to define the FnO 
+        function to execute from the RML-FNML specification. RML Core only 
         validates if the property is present and has the right node kind.
         The actual validation happens with RML-FNML SHACL shapes.
         """ ;
@@ -743,7 +741,7 @@
             sh:targetSubjectsOf rml:functionExecution ],
         [ rdfs:label "template" ;
             rdfs:comment """
-        A template (format string) to specify how to generate a value for a
+        A template (format string) to specify how to generate a value for a 
         subject, predicate, or object, using one or more columns from a logical
         table row or iterator.
         """ ;
@@ -755,7 +753,7 @@
             sh:path rml:template ],
         [ rdfs:label "constant" ;
             rdfs:comment """
-        A property for indicating whether a term map is a constant-valued term
+        A property for indicating whether a term map is a constant-valued term 
         map.
         """ ;
             sh:message """
@@ -777,3 +775,4 @@
     sh:nodeKind sh:BlankNodeOrIRI ;
     sh:path rml:logicalTarget ;
     sh:targetSubjectsOf rml:logicalTarget .
+
diff --git a/src/main/resources/shapes/rml-core/datatype_map.ttl b/src/main/resources/shapes/rml-core/datatype_map.ttl
new file mode 100644
index 00000000..b56da668
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/datatype_map.ttl
@@ -0,0 +1,47 @@
+###############################################################################
+# RML Datatype Map and datatype shortcut shape                                #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLDatatypeMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:DatatypeMap ;
+    sh:targetObjectsOf rml:datatypeMap ;
+    rdfs:label "DatatypeMap" ;
+    rdfs:comment """
+    Represents a Datatype Map.
+    """ ;
+    sh:message """
+    rml:DatatypeMap must specify an rml:template, rml:reference, or rml:constant
+    with the IRI of the datatype.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLExpressionMapShape
+        # Datatype Map specific shapes
+        [
+        ]
+    ) ;
+.
+
+
+:RMLdatatypeShape 
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:datatype ;
+    rdfs:label "datatype" ;
+    rdfs:comment """
+    An IRI reference for use as the graph name of all triples generated with 
+    the datatype.
+    """ ;
+    sh:message """
+    rml:datatype must be an IRI.
+    """ ;
+    sh:nodeKind sh:IRI ;
+.
diff --git a/src/main/resources/shapes/rml-core/expression_map.ttl b/src/main/resources/shapes/rml-core/expression_map.ttl
new file mode 100644
index 00000000..fc10303b
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/expression_map.ttl
@@ -0,0 +1,137 @@
+###############################################################################
+# RML Expression Map shape                                                    #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLExpressionMapShape
+    a sh:NodeShape ;
+    rdfs:label "ExpressionMap" ;
+    rdfs:comment """
+    Represents a Expression Map.
+    """ ;
+    sh:message """
+    Expression Map requires one rml:template or one rml:constant or one
+    rml:reference.
+    """ ;
+
+    # Exactly one rml:template, one rml:constant, one rml:reference,
+    # one rml:returnMap, or one rml:functionExecution is required.
+    sh:property [
+        sh:targetSubjectsOf rml:template ;
+        sh:targetSubjectsOf rml:constant ;
+        sh:targetSubjectsOf rml:reference ;
+        sh:targetSubjectsOf rml:returnMap ;
+        sh:targetSubjectsOf rml:functionExecution ;
+        sh:path [sh:alternativePath (rml:template 
+                                     rml:constant
+                                     rml:reference
+                                     rml:returnMap
+                                     rml:functionExecution)] ;
+        rdfs:label "template/constant/reference/returnMap/functionExecution" ;
+        rdfs:comment """
+        Exactly one rml:template, one rml:constant, one rml:reference,
+        one rml:returnMap, or one rml:functionExecution is required.
+        """ ;
+        sh:message """
+        Exactly one rml:template, one rml:constant, one rml:reference,
+        one rml:returnMap, or one rml:functionExecution is required.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+    ] ;
+
+    # rml:template
+    sh:property [
+        sh:path rml:template ;
+        rdfs:label "template" ;
+        rdfs:comment """
+        A template (format string) to specify how to generate a value for a 
+        subject, predicate, or object, using one or more columns from a logical
+        table row or iterator.
+        """ ;
+        sh:message """
+        rml:template must be a string.
+        """ ;
+        sh:nodeKind sh:Literal ;
+        sh:datatype xsd:string ;
+    ] ;
+
+    # rml:constant
+    sh:property [
+        sh:targetSubjectsOf rml:constant ;
+        sh:path rml:constant ;
+        rdfs:label "constant" ;
+        rdfs:comment """
+        A property for indicating whether a term map is a constant-valued term 
+        map.
+        """ ;
+        sh:message """
+        rml:constant must be an IRI or Literal.
+        """ ;
+        # Allow BlankNodes so ex:Student works as well for rml:constant
+    ] ;
+
+    # rml:reference
+    sh:property [
+        sh:targetSubjectsOf rml:reference ;
+        sh:path rml:reference ;
+        rdfs:label "reference" ;
+        rdfs:comment """
+        A reference rml:reference is used to refer to a column in case of 
+        databases, a record in case of CSV or TSV data source, an element in 
+        case of XML data source, an object in case of a JSON data source, etc.
+
+        A reference must be a valid identifier, considering the reference 
+        formulation (rml:referenceFormulation) specified. The reference can be
+        an absolute path, or a path relative to the iterator specified at the 
+        logical source. 
+        """ ;
+        sh:message """
+        rml:reference must be a string.
+        """ ;
+        sh:nodeKind sh:Literal ;
+        sh:datatype xsd:string ;
+    ] ;
+
+    # rml:returnMap
+    sh:property [
+        sh:targetSubjectsOf rml:returnMap ;
+        sh:path rml:returnMap ;
+        rdfs:label "returnMap" ;
+        rdfs:comment """
+        A Return Map rml:returnMap is used to define the return values of a FnO
+        function from the RML-FNML specification. RML Core only validates if the
+        property is present and has the right node kind. The actual validation
+        happens with RML-FNML SHACL shapes.
+        """ ;
+        sh:message """
+        rml:returnMap must be an IRI;
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+        # Allow BlankNodes so nested structurces works as well for rml:returnMap
+    ] ;
+
+    # rml:functionExecution
+    sh:property [
+        sh:targetSubjectsOf rml:functionExecution ;
+        sh:path rml:functionExecution ;
+        rdfs:label "functionExecution" ;
+        rdfs:comment """
+        A Function Execution rml:functionExecution is used to define the FnO 
+        function to execute from the RML-FNML specification. RML Core only 
+        validates if the property is present and has the right node kind.
+        The actual validation happens with RML-FNML SHACL shapes.
+        """ ;
+        sh:message """
+        rml:functionExecution must be an IRI;
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+        # Allow BlankNodes so nested structurces works as well for rml:returnMap
+    ] ;
+.
diff --git a/src/main/resources/shapes/rml-core/external_shapes.ttl b/src/main/resources/shapes/rml-core/external_shapes.ttl
new file mode 100644
index 00000000..066b10e1
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/external_shapes.ttl
@@ -0,0 +1,16 @@
+###############################################################################
+# RML external resources shapes                                               #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023)                     #
+###############################################################################
+@prefix sh:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+# Shapes are defined in the corresponding repositories of each specification
+# Provide their IRI as stub to allow validation in Core.
+
+:RMLStarMapShape
+    a sh:NodeShape;   
+.
diff --git a/src/main/resources/shapes/rml-core/generate_shape.py b/src/main/resources/shapes/rml-core/generate_shape.py
new file mode 100755
index 00000000..a480b204
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/generate_shape.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+
+import argparse
+import sys
+from os import path
+from glob import glob
+from rdflib import Graph, Namespace
+from rdflib.plugins.serializers.turtle import TurtleSerializer
+from rdflib import plugin
+
+SUBSHAPE_FORMAT = 'turtle'
+SUBSHAPE_GLOB_PATTERN = '*.ttl'
+SHACL = Namespace('http://www.w3.org/ns/shacl#')
+RML = Namespace('http://w3id.org/rml/')
+
+
+class TurtleWithPrefixes(TurtleSerializer):
+    """
+    A turtle serializer that always emits prefixes
+    Workaround for https://github.com/RDFLib/rdflib/issues/1048
+    """
+    roundtrip_prefixes = True  # Undocumented, forces to write all prefixes
+
+
+class ShapeGenerator:
+    """
+    Generates a complete SHACL shape of all the SHACL subshapes.
+    Useful for using the shapes in the shacl.org Playground.
+    """
+    def __init__(self, glob_pattern: str, rdf_format: str,
+                 destination: str) -> None:
+        self._glob_pattern: str = glob_pattern
+        self._rdf_format: str = rdf_format
+        self._destination: str = destination
+        self._shape = Graph()
+        self._shape.bind('sh', SHACL)
+        self._shape.bind('rml', RML)
+        # Register TurtleWithPrefixes serializer as 'tortoise' format
+        plugin.register('tortoise',
+                        plugin.Serializer,
+                        'generate_shape',
+                        'TurtleWithPrefixes')
+
+    def generate(self) -> None:
+        """
+        Generate a full shape from the sub shapes.
+        """
+        print('Reading subshapes:')
+        for sub_shape in glob(self._glob_pattern):
+            if 'core' in sub_shape or 'shacl' in sub_shape:
+                continue
+            print(f"\t{sub_shape}")
+            g = Graph()
+            g.bind('sh', SHACL)
+            g.bind('rml', RML)
+            self._shape += g.parse(sub_shape, format=self._rdf_format)
+
+        print(f'Writing shape to {self._destination}')
+        self._shape.serialize(destination=self._destination, format='tortoise')
+
+
+if __name__ == '__main__':
+    p = argparse.ArgumentParser(description='Generate a complete SHACL shape '
+                                'from the subshapes.')
+    p.add_argument('destination', type=str, help='Location to write the '
+                   'complete SHACL shape as Turtle.')
+    # Arguments parsing
+    args = p.parse_args()
+    if not path.exists(args.destination):
+        print(f'{args.destination} file path does not exist!')
+        sys.exit(1)
+
+    if path.isdir(args.destination):
+        args.destination = path.join(args.destination, 'core.ttl')
+
+    # Generate shape
+    generator = ShapeGenerator(SUBSHAPE_GLOB_PATTERN, SUBSHAPE_FORMAT,
+                               args.destination)
+    generator.generate()
diff --git a/src/main/resources/shapes/rml-core/graph_map.ttl b/src/main/resources/shapes/rml-core/graph_map.ttl
new file mode 100644
index 00000000..6b7d6912
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/graph_map.ttl
@@ -0,0 +1,55 @@
+###############################################################################
+# RML Graph Map and graph shortcut shape                                      #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLGraphMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:GraphMap ;
+    sh:targetObjectsOf rml:graphMap ;
+    rdfs:label "GraphMap" ;
+    rdfs:comment """
+    Represents a Graph Map.
+    """ ;
+    sh:message """
+    rml:GraphMap must specify an rml:template, rml:reference or rml:constant 
+    with the IRI of the Named Graph.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTermMapShape
+        :RMLLogicalTargetPropertiesShape
+        # Graph Map specific shapes
+        [
+            sh:path rml:termType;
+            sh:message """
+            rml:termType must be an rml:IRI, rml:UnsafeIRI, rml:URI,
+            rml:UnsafeURI, or rml:BlankNode for a Graph Map.
+            """;
+            sh:in (rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:BlankNode);
+        ]
+    ) ;
+.
+
+
+:RMLgraphShape 
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:graph ;
+    rdfs:label "graph" ;
+    rdfs:comment """
+    An IRI reference for use as the graph name of all triples generated with 
+    the Graph Map. 
+    """ ;
+    sh:message """
+    rml:graph must be an IRI or blank node.
+    """ ;
+    # Allow blank nodes because SHACL sees ex:PersonGraph also as blank node.
+    sh:nodeKind sh:BlankNodeOrIRI ;
+.
diff --git a/src/main/resources/shapes/rml-core/iterable.ttl b/src/main/resources/shapes/rml-core/iterable.ttl
new file mode 100644
index 00000000..7a81f3a8
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/iterable.ttl
@@ -0,0 +1,65 @@
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLIterableShape
+    a sh:NodeShape ;
+    sh:targetClass rml:Iterable ;
+    rdfs:label "Iterable" ;
+    rdfs:comment """
+    An abstract construct to describe data access and iteration for a data source.
+    """ ;
+    sh:message """
+    Iterable must specify how to generate logical iterations on a data source.
+    """ ;
+
+    # rml:referenceFormulation
+    sh:property [
+        sh:path rml:referenceFormulation ;
+        rdfs:label "rml:referenceFormulation" ;
+        rdfs:comment """
+        The reference formulation (rml:referenceFormulation) defines how to 
+        reference to elements of the data of the input source.
+        """ ;
+        sh:message """
+        rml:referenceFormulation must be a blank node or IRI specifying the 
+        reference formulation on how to reference elements of a data source,
+        and may be provided at most once.
+        """ ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+    ] ;
+
+    # rml:iterator
+    sh:property [
+        sh:path rml:iterator ;
+        rdfs:label "rml:iterator" ;
+        rdfs:comment """
+        The logical iterator (rml:iterator) defines the iteration loop used to 
+        map the data of the input source. Depends on the reference formulation
+        if an iterator is necessary.  
+        """ ;
+        sh:message """
+        rml:iterator specifies the iterator to iterate over
+        the data source, and may be provided at most once.
+        """ ;
+        sh:maxCount 1
+    ] ;
+.
+
+:RMLAbstractLogicalSourceShape
+    a sh:NodeShape ;
+    sh:targetClass rml:AbstractLogicalSource ;
+    sh:targetObjectsOf rml:logicalSource ;
+    rdfs:label "Abstract Logical Source" ;
+    rdfs:comment """
+    A sub-class of iterable that can be associated with a triples map such that a data source can be mapped to RDF triples.
+    """ ;
+    sh:message """
+    rml:AbstractLogicalSource must specify how to generate logical iterations on a data source for a triples map.
+    """ ;
+    sh:node :RMLIterableShape ;
+.
diff --git a/src/main/resources/shapes/rml-core/join.ttl b/src/main/resources/shapes/rml-core/join.ttl
new file mode 100644
index 00000000..4e2dbf85
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/join.ttl
@@ -0,0 +1,93 @@
+###############################################################################
+# RML Join shape                                                              #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023i - 2024)             #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLJoinShape
+    a sh:NodeShape ;
+    sh:targetClass rml:Join ;
+    sh:targetObjectsOf rml:joinCondition ;
+    rdfs:label "Join" ;
+    rdfs:comment """
+    Represents a Join.
+    """ ;
+    sh:message """
+    rml:Join must specify exactly one rml:parent/rml:parentMap 
+    and rml:child/rml:childMap.
+    """ ;
+
+    sh:property [
+        sh:path [ sh:alternativePath ( rml:parentMap rml:parent ) ];
+        rdfs:label "parentMap/parent" ;
+        rdfs:comment """
+        rml:parent/rml:parentMap may only be provided once and 
+        not at the same time.
+        """ ;
+        sh:maxCount 1 ;
+        sh:minCount 1 ;
+    ] ;
+    sh:property [
+        sh:targetSubjectsOf rml:parentMap ;
+        sh:path rml:parentMap ;
+        rdfs:label "parentMap" ;
+        rdfs:comment """
+        Specifies the parent of the object component for joining.
+        """ ;
+        sh:message """
+        rml:parentMap must point to a rml:ParentMap specifying the 
+        parent tag of the string Literal.
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+    ] ;
+
+    sh:property [
+        sh:targetSubjectsOf rml:parent ;
+        sh:path rml:parent ;
+        rdfs:label "parent" ;
+        rdfs:comment """
+        Specifies the parent of the object component for joining.
+        """ ;
+        sh:nodeKind sh:Literal ;
+    ] ;
+
+    sh:property [
+        sh:path [ sh:alternativePath ( rml:childMap rml:child ) ];
+        rdfs:label "childMap/child" ;
+        rdfs:comment """
+        rml:child/rml:childMap may only be provided once and 
+        not at the same time.
+        """ ;
+        sh:maxCount 1 ;
+        sh:minCount 1 ;
+    ] ;
+
+    sh:property [
+        sh:targetSubjectsOf rml:childMap ;
+        sh:path rml:childMap ;
+        rdfs:label "childMap" ;
+        rdfs:comment """
+        Specifies the child of the object component for joining.
+        """ ;
+        sh:message """
+        rml:childMap must point to a rml:ChildMap specifying the
+        child of the Literal.
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+    ] ;
+
+    sh:property [
+        sh:targetSubjectsOf rml:child ;
+        sh:path rml:child ;
+        rdfs:label "child" ;
+        rdfs:comment """
+        Specifies the child of the object component for joining.
+        """ ;
+        sh:nodeKind sh:Literal ;
+    ] ;
+.
diff --git a/src/main/resources/shapes/rml-core/language_map.ttl b/src/main/resources/shapes/rml-core/language_map.ttl
new file mode 100644
index 00000000..6ed2369b
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/language_map.ttl
@@ -0,0 +1,50 @@
+###############################################################################
+# RML Language Map and language shortcut shape                                #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023i - 2024)             #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLLanguageMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:LanguageMap ;
+    sh:targetObjectsOf rml:languageMap ;
+    rdfs:label "LanguageMap" ;
+    rdfs:comment """
+    Represents a Language Map.
+    """ ;
+    sh:message """
+    rml:LanguageMap must specify an rml:template, rml:reference, or rml:constant
+    with the BCP47 name of the language as string.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLExpressionMapShape
+        # Language Map specific shapes
+        [
+            sh:path rml:constant ;
+            sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ;
+        ]
+    ) ;
+.
+
+
+:RMLlanguageShape 
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:language ;
+    rdfs:label "language" ;
+    rdfs:comment """
+    Specified the language for the generated Literal.
+    """ ;
+    sh:message """
+    rml:language must be a valid language tag according to BCP47 and may
+    only be provided once as string.
+    """ ;
+    sh:pattern "^((?:(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?:([A-Za-z]{2,3}(-(?:[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4})(-(?:[A-Za-z]{4}))?(-(?:[A-Za-z]{2}|[0-9]{3}))?(-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?:[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?:x(-[A-Za-z0-9]{1,8})+))?)|(?:x(-[A-Za-z0-9]{1,8})+))$" ;
+    sh:nodeKind sh:Literal ;
+.
diff --git a/src/main/resources/shapes/rml-core/mapping_validator.py b/src/main/resources/shapes/rml-core/mapping_validator.py
new file mode 100755
index 00000000..dabb1d24
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/mapping_validator.py
@@ -0,0 +1,40 @@
+from logging import debug, info, critical
+from pyshacl import validate
+from rdflib import Graph
+from shutil import get_terminal_size
+
+
+class MappingValidator:
+    def __init__(self, shape: str) -> None:
+        g = Graph()
+        g.parse(shape, format='turtle')
+        self._shape = g
+
+    def validate(self, rules: Graph, print_report: bool = True) -> None:
+        valid: bool
+        report_graph: Graph
+        report_text: str
+        valid, report_graph, report_text = validate(rules,
+                                                    shacl_graph=self._shape)
+        debug(f'RML rules valid: {valid}')
+        debug(f'SHACL validation report: {report_text}')
+
+        # If mapping rules are invalid, print SHACL report and raise exception
+        if not valid and print_report:
+            self._print_report(report_text)
+            msg = 'RML mapping rules are invalid, a detailed explanation' \
+                ' is available in the report'
+            critical(msg)
+            raise ValueError(msg)
+
+    def _print_report(self, report_text: str) -> None:
+        tty_columns: int
+        tty_columns, _ = get_terminal_size()
+        info('-' * tty_columns)
+        title: str = 'RML rules validation report'
+        white_space: int = int((tty_columns - len(title)) / 2)
+        title = ' ' * white_space + title + ' ' * white_space
+        info(title)
+        info('-' * tty_columns)
+        info(report_text)
+        info('-' * tty_columns)
diff --git a/src/main/resources/shapes/rml-core/object_map.ttl b/src/main/resources/shapes/rml-core/object_map.ttl
new file mode 100644
index 00000000..e10ae138
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/object_map.ttl
@@ -0,0 +1,100 @@
+###############################################################################
+# RML Object Map and object shortcut shape                                    #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLObjectMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:ObjectMap ;
+    rdfs:label "ObjectMap" ;
+    rdfs:comment """
+    Represents an Object Map.
+    """ ;
+    sh:message """
+    Object Map must generate a IRI, Blank Node, or Literal which has optionally
+    a language tag or datatype.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTermMapShape
+        :RMLLogicalTargetPropertiesShape
+        # Object Map specific shapes
+        [
+            sh:path [ sh:alternativePath (rml:languageMap rml:datatypeMap
+                                          rml:language rml:datatype) ] ;
+            rdfs:label "languageMap/datatypeMap/language/datatype" ;
+            rdfs:comment """
+            rml:language/rml:languageMap and rml:datatype/rml:datatypeMap
+            may only be provided once and not at the same time.
+            """ ;
+            sh:maxCount 1 ;
+            sh:minCount 0 ;
+        ]
+        [
+            sh:path rml:languageMap ;
+            sh:targetSubjectsOf rml:languageMap ;
+            rdfs:label "languageMap" ;
+            rdfs:comment """
+            Specified the language map for the object component for the 
+            generated RDF triples.
+            """ ;
+            sh:message """
+            rml:languageMap must point to a rml:LanguageMap specifying the 
+            language tag of the string Literal.
+            """ ;
+            sh:nodeKind sh:BlankNodeOrIRI ;
+        ]
+        [
+            sh:path rml:datatypeMap ;
+            sh:targetSubjectsOf rml:datatypeMap ;
+            rdfs:label "datatypeMap" ;
+            rdfs:comment """
+            Specifies the datatype of the object component for the generated 
+            RDF triples.
+            """ ;
+            sh:message """
+            rml:datatypeMap must point to a rml:DatatypeMap specifying the
+            datatype of the Literal.
+            """ ;
+            sh:nodeKind sh:BlankNodeOrIRI ;
+        ]
+        [
+            sh:path rml:language ;
+            rdfs:label "language" ;
+            rdfs:comment """
+            Language tag for the object.
+            """ ;
+            sh:nodeKind sh:Literal ;
+        ]
+        [
+            sh:path rml:datatype ;
+            sh:targetSubjectsOf rml:datatype ;
+            rdfs:label "datatype" ;
+            rdfs:comment """
+            Datatype for the object.
+            """ ;
+            sh:nodeKind sh:IRI ;
+        ]
+    ) ;
+.
+
+
+:RMLobjectShape 
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:object ;
+    rdfs:label "object" ;
+    rdfs:comment """
+    An IRI, Blank Node, or Literal to use as object for all the RDF triples.
+    """ ;
+    sh:message """
+    rml:object shortcut for rml:objectMap must be an IRI, Blank Node, 
+    or Literal.
+    """ ;
+.
diff --git a/src/main/resources/shapes/rml-core/parent_map.ttl b/src/main/resources/shapes/rml-core/parent_map.ttl
new file mode 100644
index 00000000..9e338ce1
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/parent_map.ttl
@@ -0,0 +1,46 @@
+###############################################################################
+# RML Parent Map shape                                                        #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLParentMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:ParentMap ;
+    sh:targetObjectsOf rml:parentMap ;
+    rdfs:label "ParentMap" ;
+    rdfs:comment """
+    Represents a Parent Map.
+    """ ;
+    sh:message """
+    rml:ParentMap must specify a literal referencing data in the parent data
+    source.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLExpressionMapShape
+        # Parent Map specific shapes
+        [
+        ]
+    ) ;
+.
+
+:RMLparentShape
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:parent ;
+    rdfs:label "parent" ;
+    rdfs:comment """
+    A Literal reference to use as reference to the parent data source.
+    """ ;
+    sh:message """
+    rml:parent shortcut for rml:ParentMap must be a Literal.
+    """ ;
+    sh:nodeKind sh:Literal ;
+    sh:datatype xsd:string ;
+.
diff --git a/src/main/resources/shapes/rml-core/predicate_map.ttl b/src/main/resources/shapes/rml-core/predicate_map.ttl
new file mode 100644
index 00000000..feb37bb3
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/predicate_map.ttl
@@ -0,0 +1,52 @@
+###############################################################################
+# RML Predicate Map and predicate shortcut shape                              #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLPredicateMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:PredicateMap ;
+    sh:targetObjectsOf rml:predicateMap ;
+    rdfs:label "PredicateMap" ;
+    rdfs:comment """
+    Represents a Predicate Map.
+    """ ;
+    sh:message """
+    Predicate Object Map must generate an IRI representing the predicate of an 
+    RDF triple.
+    """ ;
+    sh:and (
+        # Inherited shapes
+        :RMLTermMapShape
+        :RMLLogicalTargetPropertiesShape
+        # Predicate Map specific shapes
+        [
+            sh:path rml:termType;
+            sh:message """
+            rml:termType for Predicate Map can only be a rml:IRI, rml:UnsafeIRI,
+            rml:URI, or rml:UnsafeURI;
+            """;
+            sh:in (rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI);
+        ]
+    ) ;
+.
+
+
+:RMLpredicateShape
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:predicate ;
+    rdfs:label "predicate" ;
+    rdfs:comment """
+    Specifies the predicate for the generated triple.
+    """ ;
+    sh:message """
+    rml:predicate must be an IRI.
+    """ ;
+    sh:nodeKind sh:IRI ;
+.
diff --git a/src/main/resources/shapes/rml-core/predicate_object_map.ttl b/src/main/resources/shapes/rml-core/predicate_object_map.ttl
new file mode 100644
index 00000000..56a6cfb1
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/predicate_object_map.ttl
@@ -0,0 +1,107 @@
+###############################################################################
+# RML Predicate Object Map shape                                              #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLPredicateObjectMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:PredicateObjectMap ;
+    sh:targetObjectsOf rml:predicateObjectMap ;
+    rdfs:label "PredicateObjectMap" ;
+    rdfs:comment """
+    Represents a Predicate Object Map.
+    """;
+
+    sh:and (
+        # Inherited shapes
+        :RMLGraphMapPropertiesShape
+        :RMLLogicalTargetPropertiesShape
+        # Predicate Map specific shapes
+        [
+            sh:targetSubjectsOf rml:predicate ;
+            sh:targetSubjectsOf rml:predicateMap ;
+            sh:path [sh:alternativePath (rml:predicate rml:predicateMap)] ;
+            rdfs:label "predicate/predicateMap" ;
+            rdfs:comment """
+            At least one rml:predicate or rml:predicateMap must be provided.
+            """ ;
+            sh:message """
+            At least one rml:predicate or rml:predicateMap must be provided.
+            """ ;
+            sh:minCount 1 ;
+        ]
+        [
+            sh:targetSubjectsOf rml:predicateMap ;
+            sh:path rml:predicateMap ;
+            rdfs:label "predicateMap" ;
+            rdfs:comment """
+            A PredicateMap element to generate the predicate component of the 
+            (predicate, object) pair from a logical table row or iterator.
+            """ ;
+            sh:message """
+            rml:predicateMap must be an IRI or blank node and be provided once.
+            """ ;
+            sh:nodeKind sh:BlankNodeOrIRI ;
+        ]
+        [
+            sh:targetSubjectsOf rml:predicate ;
+            sh:path rml:predicate ;
+            rdfs:label "predicate" ;
+            rdfs:comment """
+            Specifies the predicate for the generated triple from the logical table 
+            row or iterator.
+            """ ;
+            sh:message """
+            rml:predicate must be an IRI and be provided once.
+            """ ;
+            sh:nodeKind sh:IRI ;
+        ]
+        [
+            sh:targetSubjectsOf rml:object ;
+            sh:targetSubjectsOf rml:objectMap ;
+            sh:targetSubjectsOf rml:quotedTriplesMap ;
+            sh:path [sh:alternativePath (rml:object rml:objectMap rml:quotedTriplesMap)] ;
+            rdfs:label "object/objectMap/quotedTriplesMap" ;
+            rdfs:comment """
+            Either an rml:object, rml:objectMap, or rml:quotedTriplesMap must be provided, not multiple.
+            """ ;
+            sh:message """
+            Either an rml:object, rml:objectMap, or rml:quotedTriplesMap must be provided, not multiple
+            """ ;
+            sh:minCount 1 ;
+        ]
+        [
+            sh:targetSubjectsOf rml:objectMap ;
+            sh:path rml:objectMap ;
+            rdfs:label "objectMap" ;
+            rdfs:comment """
+            An ObjectMap element to generate the object component of the 
+            (predicate, object) pair from a logical table row or iterator.
+            """ ;
+            sh:message """
+            rml:objectMap must be an IRI or blank node and be provided once.
+            """ ;
+            sh:nodeKind sh:BlankNodeOrIRI ;
+            sh:or ([sh:node :RMLObjectMapShape] 
+                   [sh:node :RMLRefObjectMapShape]
+                   [sh:node :RMLStarMapShape]) ;
+        ]
+        [
+            sh:targetSubjectsOf rml:object ;
+            sh:path rml:object ;
+            rdfs:label "object" ;
+            rdfs:comment """
+            Specifies the object for the generated RDF triples.
+            """ ;
+            sh:message """
+            rml:object must be an IRI and be provided once.
+            """ ;
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-core/ref_object_map.ttl b/src/main/resources/shapes/rml-core/ref_object_map.ttl
new file mode 100644
index 00000000..d4086c59
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/ref_object_map.ttl
@@ -0,0 +1,46 @@
+###############################################################################
+# RML RefObjectMap shape                                                      #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLRefObjectMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:RefObjectMap ;
+    rdfs:label "RefObjectMap" ;
+    rdfs:comment """
+    Represents a Reference Object Map.
+    """ ;
+    sh:message """
+    rml:RefObjectMap must specify a rml:parentTriplesMap and zero or more 
+    rml:joinConditions.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLJoinConditionPropertiesShape
+        # RefObjectMap specific shapes
+        [
+            sh:targetSubjectsOf rml:parentTriplesMap ;
+            sh:path rml:parentTriplesMap ;
+            rdfs:label "parentTriplesMap" ;
+            rdfs:comment """
+            Specifies the Triples Map element corresponding to the parent data
+            source of the foreign key constraint.
+            """ ;
+            sh:message """
+            rml:parentTriplesMap may only be provided once and must be an IRI
+            or Blank Node referring to a Triples Map.
+            """ ;
+            sh:class rml:TriplesMap ;
+            sh:nodeKind sh:BlankNodeOrIRI ;
+            sh:minCount 1 ;
+            sh:maxCount 1 ;
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-core/requirements.txt b/src/main/resources/shapes/rml-core/requirements.txt
new file mode 100644
index 00000000..3d264b8e
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/requirements.txt
@@ -0,0 +1,3 @@
+parameterized
+rdflib
+pyshacl
diff --git a/src/main/resources/shapes/rml-core/shacl.ttl b/src/main/resources/shapes/rml-core/shacl.ttl
new file mode 100644
index 00000000..e37856a1
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/shacl.ttl
@@ -0,0 +1,406 @@
+@prefix rdf:   .
+@prefix rdfs:  .
+@prefix sh:    .
+@prefix xsd:   .
+
+@prefix shsh:  .
+
+shsh:
+	rdfs:label "SHACL for SHACL"@en ;
+	rdfs:comment "This shapes graph can be used to validate SHACL shapes graphs against a subset of the SHACL syntax rules."@en ;
+	sh:declare [
+		sh:prefix "shsh" ;
+		sh:namespace "http://www.w3.org/ns/shacl-shacl#" ;
+	] .
+
+	
+shsh:ListShape
+	a sh:NodeShape ;
+	rdfs:label "List shape"@en ;
+	rdfs:comment "A shape describing well-formed RDF lists. Currently does not check for non-recursion. This could be expressed using SHACL-SPARQL."@en ;
+	rdfs:seeAlso  ;
+	sh:property [
+		sh:path [ sh:zeroOrMorePath rdf:rest ] ;
+		rdfs:comment "Each list member (including this node) must be have the shape shsh:ListNodeShape."@en ;
+		sh:hasValue rdf:nil ;
+		sh:node shsh:ListNodeShape ;
+	] .
+
+shsh:ListNodeShape
+	a sh:NodeShape ;
+	rdfs:label "List node shape"@en ;
+	rdfs:comment "Defines constraints on what it means for a node to be a node within a well-formed RDF list. Note that this does not check whether the rdf:rest items are also well-formed lists as this would lead to unsupported recursion."@en ;
+	sh:or ( [
+				sh:hasValue rdf:nil ;
+        		sh:property [
+					sh:path rdf:first ;
+					sh:maxCount 0 ;
+				] ;
+				sh:property [
+					sh:path rdf:rest ;
+					sh:maxCount 0 ;
+				] ;
+			]
+			[
+				sh:not [ sh:hasValue rdf:nil ] ;
+				sh:property [
+					sh:path rdf:first ;
+					sh:maxCount 1 ;
+					sh:minCount 1 ;
+				] ;
+				sh:property [
+					sh:path rdf:rest ;
+					sh:maxCount 1 ;
+					sh:minCount 1 ;
+				] ;
+			] ) .
+
+shsh:ShapeShape
+	a sh:NodeShape ;
+	rdfs:label "Shape shape"@en ;
+	rdfs:comment "A shape that can be used to validate syntax rules for other shapes."@en ;
+	
+	# See https://www.w3.org/TR/shacl/#shapes for what counts as a shape
+	sh:targetClass sh:NodeShape ;
+	sh:targetClass sh:PropertyShape ;
+	sh:targetSubjectsOf sh:targetClass, sh:targetNode, sh:targetObjectsOf, sh:targetSubjectsOf ;
+	sh:targetSubjectsOf sh:and, sh:class, sh:closed, sh:datatype, sh:disjoint, sh:equals, sh:flags, sh:hasValue,
+		sh:ignoredProperties, sh:in, sh:languageIn, sh:lessThan, sh:lessThanOrEquals, sh:maxCount, sh:maxExclusive,
+		sh:maxInclusive, sh:maxLength, sh:minCount, sh:minExclusive, sh:minInclusive, sh:minLength, sh:node, sh:nodeKind,
+		sh:not, sh:or, sh:pattern, sh:property, sh:qualifiedMaxCount, sh:qualifiedMinCount, sh:qualifiedValueShape,
+		sh:qualifiedValueShape, sh:qualifiedValueShapesDisjoint, sh:qualifiedValueShapesDisjoint, sh:uniqueLang, sh:xone ;
+
+	sh:targetObjectsOf sh:node ;        # node-node
+	sh:targetObjectsOf sh:not ;         # not-node
+	sh:targetObjectsOf sh:property ;    # property-node
+	sh:targetObjectsOf sh:qualifiedValueShape ; # qualifiedValueShape-node
+
+	# Shapes are either node shapes or property shapes
+	sh:xone ( shsh:NodeShapeShape shsh:PropertyShapeShape ) ;
+
+	sh:property [
+		sh:path sh:targetNode ;
+		sh:nodeKind	sh:IRIOrLiteral ;   # targetNode-nodeKind
+	] ; 
+	sh:property [
+		sh:path sh:targetClass ;
+		sh:nodeKind sh:IRI ;            # targetClass-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:targetSubjectsOf ;
+		sh:nodeKind sh:IRI ;            # targetSubjectsOf-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:targetObjectsOf ;
+		sh:nodeKind sh:IRI ;            # targetObjectsOf-nodeKind
+	] ;
+	sh:or ( [ sh:not [ 
+				sh:class rdfs:Class ; 
+				sh:or ( [ sh:class sh:NodeShape ] [ sh:class sh:PropertyShape ] )
+			] ]
+			[ sh:nodeKind sh:IRI ]
+		  ) ;                           # implicit-targetClass-nodeKind
+	
+	sh:property [
+		sh:path sh:severity ;
+		sh:maxCount 1 ;                 # severity-maxCount
+		sh:nodeKind sh:IRI ;            # severity-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:message ;
+		sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ;   # message-datatype
+	] ;
+	sh:property [
+		sh:path sh:deactivated ;
+		sh:maxCount 1 ;                 # deactivated-maxCount
+		sh:in ( true false ) ;          # deactivated-datatype
+	] ;
+
+	sh:property [
+		sh:path sh:and ;
+		sh:node shsh:ListShape ;        # and-node
+	] ;
+	sh:property [
+		sh:path sh:class ;
+		sh:nodeKind sh:IRI ;            # class-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:closed ;
+		sh:datatype xsd:boolean ;       # closed-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:ignoredProperties ;
+		sh:node shsh:ListShape ;        # ignoredProperties-node
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path ( sh:ignoredProperties [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:nodeKind sh:IRI ;            # ignoredProperties-members-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:datatype ;
+		sh:nodeKind sh:IRI ;            # datatype-nodeKind
+		sh:maxCount 1 ;                 # datatype-maxCount
+	] ;
+	sh:property [
+		sh:path sh:disjoint ;
+		sh:nodeKind sh:IRI ;            # disjoint-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:equals ;
+		sh:nodeKind sh:IRI ;            # equals-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:in ;
+		sh:maxCount 1 ;                 # in-maxCount		
+		sh:node shsh:ListShape ;        # in-node
+	] ;
+	sh:property [
+		sh:path sh:languageIn ;
+		sh:maxCount 1 ;                 # languageIn-maxCount
+		sh:node shsh:ListShape ;        # languageIn-node
+	] ;
+	sh:property [
+		sh:path ( sh:languageIn [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:datatype xsd:string ;        # languageIn-members-datatype
+	] ;
+	sh:property [
+		sh:path sh:lessThan ;
+		sh:nodeKind sh:IRI ;            # lessThan-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:lessThanOrEquals ;
+		sh:nodeKind sh:IRI ;            # lessThanOrEquals-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxCount ;
+		sh:datatype xsd:integer ;       # maxCount-datatype
+		sh:maxCount 1 ;                 # maxCount-maxCount
+	] ;
+	sh:property [
+		sh:path sh:maxExclusive ;
+		sh:maxCount 1 ;                 # maxExclusive-maxCount
+		sh:nodeKind sh:Literal ;        # maxExclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxInclusive ;
+		sh:maxCount 1 ;                 # maxInclusive-maxCount
+		sh:nodeKind sh:Literal ;        # maxInclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxLength ;
+		sh:datatype xsd:integer ;       # maxLength-datatype
+		sh:maxCount 1 ;                 # maxLength-maxCount
+	] ;
+	sh:property [
+		sh:path sh:minCount ;
+		sh:datatype xsd:integer ;       # minCount-datatype
+		sh:maxCount 1 ;                 # minCount-maxCount
+	] ;
+	sh:property [
+		sh:path sh:minExclusive ;
+		sh:maxCount 1 ;                 # minExclusive-maxCount
+		sh:nodeKind sh:Literal ;        # minExclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:minInclusive ;
+		sh:maxCount 1 ;                 # minInclusive-maxCount
+		sh:nodeKind sh:Literal ;        # minInclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:minLength ;
+		sh:datatype xsd:integer ;       # minLength-datatype
+		sh:maxCount 1 ;                 # minLength-maxCount
+	] ;
+	sh:property [
+		sh:path sh:nodeKind ;
+		sh:in ( sh:BlankNode sh:IRI sh:Literal sh:BlankNodeOrIRI sh:BlankNodeOrLiteral sh:IRIOrLiteral ) ;	# nodeKind-in
+		sh:maxCount 1 ;                 # nodeKind-maxCount
+	] ;
+	sh:property [
+		sh:path sh:or ;
+		sh:node shsh:ListShape ;        # or-node
+	] ;
+	sh:property [
+		sh:path sh:pattern ;
+		sh:datatype xsd:string ;        # pattern-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+		# Not implemented: syntax rule pattern-regex
+	] ;
+	sh:property [
+		sh:path sh:flags ;
+		sh:datatype xsd:string ;        # flags-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedMaxCount ;
+		sh:datatype xsd:integer ;       # qualifiedMaxCount-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedMinCount ;
+		sh:datatype xsd:integer ;       # qualifiedMinCount-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShape ;
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShapesDisjoint ;
+		sh:datatype xsd:boolean ;       # qualifiedValueShapesDisjoint-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:uniqueLang ;
+		sh:datatype xsd:boolean ;       # uniqueLang-datatype
+		sh:maxCount 1 ;                 # uniqueLang-maxCount
+	] ;
+	sh:property [
+		sh:path sh:xone ;
+		sh:node shsh:ListShape ;        # xone-node
+	] .
+	
+shsh:NodeShapeShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:node ;        # node-node
+	sh:property [
+		sh:path sh:path ;
+		sh:maxCount 0 ;                 # NodeShape-path-maxCount
+	] ;
+	sh:property [
+		sh:path sh:lessThan ;
+		sh:maxCount 0 ;                 # lessThan-scope
+	] ;
+	sh:property [
+		sh:path sh:lessThanOrEquals ;
+		sh:maxCount 0 ;                 # lessThanOrEquals-scope
+	] ;
+	sh:property [
+		sh:path sh:maxCount ;
+		sh:maxCount 0 ;                 # maxCount-scope
+	] ;
+	sh:property [
+		sh:path sh:minCount ;
+		sh:maxCount 0 ;                 # minCount-scope
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShape ;
+		sh:maxCount 0 ;                 # qualifiedValueShape-scope
+	] ;
+	sh:property [
+		sh:path sh:uniqueLang ;
+		sh:maxCount 0 ;                 # uniqueLang-scope
+	] .
+
+shsh:PropertyShapeShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:property ;    # property-node
+	sh:property [
+		sh:path sh:path ;
+		sh:maxCount 1 ;                 # path-maxCount
+		sh:minCount 1 ;                 # PropertyShape-path-minCount
+		sh:node shsh:PathShape ;        # path-node
+	] .
+
+# Values of sh:and, sh:or and sh:xone must be lists of shapes
+shsh:ShapesListShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:and ;         # and-members-node
+	sh:targetObjectsOf sh:or ;          # or-members-node
+	sh:targetObjectsOf sh:xone ;        # xone-members-node
+	sh:property [
+		sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:node shsh:ShapeShape ;
+	] .
+
+
+# A path of blank node path syntax, used to simulate recursion
+_:PathPath
+	sh:alternativePath (
+		( [ sh:zeroOrMorePath rdf:rest ] rdf:first )
+		( sh:alternativePath [ sh:zeroOrMorePath rdf:rest ] rdf:first )
+		sh:inversePath
+		sh:zeroOrMorePath
+		sh:oneOrMorePath
+		sh:zeroOrOnePath 
+	) .
+
+shsh:PathShape
+	a sh:NodeShape ;
+	rdfs:label "Path shape"@en ;
+	rdfs:comment "A shape that can be used to validate the syntax rules of well-formed SHACL paths."@en ;
+	rdfs:seeAlso  ;
+	sh:property [
+		sh:path [ sh:zeroOrMorePath _:PathPath ] ;
+		sh:node shsh:PathNodeShape ;
+	] .
+
+shsh:PathNodeShape
+	sh:xone (                           # path-metarule
+			[ sh:nodeKind sh:IRI ]          # 2.3.1.1: Predicate path
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.2: Sequence path
+			  sh:node shsh:PathListWithAtLeast2Members ;
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.3: Alternative path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:alternativePath ;
+			    sh:node shsh:PathListWithAtLeast2Members ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ]
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.4: Inverse path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:inversePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.5: Zero-or-more path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:zeroOrMorePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.6: One-or-more path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:oneOrMorePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.7: Zero-or-one path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:zeroOrOnePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+		) .
+
+shsh:PathListWithAtLeast2Members
+	a sh:NodeShape ;
+	sh:node shsh:ListShape ;
+	sh:property [
+		sh:path [ sh:oneOrMorePath rdf:rest ] ;
+		sh:minCount 2 ;    # 1 other list node plus rdf:nil
+	] .
+
+shsh:ShapesGraphShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:shapesGraph ;
+	sh:nodeKind sh:IRI .                # shapesGraph-nodeKind
+
+shsh:EntailmentShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:entailment ;
+	sh:nodeKind sh:IRI .                # entailment-nodeKind
+
diff --git a/src/main/resources/shapes/rml-core/shared_properties.ttl b/src/main/resources/shapes/rml-core/shared_properties.ttl
new file mode 100644
index 00000000..e757772d
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/shared_properties.ttl
@@ -0,0 +1,198 @@
+###############################################################################
+# RML shared properties among resources shapes                                #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+
+:RMLTriplesMapPropertiesShape
+    a sh:NodeShape;   
+    sh:targetClass rml:TriplesMap;
+    sh:targetClass rml:NonAssertedTriplesMap;
+
+    sh:property [
+        sh:targetSubjectsOf rml:logicalSource ;
+        sh:path rml:logicalSource ;
+        rdfs:label "logicalSource" ;
+        rdfs:comment """
+        A logical source is any source that is mapped to RDF triples.
+        """ ;
+        sh:message """
+        Exactly one rml:logicalSource is required to access the data source.
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+        sh:node :RMLAbstractLogicalSourceShape ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+    ] ;
+
+    sh:property [
+        sh:targetSubjectsOf rml:subjectMap ;
+        sh:targetSubjectsOf rml:subject ;
+        sh:targetSubjectsOf rml:quotedTriplesMap ;
+        sh:path [sh:alternativePath (rml:subjectMap rml:subject rml:quotedTriplesMap)] ;
+        rdfs:label "subjectMap/subject/quotedTriplesMap" ;
+        rdfs:comment """
+        Either a rml:subject, rml:subjectMap or a rml:quotedTriplesMap is required, not multiple.
+        """ ;
+        sh:message """
+        Either a rml:subject, rml:subjectMap or a rml:quotedTriplesMap is required, not multiple.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+    ] ;
+
+    sh:property [
+        sh:targetSubjectsOf rml:subjectMap ;
+        sh:path rml:subjectMap ;
+        rdfs:label "subjectMap" ;
+        rdfs:comment """
+        A Subject Map element to generate a subject for generated RDF triples.
+        """ ;
+        sh:message """
+        rml:SubjectMap must be an IRI or blank node.
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+        sh:or ([sh:node :RMLSubjectMapShape]
+               [sh:node :RMLStarMapShape]) ;
+    ] ;
+
+    # rml:subject
+    sh:property [
+        sh:targetSubjectsOf rml:subject ;
+        sh:path rml:subject ;
+        rdfs:label "subject" ;
+        rdfs:comment """
+        An IRI reference for use as subject for all generated RDF triples.
+        """ ;
+        sh:message """
+        rml:subject must be an IRI or blank node.
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+    ] ;
+
+    # rml:predicateObjectMap
+    sh:property [
+        sh:targetSubjectsOf rml:predicateObjectMap ;
+        sh:path rml:predicateObjectMap ;
+        rdfs:label "predicateObjectMap" ;
+        rdfs:comment """
+        A Predicate Object Map element to generate a (predicate, object) pair.
+        """ ;
+        sh:message """
+        rml:PredicateObjectMap must be an IRI or blank node.
+        """ ;
+        sh:minCount 0 ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+    ] ;
+
+    # rml:baseIRI
+    sh:property [
+        sh:path rml:baseIRI ;
+        sh:description """
+        Base IRI to use for generating RDF triples or quads.
+        """ ;
+        sh:message """
+        rml:baseIRI must be an IRI.
+        """ ;
+        sh:nodeKind sh:IRI ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+    ] ;
+.
+
+:RMLGraphMapPropertiesShape
+    a sh:NodeShape;   
+    sh:targetSubjectsOf rml:graphMap ;
+    sh:targetSubjectsOf rml:graph ;
+
+    sh:property [
+        sh:path [sh:alternativePath (rml:graph rml:graphMap)] ;
+        rdfs:label "graph/graphMap" ;
+        rdfs:comment """
+        Either an rml:graph or rml:graphMap may be optionally be provided,
+        but not both.
+        """ ;
+        sh:message """
+        Either an rml:graph or rml:graphMap may be optionally be provided,
+        but not both.
+        """ ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+    ] ;
+    sh:property [
+        sh:path rml:graphMap ;
+        rdfs:label "graphMap" ;
+        rdfs:comment """
+        Specifies a Graph Map. When used with a Subject Map element, all the
+        RDF triples generated will be stored in the specified named graph.
+        Otherwise, the RDF triple generated using the (predicate, object) 
+        pair will be stored in the specified named graph.
+        """ ;
+        sh:message """
+        rml:graphMap must be either an IRI or blank node. 
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+    ] ;
+    sh:property [
+        sh:path rml:graph ;
+        rdfs:label "graph" ;
+        rdfs:comment """
+        An IRI reference to use as the named graph of all generated triples.
+        """ ;
+        sh:message """
+        rml:graphMap must be an IRI. 
+        """ ;
+        sh:nodeKind sh:IRI ;
+    ] ;
+.
+
+:RMLJoinConditionPropertiesShape
+    a sh:PropertyShape;
+    sh:path rml:joinCondition ;
+    sh:targetSubjectsOf rml:joinCondition ;
+    rdfs:label "joinCondition" ;
+    rdfs:comment """
+    Specifies the join condition for joining a child data source with 
+    a parent data source of the foreign key constraint.
+    """ ;
+    sh:message """
+    rml:joinCondition must specify an rml:parent and rml:child.
+    """ ;
+    sh:nodeKind sh:BlankNodeOrIRI ;
+.
+
+:RMLLogicalTargetPropertiesShape
+    a sh:PropertyShape ;
+    sh:path rml:logicalTarget ;
+    sh:targetSubjectsOf rml:logicalTarget ;
+    sh:path rml:logicalTarget ;
+    rdfs:label "logicalTarget" ;
+    rdfs:comment """
+    A logical target is any target to where generated RDF triples are
+    exported to.
+    """ ;
+    sh:message """
+    Zero or more rml:logicalTarget is required to export RDF triples.
+    """ ;
+    sh:nodeKind sh:BlankNodeOrIRI ;
+    sh:minCount 0 ;
+.
+
+:RMLStrategyAppendShape
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:strategy ;
+    rdfs:label "Strategy" ;
+    rdfs:comment """
+    Strategy to follow when generating RDF triples.
+    """ ;
+    sh:message """
+    Strategy must be either rml:append or rml:cartesianProduct.
+    """ ;
+    sh:in (rml:append rml:cartesianProduct) ;
+.
diff --git a/src/main/resources/shapes/rml-core/subject_map.ttl b/src/main/resources/shapes/rml-core/subject_map.ttl
new file mode 100644
index 00000000..4de0b242
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/subject_map.ttl
@@ -0,0 +1,67 @@
+###############################################################################
+# RML Subject Map and subject shortcut shape                                  #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+
+:RMLSubjectMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:SubjectMap ;
+    sh:targetObjectsOf rml:subjectMap ;
+    rdfs:label "SubjectMap" ;
+    rdfs:comment """
+    Represents a Subject Map.
+    """ ;
+    sh:message """
+    Subject Map must generate a resource representing the subject of
+    an RDF triple.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTermMapShape
+        :RMLGraphMapPropertiesShape
+        :RMLLogicalTargetPropertiesShape
+        # Subject Map specific shapes
+        [
+            sh:targetSubjectsOf rml:class ;
+            sh:path rml:class ;
+            rdfs:label "class" ;
+            rdfs:comment """
+            The subject value generated will be asserted as an instance of this
+            RDFS class.
+            """ ;
+            sh:message """
+            rml:class must be an IRI and may be specified multiple times.
+            """ ;
+            sh:nodeKind sh:IRI ;
+        ]
+        [
+            sh:path rml:termType ;
+            sh:message """
+            rml:termType must be a rml:IRI, rml:UnsafeIRI, rml:URI,
+            rml:UnsafeURI, or rml:BlankNode for a Subject Map.
+            """ ;
+            sh:in (rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:BlankNode);
+        ]
+    ) ;
+.
+
+:RMLsubjectShape
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:subject ;
+    rdfs:label "subject" ;
+    rdfs:comment """
+    An IRI reference to use as subject for all the RDF triples.
+    """ ;
+    sh:message """
+    rml:subject shortcut for rml:SubjectMap must be a IRI or BlankNode.
+    """ ;
+    sh:nodeKind sh:BlankNodeOrIRI ;
+.
diff --git a/src/main/resources/shapes/rml-core/term_map.ttl b/src/main/resources/shapes/rml-core/term_map.ttl
new file mode 100644
index 00000000..a7bdcbaf
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/term_map.ttl
@@ -0,0 +1,43 @@
+###############################################################################
+# RML Expression Map shape                                                    #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLTermMapShape
+    a sh:NodeShape ;
+    rdfs:label "TermMap" ;
+    rdfs:comment """
+    Represents a Term Map.
+    """ ;
+    sh:message """
+    Term Map is an Expression Map with optionally a term type specified.
+    """ ;
+
+    # Inherit Expression Map shape and add rml:termType
+    sh:and (
+        :RMLExpressionMapShape
+        [
+            sh:targetSubjectsOf rml:termType ;
+            sh:path rml:termType ;
+            rdfs:label "termType" ;
+            rdfs:comment """
+            An IRI indicating whether a generated term should be an IRI, 
+            Blank Node, or a Literal.
+            """ ;
+            sh:message """
+            rml:termType must be either rml:IRI, rml:UnsafeIRI,
+            rml:URI, rml:UnsafeURI, rml:Literal, or rml:BlankNode for a Term Map.
+            May only be provided once.
+            """ ;
+            sh:maxCount 1 ;
+            sh:in (rml:IRI rml:UnsafeIRI rml:URI rml:UnsafeURI rml:Literal rml:BlankNode) ;
+            sh:nodeKind sh:IRI ;
+        ] 
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-core/tests.py b/src/main/resources/shapes/rml-core/tests.py
new file mode 100755
index 00000000..2102e28c
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/tests.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python
+#
+# (c) Dylan Van Assche (2020 - 2023)
+# IDLab - Ghent University - imec
+# MIT license
+#
+
+import os
+import argparse
+import unittest
+import logging
+from parameterized import parameterized
+from glob import glob
+from rdflib import Graph
+
+from mapping_validator import MappingValidator
+
+TEST_CASES_DIR = os.path.join(os.path.abspath('../test-cases'),
+                              '*/mapping.ttl')
+CORE_SHAPE_FILE = os.path.abspath('core.ttl')
+SHACL_SHAPE_FILE = os.path.abspath('shacl.ttl')
+
+
+class MappingValidatorTests(unittest.TestCase):
+    def _validate_rules(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+        mapping_validator = MappingValidator(CORE_SHAPE_FILE)
+        mapping_validator.validate(rules)
+
+    def _validate_shapes(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+        mapping_validator = MappingValidator(SHACL_SHAPE_FILE)
+        mapping_validator.validate(rules)
+
+    def test_non_existing_mapping_rules(self) -> None:
+        with self.assertRaises(FileNotFoundError):
+            p = os.path.abspath('does_not_exist.ttl')
+            self._validate_rules(p)
+
+    @parameterized.expand([(p,) for p in sorted(glob(TEST_CASES_DIR))],
+                          skip_on_empty=True)
+    def test_validation_rules(self, path: str) -> None:
+        """
+        Test if our SHACL shapes are able to validate our validation mapping
+        rules test cases.
+        """
+        print(f'Testing validation with: {path}')
+        if 'RMLTC0004b' in path or 'RMLTC0007h' in path or \
+                'RMLTC0012c' in path or 'RMLTC0012d' in path or \
+                'RMLTC0015b' in path or 'RMLTC0023c' in path:
+            with self.assertRaises(Exception):
+                self._validate_rules(path)
+        else:
+            self._validate_rules(path)
+
+    @unittest.skip('pySHACL validation is broken for Core')
+    def test_validation_shapes(self) -> None:
+        """
+        Test if our SHACL shapes are valid according to the W3C Recommdendation
+        of SHACL. Validation with the official SHACL shapes for SHACL.
+
+        See https://www.w3.org/TR/shacl/#shacl-shacl
+        """
+        self._validate_shapes('./core.ttl')
+
+
+if __name__ == '__main__':
+    parser = argparse.ArgumentParser(description='Execute tests for SHACL '
+                                     'shapes on RML mapping rules.')
+    parser.add_argument('--verbose', '-v', action='count', default=1,
+                        help='Set verbosity level of messages. Example: -vvv')
+    args = parser.parse_args()
+
+    args.verbose = 70 - (10 * args.verbose) if args.verbose > 0 else 0
+    logging.basicConfig(level=args.verbose,
+                        format='%(asctime)s %(levelname)s: %(message)s',
+                        datefmt='%Y-%m-%d %H:%M:%S')
+
+    print(TEST_CASES_DIR)
+    unittest.main(failfast=True)
diff --git a/src/main/resources/shapes/rml-core/triples_map.ttl b/src/main/resources/shapes/rml-core/triples_map.ttl
new file mode 100644
index 00000000..a05bc109
--- /dev/null
+++ b/src/main/resources/shapes/rml-core/triples_map.ttl
@@ -0,0 +1,33 @@
+###############################################################################
+# RML Triples Map shape                                                       #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2024)              #
+###############################################################################
+@prefix :  .
+@prefix rdfs:  .
+@prefix sh:  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  .
+
+# Validate an RML Triples Map
+:RMLTriplesMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:TriplesMap ;
+    sh:targetObjectsOf rml:parentTriplesMap ;
+    rdfs:label "TriplesMap" ;
+    rdfs:comment """
+    Represents a Triples Map.
+    """ ;
+    sh:message """
+    Triples Map requires exactly one rml:subject or one rml:subjectMap and zero
+    or more rml:predicateObjectMaps.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTriplesMapPropertiesShape
+        # Triples Map specific shapes
+        [
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-fnml/README.md b/src/main/resources/shapes/rml-fnml/README.md
new file mode 100644
index 00000000..6b8f0dd6
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/README.md
@@ -0,0 +1,20 @@
+# Shape editing
+
+## Setup
+
+`pip install -r requirements.txt`
+
+## Editing
+
+Edit following subshapes:
+
+- external_shapes.ttl
+- function_execution.ttl
+- function_map.ttl
+- input.ttl
+- parameter_map.ttl
+- return_map.ttl
+
+## Generating
+
+./generate_shape.py fnml.ttl
diff --git a/src/main/resources/shapes/rml-fnml/external_shapes.ttl b/src/main/resources/shapes/rml-fnml/external_shapes.ttl
new file mode 100644
index 00000000..9e706792
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/external_shapes.ttl
@@ -0,0 +1,20 @@
+###############################################################################
+# RML FNML external resources shapes                                          #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023)                     #
+###############################################################################
+@prefix sh:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+# Shapes are defined in the corresponding repositories of each specification
+# Provide their IRI as stub to allow validation in FNML.
+
+:RMLTermMapShape
+    a sh:NodeShape;   
+.
+
+:RMLLogicalTargetPropertiesShape
+    a sh:NodeShape;
+.
diff --git a/src/main/resources/shapes/fnml.ttl b/src/main/resources/shapes/rml-fnml/fnml.ttl
similarity index 83%
rename from src/main/resources/shapes/fnml.ttl
rename to src/main/resources/shapes/rml-fnml/fnml.ttl
index 8970d400..e5bc9eb4 100644
--- a/src/main/resources/shapes/fnml.ttl
+++ b/src/main/resources/shapes/rml-fnml/fnml.ttl
@@ -17,7 +17,7 @@
 @prefix rdf:  .
 @prefix rdfs:  .
 @prefix rml:  .
-@prefix :  .
+@prefix schema:  .
 @prefix sh:  .
 @prefix skos:  .
 @prefix sosa:  .
@@ -30,11 +30,12 @@
 @prefix xsd:  .
 
  a sh:NodeShape ;
-    sh:description """
+    rdfs:label "rml:FunctionExecution" ;
+    rdfs:comment """
     Represents a Function Execution.
     """ ;
-    sh:name "rml:FunctionExecution" ;
-    sh:property [ sh:description """
+    sh:property [ rdfs:label "rml:function/rml:functionMap" ;
+            rdfs:comment """
         Exactly one rml:function or rml:functionMap is required.
         """ ;
             sh:maxCount 1 ;
@@ -42,52 +43,52 @@
         Exactly one rml:function or rml:functionMap is required.
         """ ;
             sh:minCount 1 ;
-            sh:name "rml:function/rml:functionMap" ;
             sh:path [ sh:alternativePath ( rml:function rml:functionMap ) ] ],
-        [ sh:description """
+        [ rdfs:label "rml:functionMap" ;
+            rdfs:comment """
         FnO function to execute.
         """ ;
             sh:message """
         rml:functionMap must be an IRI or Blank node.
         """ ;
-            sh:name "rml:functionMap" ;
             sh:node  ;
             sh:nodeKind sh:BlankNodeOrIRI ;
             sh:path rml:functionMap ],
-        [ sh:description """
+        [ rdfs:label "rml:function" ;
+            rdfs:comment """
         FnO function to execute.
         """ ;
             sh:message """
         rml:function must be an IRI.
         """ ;
-            sh:name "rml:function" ;
             sh:nodeKind sh:IRI ;
             sh:path rml:function ],
-        [ sh:description """
+        [ rdfs:label "rml:input" ;
+            rdfs:comment """
         Input parameters for the function.
         """ ;
             sh:message """
         rml:input must be an IRI or Blank node.
         """ ;
-            sh:name "rml:input" ;
             sh:nodeKind sh:BlankNodeOrIRI ;
             sh:path rml:input ] ;
     sh:targetObjectsOf rml:functionExecution .
 
  a sh:NodeShape ;
-    sh:and (   [ ] ) ;
-    sh:description """
+    rdfs:label "FunctionMap" ;
+    rdfs:comment """
     Represents a Function Map.
     """ ;
-    sh:name "FunctionMap" ;
+    sh:and (   [ ] ) ;
     sh:targetObjectsOf rml:functionMap .
 
  a sh:NodeShape ;
-    sh:description """
+    rdfs:label "rml:Input" ;
+    rdfs:comment """
     Represents an Input for a function.
     """ ;
-    sh:name "rml:Input" ;
-    sh:property [ sh:description """
+    sh:property [ rdfs:label "rml:parameter/rml:parameterMap" ;
+            rdfs:comment """
         Exactly one rml:parameter or rml:parameterMap is required.
         """ ;
             sh:maxCount 1 ;
@@ -95,51 +96,51 @@
         Exactly one rml:parameter or rml:parameterMap is required.
         """ ;
             sh:minCount 1 ;
-            sh:name "rml:parameter/rml:parameterMap" ;
             sh:path [ sh:alternativePath ( rml:parameter rml:parameterMap ) ] ],
-        [ sh:description """
+        [ rdfs:label "rml:inputValueMap" ;
+            rdfs:comment """
         Values of the parameters.
         """ ;
             sh:maxCount 1 ;
             sh:message """
         rml:inputValueMap must be an IRI or Blank node, provided once.
         """ ;
-            sh:name "rml:inputValueMap" ;
             sh:nodeKind sh:BlankNodeOrIRI ;
             sh:path rml:inputValueMap ],
-        [ sh:datatype xsd:string ;
-            sh:description """
+        [ rdfs:label "rml:inputValue" ;
+            rdfs:comment """
         Parameters to supply to FnO function.
         """ ;
+            sh:datatype xsd:string ;
             sh:maxCount 1 ;
             sh:message """
         rml:inputValue must be a string Literal.
         """ ;
-            sh:name "rml:inputValue" ;
             sh:nodeKind sh:Literal ;
             sh:path rml:inputValue ],
-        [ sh:description """
+        [ rdfs:label "rml:parameterMap" ;
+            rdfs:comment """
         Parameters to supply to FnO function.
         """ ;
             sh:maxCount 1 ;
             sh:message """
         rml:parameterMap must be an IRI or Blank node.
         """ ;
-            sh:name "rml:parameterMap" ;
             sh:node  ;
             sh:nodeKind sh:BlankNodeOrIRI ;
             sh:path rml:parameterMap ],
-        [ sh:description """
+        [ rdfs:label "rml:parameter" ;
+            rdfs:comment """
         Parameters to supply to FnO function.
         """ ;
             sh:maxCount 1 ;
             sh:message """
         rml:parameter must be an IRI.
         """ ;
-            sh:name "rml:parameter" ;
             sh:nodeKind sh:IRI ;
             sh:path rml:parameter ],
-        [ sh:description """
+        [ rdfs:label "rml:inputValue/rml:inputValueMap" ;
+            rdfs:comment """
         Exactly one rml:inputValue or rml:inputValueMap is required.
         """ ;
             sh:maxCount 1 ;
@@ -147,24 +148,23 @@
         Exactly one rml:inputValue or rml:inputValueMap is required.
         """ ;
             sh:minCount 1 ;
-            sh:name "rml:inputValue/rml:inputValueMap" ;
             sh:path [ sh:alternativePath ( rml:inputValue rml:inputValueMap ) ] ] ;
     sh:targetObjectsOf rml:input .
 
  a sh:NodeShape ;
-    sh:and (   [ ] ) ;
-    sh:description """
+    rdfs:label "ParameterMap" ;
+    rdfs:comment """
     Represents a Parameter Map of a function.
     """ ;
-    sh:name "ParameterMap" ;
+    sh:and (   [ ] ) ;
     sh:targetObjectsOf rml:parameterMap .
 
  a sh:NodeShape ;
-    sh:and (   [ ] ) ;
-    sh:description """
+    rdfs:label "ReturnMap" ;
+    rdfs:comment """
     Represents a Return Map.
     """ ;
-    sh:name "ReturnMap" ;
+    sh:and (   [ ] ) ;
     sh:targetObjectsOf rml:returnMap .
 
  a sh:NodeShape .
diff --git a/src/main/resources/shapes/rml-fnml/function_execution.ttl b/src/main/resources/shapes/rml-fnml/function_execution.ttl
new file mode 100644
index 00000000..275e767a
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/function_execution.ttl
@@ -0,0 +1,74 @@
+###############################################################################
+# RML FunctionExecution shape                                                 #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLFunctionExecutionShape
+    a sh:NodeShape ;
+    rdfs:label "rml:FunctionExecution" ;
+    rdfs:comment """
+    Represents a Function Execution.
+    """ ;
+    sh:targetObjectsOf rml:functionExecution ;
+
+    # Exactly one rml:function or rml:functionMap is required 
+    sh:property [
+        sh:path [sh:alternativePath (rml:function 
+                                     rml:functionMap)] ;
+        rdfs:label "rml:function/rml:functionMap" ;
+        rdfs:comment """
+        Exactly one rml:function or rml:functionMap is required.
+        """ ;
+        sh:message """
+        Exactly one rml:function or rml:functionMap is required.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+    ] ;
+
+    # rml:functionMap non-shortcut
+    sh:property [
+        sh:path rml:functionMap ;
+        rdfs:label "rml:functionMap" ;
+        rdfs:comment """
+        FnO function to execute.
+        """ ;
+        sh:message """
+        rml:functionMap must be an IRI or Blank node.
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+        sh:node :RMLFunctionMap;
+    ] ;
+
+    # rml:function shortcut
+    sh:property [
+        sh:path rml:function ;
+        rdfs:label "rml:function" ;
+        rdfs:comment """
+        FnO function to execute.
+        """ ;
+        sh:message """
+        rml:function must be an IRI.
+        """ ;
+        sh:nodeKind sh:IRI ;
+    ] ;
+
+    # rml:input
+    sh:property [
+        sh:path rml:input ;
+        rdfs:label "rml:input" ;
+        rdfs:comment """
+        Input parameters for the function.
+        """ ;
+        sh:message """
+        rml:input must be an IRI or Blank node.
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+    ] ;
+.
diff --git a/src/main/resources/shapes/rml-fnml/function_map.ttl b/src/main/resources/shapes/rml-fnml/function_map.ttl
new file mode 100644
index 00000000..0c37a50d
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/function_map.ttl
@@ -0,0 +1,28 @@
+###############################################################################
+# RML Function Map shape                                                      #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLFunctionMapShape
+    a sh:NodeShape ;
+    rdfs:label "FunctionMap" ;
+    rdfs:comment """
+    Represents a Function Map.
+    """ ;
+    sh:targetObjectsOf rml:functionMap ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTermMapShape
+        :RMLLogicalTargetPropertiesShape
+        # Function Map specific shapes
+        [
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-fnml/generate_shape.py b/src/main/resources/shapes/rml-fnml/generate_shape.py
new file mode 100755
index 00000000..f6c20d6b
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/generate_shape.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+
+import argparse
+import sys
+from os import path
+from glob import glob
+from rdflib import Graph, Namespace
+from rdflib.plugins.serializers.turtle import TurtleSerializer
+from rdflib import plugin
+
+SUBSHAPE_FORMAT = 'turtle'
+SUBSHAPE_GLOB_PATTERN = '*.ttl'
+SHACL = Namespace('http://www.w3.org/ns/shacl#')
+RML = Namespace('http://w3id.org/rml/')
+
+
+class TurtleWithPrefixes(TurtleSerializer):
+    """
+    A turtle serializer that always emits prefixes
+    Workaround for https://github.com/RDFLib/rdflib/issues/1048
+    """
+    roundtrip_prefixes = True  # Undocumented, forces to write all prefixes
+
+
+class ShapeGenerator:
+    """
+    Generates a complete SHACL shape of all the SHACL subshapes.
+    Useful for using the shapes in the shacl.org Playground.
+    """
+    def __init__(self, glob_pattern: str, rdf_format: str,
+                 destination: str) -> None:
+        self._glob_pattern: str = glob_pattern
+        self._rdf_format: str = rdf_format
+        self._destination: str = destination
+        self._shape = Graph()
+        self._shape.bind('sh', SHACL)
+        self._shape.bind('rml', RML)
+        # Register TurtleWithPrefixes serializer as 'tortoise' format
+        plugin.register('tortoise',
+                        plugin.Serializer,
+                        'generate_shape',
+                        'TurtleWithPrefixes')
+
+    def generate(self) -> None:
+        """
+        Generate a full shape from the sub shapes.
+        """
+        print('Reading subshapes:')
+        for sub_shape in glob(self._glob_pattern):
+            if 'fnml' in sub_shape or 'shacl' in sub_shape:
+                continue
+            print(f"\t{sub_shape}")
+            g = Graph()
+            g.bind('sh', SHACL)
+            g.bind('rml', RML)
+            self._shape += g.parse(sub_shape, format=self._rdf_format)
+
+        print(f'Writing shape to {self._destination}')
+        self._shape.serialize(destination=self._destination, format='tortoise')
+
+
+if __name__ == '__main__':
+    p = argparse.ArgumentParser(description='Generate a complete SHACL shape '
+                                'from the subshapes.')
+    p.add_argument('destination', type=str, help='Location to write the '
+                   'complete SHACL shape as Turtle.')
+    # Arguments parsing
+    args = p.parse_args()
+    if not path.exists(args.destination):
+        print(f'{args.destination} file path does not exist!')
+        sys.exit(1)
+
+    if path.isdir(args.destination):
+        args.destination = path.join(args.destination, 'fnml.ttl')
+
+    # Generate shape
+    generator = ShapeGenerator(SUBSHAPE_GLOB_PATTERN, SUBSHAPE_FORMAT,
+                               args.destination)
+    generator.generate()
diff --git a/src/main/resources/shapes/rml-fnml/input.ttl b/src/main/resources/shapes/rml-fnml/input.ttl
new file mode 100644
index 00000000..bb791ee6
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/input.ttl
@@ -0,0 +1,107 @@
+###############################################################################
+# RML Input shape                                                             #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLInputShape
+    a sh:NodeShape ;
+    rdfs:label "rml:Input" ;
+    rdfs:comment """
+    Represents an Input for a function.
+    """ ;
+    sh:targetObjectsOf rml:input ;
+
+    # Exactly one rml:parameter or rml:parameterMap is required 
+    sh:property [
+        sh:path [sh:alternativePath (rml:parameter 
+                                     rml:parameterMap)] ;
+        rdfs:label "rml:parameter/rml:parameterMap" ;
+        rdfs:comment """
+        Exactly one rml:parameter or rml:parameterMap is required.
+        """ ;
+        sh:message """
+        Exactly one rml:parameter or rml:parameterMap is required.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+    ] ;
+
+    # rml:parameterMap non-shortcut
+    sh:property [
+        sh:path rml:parameterMap ;
+        rdfs:label "rml:parameterMap" ;
+        rdfs:comment """
+        Parameters to supply to FnO function.
+        """ ;
+        sh:message """
+        rml:parameterMap must be an IRI or Blank node.
+        """ ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+        sh:node :RMLParameterMap;
+        sh:maxCount 1 ;
+    ] ;
+
+    # rml:parameter shortcut
+    sh:property [
+        sh:path rml:parameter ;
+        rdfs:label "rml:parameter" ;
+        rdfs:comment """
+        Parameters to supply to FnO function.
+        """ ;
+        sh:message """
+        rml:parameter must be an IRI.
+        """ ;
+        sh:nodeKind sh:IRI ;
+        sh:maxCount 1 ;
+    ] ;
+
+    # Exactly one rml:inputValue or rml:inputValueMap is required 
+    sh:property [
+        sh:path [sh:alternativePath (rml:inputValue 
+                                     rml:inputValueMap)] ;
+        rdfs:label "rml:inputValue/rml:inputValueMap" ;
+        rdfs:comment """
+        Exactly one rml:inputValue or rml:inputValueMap is required.
+        """ ;
+        sh:message """
+        Exactly one rml:inputValue or rml:inputValueMap is required.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+    ] ;
+
+    # rml:inputValueMap
+    sh:property [
+        sh:path rml:inputValueMap ;
+        rdfs:label "rml:inputValueMap" ;
+        rdfs:comment """
+        Values of the parameters.
+        """ ;
+        sh:message """
+        rml:inputValueMap must be an IRI or Blank node, provided once.
+        """ ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:BlankNodeOrIRI ;
+    ] ;
+
+    # rml:inputValue shortcut
+    sh:property [
+        sh:path rml:inputValue ;
+        rdfs:label "rml:inputValue" ;
+        rdfs:comment """
+        Parameters to supply to FnO function.
+        """ ;
+        sh:message """
+        rml:inputValue must be a string Literal.
+        """ ;
+        sh:nodeKind sh:Literal ;
+        sh:datatype xsd:string ;
+        sh:maxCount 1 ;
+    ] ;
+.
diff --git a/src/main/resources/shapes/rml-fnml/mapping_validator.py b/src/main/resources/shapes/rml-fnml/mapping_validator.py
new file mode 100644
index 00000000..efaf4408
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/mapping_validator.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+#
+
+from logging import debug, info, critical
+from pyshacl import validate
+from rdflib import Graph
+from shutil import get_terminal_size
+
+
+class MappingValidator:
+    def __init__(self, shape: str) -> None:
+        g = Graph()
+        g.parse(shape, format='turtle')
+        self._shape = g
+
+    def validate(self, rules: Graph, print_report: bool = True) -> None:
+        valid: bool
+        report_graph: Graph
+        report_text: str
+        valid, report_graph, report_text = validate(rules,
+                                                    shacl_graph=self._shape)
+        debug(f'RML rules valid: {valid}')
+        debug(f'SHACL validation report: {report_text}')
+
+        # If mapping rules are invalid, print SHACL report and raise exception
+        if not valid and print_report:
+            self._print_report(report_text)
+            msg = 'RML mapping rules are invalid, a detailed explanation' \
+                ' is available in the report'
+            critical(msg)
+            raise ValueError(msg)
+
+    def _print_report(self, report_text: str) -> None:
+        tty_columns: int
+        tty_columns, _ = get_terminal_size()
+        info('-' * tty_columns)
+        title: str = 'RML rules validation report'
+        white_space: int = int((tty_columns - len(title)) / 2)
+        title = ' ' * white_space + title + ' ' * white_space
+        info(title)
+        info('-' * tty_columns)
+        info(report_text)
+        info('-' * tty_columns)
\ No newline at end of file
diff --git a/src/main/resources/shapes/rml-fnml/parameter_map.ttl b/src/main/resources/shapes/rml-fnml/parameter_map.ttl
new file mode 100644
index 00000000..25bc52c0
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/parameter_map.ttl
@@ -0,0 +1,28 @@
+###############################################################################
+# RML Parameter Map shape                                                     #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLParameterMapShape
+    a sh:NodeShape ;
+    rdfs:label "ParameterMap" ;
+    rdfs:comment """
+    Represents a Parameter Map of a function.
+    """ ;
+    sh:targetObjectsOf rml:parameterMap ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTermMapShape
+        :RMLLogicalTargetPropertiesShape
+        # Parameter Map specific shapes
+        [
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-fnml/requirements.txt b/src/main/resources/shapes/rml-fnml/requirements.txt
new file mode 100644
index 00000000..e9fdd848
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/requirements.txt
@@ -0,0 +1,3 @@
+parameterized
+rdflib
+pyshacl
\ No newline at end of file
diff --git a/src/main/resources/shapes/rml-fnml/return_map.ttl b/src/main/resources/shapes/rml-fnml/return_map.ttl
new file mode 100644
index 00000000..2e5b0446
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/return_map.ttl
@@ -0,0 +1,28 @@
+###############################################################################
+# RML Return Map shape                                                        #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLReturnMapShape
+    a sh:NodeShape ;
+    rdfs:label "ReturnMap" ;
+    rdfs:comment """
+    Represents a Return Map.
+    """ ;
+    sh:targetObjectsOf rml:returnMap ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTermMapShape
+        :RMLLogicalTargetPropertiesShape
+        # Return Map specific shapes
+        [
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-fnml/shacl.ttl b/src/main/resources/shapes/rml-fnml/shacl.ttl
new file mode 100644
index 00000000..e37856a1
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/shacl.ttl
@@ -0,0 +1,406 @@
+@prefix rdf:   .
+@prefix rdfs:  .
+@prefix sh:    .
+@prefix xsd:   .
+
+@prefix shsh:  .
+
+shsh:
+	rdfs:label "SHACL for SHACL"@en ;
+	rdfs:comment "This shapes graph can be used to validate SHACL shapes graphs against a subset of the SHACL syntax rules."@en ;
+	sh:declare [
+		sh:prefix "shsh" ;
+		sh:namespace "http://www.w3.org/ns/shacl-shacl#" ;
+	] .
+
+	
+shsh:ListShape
+	a sh:NodeShape ;
+	rdfs:label "List shape"@en ;
+	rdfs:comment "A shape describing well-formed RDF lists. Currently does not check for non-recursion. This could be expressed using SHACL-SPARQL."@en ;
+	rdfs:seeAlso  ;
+	sh:property [
+		sh:path [ sh:zeroOrMorePath rdf:rest ] ;
+		rdfs:comment "Each list member (including this node) must be have the shape shsh:ListNodeShape."@en ;
+		sh:hasValue rdf:nil ;
+		sh:node shsh:ListNodeShape ;
+	] .
+
+shsh:ListNodeShape
+	a sh:NodeShape ;
+	rdfs:label "List node shape"@en ;
+	rdfs:comment "Defines constraints on what it means for a node to be a node within a well-formed RDF list. Note that this does not check whether the rdf:rest items are also well-formed lists as this would lead to unsupported recursion."@en ;
+	sh:or ( [
+				sh:hasValue rdf:nil ;
+        		sh:property [
+					sh:path rdf:first ;
+					sh:maxCount 0 ;
+				] ;
+				sh:property [
+					sh:path rdf:rest ;
+					sh:maxCount 0 ;
+				] ;
+			]
+			[
+				sh:not [ sh:hasValue rdf:nil ] ;
+				sh:property [
+					sh:path rdf:first ;
+					sh:maxCount 1 ;
+					sh:minCount 1 ;
+				] ;
+				sh:property [
+					sh:path rdf:rest ;
+					sh:maxCount 1 ;
+					sh:minCount 1 ;
+				] ;
+			] ) .
+
+shsh:ShapeShape
+	a sh:NodeShape ;
+	rdfs:label "Shape shape"@en ;
+	rdfs:comment "A shape that can be used to validate syntax rules for other shapes."@en ;
+	
+	# See https://www.w3.org/TR/shacl/#shapes for what counts as a shape
+	sh:targetClass sh:NodeShape ;
+	sh:targetClass sh:PropertyShape ;
+	sh:targetSubjectsOf sh:targetClass, sh:targetNode, sh:targetObjectsOf, sh:targetSubjectsOf ;
+	sh:targetSubjectsOf sh:and, sh:class, sh:closed, sh:datatype, sh:disjoint, sh:equals, sh:flags, sh:hasValue,
+		sh:ignoredProperties, sh:in, sh:languageIn, sh:lessThan, sh:lessThanOrEquals, sh:maxCount, sh:maxExclusive,
+		sh:maxInclusive, sh:maxLength, sh:minCount, sh:minExclusive, sh:minInclusive, sh:minLength, sh:node, sh:nodeKind,
+		sh:not, sh:or, sh:pattern, sh:property, sh:qualifiedMaxCount, sh:qualifiedMinCount, sh:qualifiedValueShape,
+		sh:qualifiedValueShape, sh:qualifiedValueShapesDisjoint, sh:qualifiedValueShapesDisjoint, sh:uniqueLang, sh:xone ;
+
+	sh:targetObjectsOf sh:node ;        # node-node
+	sh:targetObjectsOf sh:not ;         # not-node
+	sh:targetObjectsOf sh:property ;    # property-node
+	sh:targetObjectsOf sh:qualifiedValueShape ; # qualifiedValueShape-node
+
+	# Shapes are either node shapes or property shapes
+	sh:xone ( shsh:NodeShapeShape shsh:PropertyShapeShape ) ;
+
+	sh:property [
+		sh:path sh:targetNode ;
+		sh:nodeKind	sh:IRIOrLiteral ;   # targetNode-nodeKind
+	] ; 
+	sh:property [
+		sh:path sh:targetClass ;
+		sh:nodeKind sh:IRI ;            # targetClass-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:targetSubjectsOf ;
+		sh:nodeKind sh:IRI ;            # targetSubjectsOf-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:targetObjectsOf ;
+		sh:nodeKind sh:IRI ;            # targetObjectsOf-nodeKind
+	] ;
+	sh:or ( [ sh:not [ 
+				sh:class rdfs:Class ; 
+				sh:or ( [ sh:class sh:NodeShape ] [ sh:class sh:PropertyShape ] )
+			] ]
+			[ sh:nodeKind sh:IRI ]
+		  ) ;                           # implicit-targetClass-nodeKind
+	
+	sh:property [
+		sh:path sh:severity ;
+		sh:maxCount 1 ;                 # severity-maxCount
+		sh:nodeKind sh:IRI ;            # severity-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:message ;
+		sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ;   # message-datatype
+	] ;
+	sh:property [
+		sh:path sh:deactivated ;
+		sh:maxCount 1 ;                 # deactivated-maxCount
+		sh:in ( true false ) ;          # deactivated-datatype
+	] ;
+
+	sh:property [
+		sh:path sh:and ;
+		sh:node shsh:ListShape ;        # and-node
+	] ;
+	sh:property [
+		sh:path sh:class ;
+		sh:nodeKind sh:IRI ;            # class-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:closed ;
+		sh:datatype xsd:boolean ;       # closed-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:ignoredProperties ;
+		sh:node shsh:ListShape ;        # ignoredProperties-node
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path ( sh:ignoredProperties [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:nodeKind sh:IRI ;            # ignoredProperties-members-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:datatype ;
+		sh:nodeKind sh:IRI ;            # datatype-nodeKind
+		sh:maxCount 1 ;                 # datatype-maxCount
+	] ;
+	sh:property [
+		sh:path sh:disjoint ;
+		sh:nodeKind sh:IRI ;            # disjoint-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:equals ;
+		sh:nodeKind sh:IRI ;            # equals-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:in ;
+		sh:maxCount 1 ;                 # in-maxCount		
+		sh:node shsh:ListShape ;        # in-node
+	] ;
+	sh:property [
+		sh:path sh:languageIn ;
+		sh:maxCount 1 ;                 # languageIn-maxCount
+		sh:node shsh:ListShape ;        # languageIn-node
+	] ;
+	sh:property [
+		sh:path ( sh:languageIn [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:datatype xsd:string ;        # languageIn-members-datatype
+	] ;
+	sh:property [
+		sh:path sh:lessThan ;
+		sh:nodeKind sh:IRI ;            # lessThan-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:lessThanOrEquals ;
+		sh:nodeKind sh:IRI ;            # lessThanOrEquals-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxCount ;
+		sh:datatype xsd:integer ;       # maxCount-datatype
+		sh:maxCount 1 ;                 # maxCount-maxCount
+	] ;
+	sh:property [
+		sh:path sh:maxExclusive ;
+		sh:maxCount 1 ;                 # maxExclusive-maxCount
+		sh:nodeKind sh:Literal ;        # maxExclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxInclusive ;
+		sh:maxCount 1 ;                 # maxInclusive-maxCount
+		sh:nodeKind sh:Literal ;        # maxInclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxLength ;
+		sh:datatype xsd:integer ;       # maxLength-datatype
+		sh:maxCount 1 ;                 # maxLength-maxCount
+	] ;
+	sh:property [
+		sh:path sh:minCount ;
+		sh:datatype xsd:integer ;       # minCount-datatype
+		sh:maxCount 1 ;                 # minCount-maxCount
+	] ;
+	sh:property [
+		sh:path sh:minExclusive ;
+		sh:maxCount 1 ;                 # minExclusive-maxCount
+		sh:nodeKind sh:Literal ;        # minExclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:minInclusive ;
+		sh:maxCount 1 ;                 # minInclusive-maxCount
+		sh:nodeKind sh:Literal ;        # minInclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:minLength ;
+		sh:datatype xsd:integer ;       # minLength-datatype
+		sh:maxCount 1 ;                 # minLength-maxCount
+	] ;
+	sh:property [
+		sh:path sh:nodeKind ;
+		sh:in ( sh:BlankNode sh:IRI sh:Literal sh:BlankNodeOrIRI sh:BlankNodeOrLiteral sh:IRIOrLiteral ) ;	# nodeKind-in
+		sh:maxCount 1 ;                 # nodeKind-maxCount
+	] ;
+	sh:property [
+		sh:path sh:or ;
+		sh:node shsh:ListShape ;        # or-node
+	] ;
+	sh:property [
+		sh:path sh:pattern ;
+		sh:datatype xsd:string ;        # pattern-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+		# Not implemented: syntax rule pattern-regex
+	] ;
+	sh:property [
+		sh:path sh:flags ;
+		sh:datatype xsd:string ;        # flags-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedMaxCount ;
+		sh:datatype xsd:integer ;       # qualifiedMaxCount-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedMinCount ;
+		sh:datatype xsd:integer ;       # qualifiedMinCount-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShape ;
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShapesDisjoint ;
+		sh:datatype xsd:boolean ;       # qualifiedValueShapesDisjoint-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:uniqueLang ;
+		sh:datatype xsd:boolean ;       # uniqueLang-datatype
+		sh:maxCount 1 ;                 # uniqueLang-maxCount
+	] ;
+	sh:property [
+		sh:path sh:xone ;
+		sh:node shsh:ListShape ;        # xone-node
+	] .
+	
+shsh:NodeShapeShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:node ;        # node-node
+	sh:property [
+		sh:path sh:path ;
+		sh:maxCount 0 ;                 # NodeShape-path-maxCount
+	] ;
+	sh:property [
+		sh:path sh:lessThan ;
+		sh:maxCount 0 ;                 # lessThan-scope
+	] ;
+	sh:property [
+		sh:path sh:lessThanOrEquals ;
+		sh:maxCount 0 ;                 # lessThanOrEquals-scope
+	] ;
+	sh:property [
+		sh:path sh:maxCount ;
+		sh:maxCount 0 ;                 # maxCount-scope
+	] ;
+	sh:property [
+		sh:path sh:minCount ;
+		sh:maxCount 0 ;                 # minCount-scope
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShape ;
+		sh:maxCount 0 ;                 # qualifiedValueShape-scope
+	] ;
+	sh:property [
+		sh:path sh:uniqueLang ;
+		sh:maxCount 0 ;                 # uniqueLang-scope
+	] .
+
+shsh:PropertyShapeShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:property ;    # property-node
+	sh:property [
+		sh:path sh:path ;
+		sh:maxCount 1 ;                 # path-maxCount
+		sh:minCount 1 ;                 # PropertyShape-path-minCount
+		sh:node shsh:PathShape ;        # path-node
+	] .
+
+# Values of sh:and, sh:or and sh:xone must be lists of shapes
+shsh:ShapesListShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:and ;         # and-members-node
+	sh:targetObjectsOf sh:or ;          # or-members-node
+	sh:targetObjectsOf sh:xone ;        # xone-members-node
+	sh:property [
+		sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:node shsh:ShapeShape ;
+	] .
+
+
+# A path of blank node path syntax, used to simulate recursion
+_:PathPath
+	sh:alternativePath (
+		( [ sh:zeroOrMorePath rdf:rest ] rdf:first )
+		( sh:alternativePath [ sh:zeroOrMorePath rdf:rest ] rdf:first )
+		sh:inversePath
+		sh:zeroOrMorePath
+		sh:oneOrMorePath
+		sh:zeroOrOnePath 
+	) .
+
+shsh:PathShape
+	a sh:NodeShape ;
+	rdfs:label "Path shape"@en ;
+	rdfs:comment "A shape that can be used to validate the syntax rules of well-formed SHACL paths."@en ;
+	rdfs:seeAlso  ;
+	sh:property [
+		sh:path [ sh:zeroOrMorePath _:PathPath ] ;
+		sh:node shsh:PathNodeShape ;
+	] .
+
+shsh:PathNodeShape
+	sh:xone (                           # path-metarule
+			[ sh:nodeKind sh:IRI ]          # 2.3.1.1: Predicate path
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.2: Sequence path
+			  sh:node shsh:PathListWithAtLeast2Members ;
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.3: Alternative path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:alternativePath ;
+			    sh:node shsh:PathListWithAtLeast2Members ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ]
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.4: Inverse path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:inversePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.5: Zero-or-more path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:zeroOrMorePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.6: One-or-more path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:oneOrMorePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.7: Zero-or-one path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:zeroOrOnePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+		) .
+
+shsh:PathListWithAtLeast2Members
+	a sh:NodeShape ;
+	sh:node shsh:ListShape ;
+	sh:property [
+		sh:path [ sh:oneOrMorePath rdf:rest ] ;
+		sh:minCount 2 ;    # 1 other list node plus rdf:nil
+	] .
+
+shsh:ShapesGraphShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:shapesGraph ;
+	sh:nodeKind sh:IRI .                # shapesGraph-nodeKind
+
+shsh:EntailmentShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:entailment ;
+	sh:nodeKind sh:IRI .                # entailment-nodeKind
+
diff --git a/src/main/resources/shapes/rml-fnml/tests.py b/src/main/resources/shapes/rml-fnml/tests.py
new file mode 100755
index 00000000..1cfba5c5
--- /dev/null
+++ b/src/main/resources/shapes/rml-fnml/tests.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+#
+# (c) Dylan Van Assche (2020 - 2023)
+# IDLab - Ghent University - imec
+# MIT license
+#
+
+import os
+import argparse
+import unittest
+import logging
+from parameterized import parameterized
+from glob import glob
+from rdflib import Graph
+
+from mapping_validator import MappingValidator
+
+TEST_CASES_DIR = os.path.join(os.path.abspath('../test-cases'), '*/mapping.ttl')
+RESOURCES_DIR = os.path.join(os.path.abspath('../spec'), 'resources/*.ttl')
+FNML_SHAPE_FILE = os.path.abspath('fnml.ttl')
+SHACL_SHAPE_FILE = os.path.abspath('shacl.ttl')
+
+
+class MappingValidatorTests(unittest.TestCase):
+    def _validate_rules(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+        mapping_validator = MappingValidator(FNML_SHAPE_FILE)
+        mapping_validator.validate(rules)
+
+    def _validate_shapes(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+        mapping_validator = MappingValidator(SHACL_SHAPE_FILE)
+        mapping_validator.validate(rules)
+
+    def test_non_existing_mapping_rules(self) -> None:
+        with self.assertRaises(FileNotFoundError):
+            p = os.path.abspath('does_not_exist.ttl')
+            self._validate_rules(p)
+
+    @parameterized.expand([(p,) for p in sorted(glob(TEST_CASES_DIR))], skip_on_empty=True)
+    def test_validation_rules(self, path: str) -> None:
+        """
+        Test if our SHACL shapes are able to validate our validation mapping
+        rules test cases.
+        """
+        print(f'Testing validation with: {path}')
+        self._validate_rules(path)
+    
+    # @parameterized.expand([(p,) for p in sorted(glob(RESOURCES_DIR))], skip_on_empty=True)
+    # def test_resource_rules(self, path: str) -> None:
+    #     """
+    #     Test if our SHACL shapes are able to validate our validation mapping
+    #     rules resources.
+    #     """
+    #     print(f'Testing validation with: {path}')
+    #     self._validate_rules(path)
+
+    def test_validation_shapes(self) -> None:
+        """
+        Test if our SHACL shapes are valid according to the W3C Recommdendation
+        of SHACL. Validation with the official SHACL shapes for SHACL.
+
+        See https://www.w3.org/TR/shacl/#shacl-shacl
+        """
+        path = './fnml.ttl'
+        print(f'Testing shape with: {path}')
+        self._validate_shapes(path)
+
+
+if __name__ == '__main__':
+    parser = argparse.ArgumentParser(description='Execute tests for SHACL shapes on RML mapping rules.')
+    parser.add_argument('--verbose', '-v', action='count', default=1,
+                        help='Set verbosity level of messages. Example: -vvv')
+    args = parser.parse_args()
+
+    args.verbose = 70 - (10 * args.verbose) if args.verbose > 0 else 0
+    logging.basicConfig(level=args.verbose,
+                        format='%(asctime)s %(levelname)s: %(message)s',
+                        datefmt='%Y-%m-%d %H:%M:%S')
+
+    print(TEST_CASES_DIR)
+    unittest.main(failfast=True)
+
diff --git a/src/main/resources/shapes/rml-io/generate_shape.py b/src/main/resources/shapes/rml-io/generate_shape.py
new file mode 100755
index 00000000..ab6f2f53
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/generate_shape.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+
+import argparse
+import sys
+from os import path
+from glob import glob
+from rdflib import Graph, Namespace
+from rdflib.plugins.serializers.turtle import TurtleSerializer
+from rdflib import plugin
+
+SUBSHAPE_FORMAT = 'turtle'
+SUBSHAPE_GLOB_PATTERN = '*.ttl'
+SHACL = Namespace('http://www.w3.org/ns/shacl#')
+RML = Namespace('http://w3id.org/rml/')
+
+
+class TurtleWithPrefixes(TurtleSerializer):
+    """
+    A turtle serializer that always emits prefixes
+    Workaround for https://github.com/RDFLib/rdflib/issues/1048
+    """
+    roundtrip_prefixes = True  # Undocumented, forces to write all prefixes
+
+
+class ShapeGenerator:
+    """
+    Generates a complete SHACL shape of all the SHACL subshapes.
+    Useful for using the shapes in the shacl.org Playground.
+    """
+    def __init__(self, glob_pattern: str, rdf_format: str,
+                 destination: str) -> None:
+        self._glob_pattern: str = glob_pattern
+        self._rdf_format: str = rdf_format
+        self._destination: str = destination
+        self._shape = Graph()
+        self._shape.bind('sh', SHACL)
+        self._shape.bind('rml', RML)
+        # Register TurtleWithPrefixes serializer as 'tortoise' format
+        plugin.register('tortoise',
+                        plugin.Serializer,
+                        'generate_shape',
+                        'TurtleWithPrefixes')
+
+    def generate(self) -> None:
+        """
+        Generate a full shape from the sub shapes.
+        """
+        print('Reading subshapes:')
+        for sub_shape in glob(self._glob_pattern):
+            if 'io' in sub_shape:
+                continue
+            print(f"\t{sub_shape}")
+            g = Graph()
+            g.bind('sh', SHACL)
+            g.bind('rml', RML)
+            self._shape += g.parse(sub_shape, format=self._rdf_format)
+
+        print(f'Writing shape to {self._destination}')
+        self._shape.serialize(destination=self._destination, format='tortoise')
+
+
+if __name__ == '__main__':
+    p = argparse.ArgumentParser(description='Generate a complete SHACL shape '
+                                'from the subshapes.')
+    p.add_argument('destination', type=str, help='Location to write the '
+                   'complete SHACL shape as Turtle.')
+    # Arguments parsing
+    args = p.parse_args()
+    if not path.exists(args.destination):
+        print(f'{args.destination} file path does not exist!')
+        sys.exit(1)
+
+    if path.isdir(args.destination):
+        args.destination = path.join(args.destination, 'io.ttl')
+
+    # Generate shape
+    generator = ShapeGenerator(SUBSHAPE_GLOB_PATTERN, SUBSHAPE_FORMAT,
+                               args.destination)
+    generator.generate()
diff --git a/src/main/resources/shapes/io.ttl b/src/main/resources/shapes/rml-io/io.ttl
similarity index 60%
rename from src/main/resources/shapes/io.ttl
rename to src/main/resources/shapes/rml-io/io.ttl
index 17a9d2e5..caef0b46 100644
--- a/src/main/resources/shapes/io.ttl
+++ b/src/main/resources/shapes/rml-io/io.ttl
@@ -29,16 +29,20 @@
 @prefix xml:  .
 @prefix xsd:  .
 
+ a owl:Ontology ;
+    owl:imports  .
+
  a sh:NodeShape ;
-    sh:description """
+    rdfs:label "RML Logical Source" ;
+    rdfs:comment """
     A logical source is any source that is mapped to RDF triples.
     """ ;
     sh:message """
-    RML Logical Source requires one rml:source and depending on the source 
-    type: one rml:referenceFormulation and/or one rml:iterator.
+    RML Logical Source requires one rml:source and requires everyting
+    an Abstract Logical Source requires.
     """ ;
-    sh:name "RML Logical Source" ;
-    sh:property [ sh:description """
+    sh:property [ rdfs:label "rml:source" ;
+            rdfs:comment """
         The source (rml:source) locates the input data source. It is a URI
         that represents the data source where the data source is.
         """ ;
@@ -48,53 +52,23 @@
         rml:source must be provided exactly once as an URI.
         """ ;
             sh:minCount 1 ;
-            sh:name "rml:source" ;
             sh:node  ;
             sh:nodeKind sh:BlankNodeOrIRI ;
-            # sh:path rml:source
-            sh:path [ sh:alternativePath ( rml:source rml:viewOn  ) ] ;
-           ],
-        [ sh:datatype xsd:string ;
-            sh:description """
-        The logical iterator (rml:iterator) defines the iteration loop used to 
-        map the data of the input source. Depends on the reference formulation
-        if an iterator is necessary.  
-        """ ;
-            sh:maxCount 1 ;
-            sh:message """
-        rml:iterator must be a Literal specifying the iterator to iterate over 
-        the data source.
-        """ ;
-            sh:minCount 0 ;
-            sh:name "rml:iterator" ;
-            sh:nodeKind sh:Literal ;
-            sh:path rml:iterator ],
-        [ sh:description """
-        The reference formulation (rml:referenceFormulation) defines how to 
-        reference to elements of the data of the input source.
-        """ ;
-            sh:maxCount 1 ;
-            sh:message """
-        rml:referenceFormulation must be a blank node or IRI specifying the 
-        reference formulation on how to reference elements of a data source.
-        """ ;
-            sh:minCount 0 ;
-            sh:name "rml:referenceFormulation" ;
-            sh:nodeKind sh:BlankNodeOrIRI ;
-            sh:path rml:referenceFormulation ] ;
+            sh:path rml:source ] ;
     sh:targetClass rml:LogicalSource ;
-    sh:targetObjectsOf rml:logicalSource .
+    sh:targetSubjectsOf rml:source .
 
  a sh:NodeShape ;
-    sh:description """
+    rdfs:label "RML Logical Target" ;
+    rdfs:comment """
     A logical target is any target to where generated RDF triples are exported
     to.
     """ ;
     sh:message """
     RML Logical Target requires one rml:target.
     """ ;
-    sh:name "RML Logical Target" ;
-    sh:property [ sh:description """
+    sh:property [ rdfs:label "rml:target" ;
+            rdfs:comment """
         The target (rml:target) locates the output target. It is a URI
         that represents the target where it must export generated RDF triples
         to.
@@ -105,15 +79,87 @@
         be provided exactly once as an URI.
         """ ;
             sh:minCount 1 ;
-            sh:name "rml:target" ;
             sh:node  ;
             sh:nodeKind sh:BlankNodeOrIRI ;
             sh:path rml:target ] ;
     sh:targetClass rml:LogicalTarget ;
     sh:targetObjectsOf rml:logicalTarget .
 
+ a sh:NodeShape ;
+    rdfs:label "RML Relative Path Source" ;
+    rdfs:comment """
+    A RML Relative Path Source provides a source with relative paths which is
+    not provided by existing vocabularies such as DCAT without a base IRI.
+    """ ;
+    sh:message """
+    RML Relative Path Source accepts one rml:root, and one rml:path.
+    rml:root is optional and defaults to rml:CurrentWorkingDirectory.
+    """ ;
+    sh:property [ rdfs:label "rml:root" ;
+            rdfs:comment """
+        rml:root defines the root directory against which relative paths are
+        resolved. If not provided, defaults to the current working directory.
+        """ ;
+            sh:in ( rml:CurrentWorkingDirectory rml:MappingDirectory ) ;
+            sh:maxCount 1 ;
+            sh:message """
+        rml:root must be either rml:CurrentWorkingDirectory or
+        rml:MappingDirectory.
+        """ ;
+            sh:minCount 0 ;
+            sh:path rml:root ],
+        [ rdfs:label "rml:path" ;
+            rdfs:comment """
+        rml:path specifies the relative path to access for the source.
+        """ ;
+            sh:maxCount 1 ;
+            sh:message """
+        rml:path must be a string Literal.
+        """ ;
+            sh:minCount 1 ;
+            sh:nodeKind sh:Literal ;
+            sh:path rml:path ] ;
+    sh:targetClass rml:RelativePathSource .
+
+ a sh:NodeShape ;
+    rdfs:label "RML Relative Path Target" ;
+    rdfs:comment """
+    A RML Relative Path Target provides a target with relative paths which is
+    not provided by existing vocabularies such as DCAT without a base IRI.
+    """ ;
+    sh:message """
+    RML Relative Path Target accepts one rml:root, and one rml:path.
+    rml:root is optional and defaults to rml:CurrentWorkingDirectory.
+    """ ;
+    sh:property [ rdfs:label "rml:root" ;
+            rdfs:comment """
+        rml:root defines the root directory against which relative paths are
+        resolved. If not provided, defaults to the current working directory.
+        """ ;
+            sh:in ( rml:CurrentWorkingDirectory rml:MappingDirectory ) ;
+            sh:maxCount 1 ;
+            sh:message """
+        rml:root must be either rml:CurrentWorkingDirectory or
+        rml:MappingDirectory.
+        """ ;
+            sh:minCount 0 ;
+            sh:path rml:root ],
+        [ rdfs:label "rml:path" ;
+            rdfs:comment """
+        rml:path specifies the relative path to access for the target.
+        """ ;
+            sh:maxCount 1 ;
+            sh:message """
+        rml:path must be a string Literal.
+        """ ;
+            sh:minCount 1 ;
+            sh:nodeKind sh:Literal ;
+            sh:path rml:path ] ;
+    sh:targetClass rml:RelativePathTarget .
+
  a sh:NodeShape ;
-    sh:description """
+    rdfs:label "RML Source" ;
+    rdfs:comment """
     A source describes access to a data source. Any data access description
     is allowed, but rml:Source provides additional properties to complete
     such descriptions.
@@ -122,20 +168,20 @@
     RML Source accepts one or multiple rml:null, one rml:compression,
     and one rml:encoding. All of them are optional.
     """ ;
-    sh:name "RML Source" ;
-    sh:property [ sh:datatype xsd:string ;
-            sh:description """
+    sh:property [ rdfs:label "rml:null" ;
+            rdfs:comment """
         rml:null specifies how NULL or empty values are exposed by the data 
         source.
         """ ;
+            sh:datatype xsd:string ;
             sh:message """
         rml:source must be provided as a string Literal.
         """ ;
             sh:minCount 0 ;
-            sh:name "rml:null" ;
             sh:nodeKind sh:Literal ;
             sh:path rml:null ],
-        [ sh:description """
+        [ rdfs:label "rml:compression" ;
+            rdfs:comment """
         rml:compression specifies the compression algorithm to use when
         accessing the data source. By default, no compression is applied.
         """ ;
@@ -144,10 +190,10 @@
         rml:compression must be provided as an IRI.
         """ ;
             sh:minCount 0 ;
-            sh:name "rml:compression" ;
             sh:nodeKind sh:IRI ;
             sh:path rml:compression ],
-        [ sh:description """
+        [ rdfs:label "rml:encoding" ;
+            rdfs:comment """
         rml:encoding specifies the encoding to use when accessing the data 
         source. By default, UTF-8 is used.
         """ ;
@@ -156,10 +202,10 @@
         rml:encoding must be provided as an IRI.
         """ ;
             sh:minCount 0 ;
-            sh:name "rml:encoding" ;
             sh:nodeKind sh:IRI ;
             sh:path rml:encoding ],
-        [ sh:description """
+        [ rdfs:label "rml:null" ;
+            rdfs:comment """
         rml:null specifies which data values inside the source should be 
         considered as NULL. Defaults to the default NULL character of a source,
         if available.
@@ -168,14 +214,14 @@
         rml:null must be provided as a Literal.
         """ ;
             sh:minCount 0 ;
-            sh:name "rml:null" ;
             sh:nodeKind sh:Literal ;
             sh:path rml:null ] ;
     sh:targetClass rml:Source ;
     sh:targetObjectsOf rml:source .
 
  a sh:NodeShape ;
-    sh:description """
+    rdfs:label "RML Target" ;
+    rdfs:comment """
     A target describes access to a data target. Any data access description
     is allowed, but rml:Target provides additional properties to complete
     such descriptions.
@@ -184,8 +230,8 @@
     RML Target accepts one rml:compression, and one rml:encoding.
     All of them are optional.
     """ ;
-    sh:name "RML Target" ;
-    sh:property [ sh:description """
+    sh:property [ rdfs:label "rml:compression" ;
+            rdfs:comment """
         rml:compression specifies the compression algorithm to use when
         accessing the data target. By default, no compression is applied.
         """ ;
@@ -194,10 +240,10 @@
         rml:compression must be provided as an IRI.
         """ ;
             sh:minCount 0 ;
-            sh:name "rml:compression" ;
             sh:nodeKind sh:IRI ;
             sh:path rml:compression ],
-        [ sh:description """
+        [ rdfs:label "rml:encoding" ;
+            rdfs:comment """
         rml:encoding specifies the encoding to use when accessing the data 
         target. By default, UTF-8 is used.
         """ ;
@@ -206,10 +252,10 @@
         rml:encoding must be provided as an IRI.
         """ ;
             sh:minCount 0 ;
-            sh:name "rml:encoding" ;
             sh:nodeKind sh:IRI ;
             sh:path rml:encoding ],
-        [ sh:description """
+        [ rdfs:label "rml:serialization" ;
+            rdfs:comment """
         rml:serialization specifies the serialization format to use when
         exporting the generated RDF to a target. By default N-Quads is used.
         """ ;
@@ -218,9 +264,20 @@
         rml:serialization must be provided as an IRI.
         """ ;
             sh:minCount 0 ;
-            sh:name "rml:serialization" ;
             sh:nodeKind sh:IRI ;
-            sh:path rml:serialization ] ;
+            sh:path rml:serialization ],
+        [ rdfs:label "rml:mode" ;
+            rdfs:comment """
+        rml:mode specifies in which mode the target is opened such as read-only,
+        write-only, both, etc.
+        """ ;
+            sh:in ( rml:Read rml:ReadWrite rml:Write rml:WriteRead rml:Append rml:AppendRead ) ;
+            sh:maxCount 1 ;
+            sh:message """
+        rml:mode must be specified by any of the modes from rml:Mode class.
+        """ ;
+            sh:minCount 0 ;
+            sh:path rml:mode ] ;
     sh:targetClass rml:Target ;
     sh:targetObjectsOf rml:target .
 
diff --git a/src/main/resources/shapes/rml-io/logical_source.ttl b/src/main/resources/shapes/rml-io/logical_source.ttl
new file mode 100644
index 00000000..b185fdf1
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/logical_source.ttl
@@ -0,0 +1,43 @@
+###############################################################################
+# RML Logical Source shape                                                    #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2020 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLLogicalSourceShape
+    a sh:NodeShape ;
+    sh:targetSubjectsOf rml:source ;
+    sh:targetClass rml:LogicalSource ;  # Used as a class
+    # Already targets 'rml:logicalSource'
+    rdfs:label "RML Logical Source" ;
+    rdfs:comment """
+    A logical source is any source that is mapped to RDF triples.
+    """ ;
+    sh:message """
+    RML Logical Source requires one rml:source and requires everyting
+    an Abstract Logical Source requires.
+    """ ;
+
+    # rml:source
+    sh:property [
+        sh:path rml:source ;
+        rdfs:label "rml:source" ;
+        rdfs:comment """
+        The source (rml:source) locates the input data source. It is a URI
+        that represents the data source where the data source is.
+        """ ;
+        sh:message """
+        rml:source must be provided to locate the data source. 
+        rml:source must be provided exactly once as an URI.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:BlankNodeOrIRI;
+        sh:node :RMLSourceShape;
+    ] ; 
+.
diff --git a/src/main/resources/shapes/rml-io/logical_target.ttl b/src/main/resources/shapes/rml-io/logical_target.ttl
new file mode 100644
index 00000000..c4116441
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/logical_target.ttl
@@ -0,0 +1,44 @@
+###############################################################################
+# RML Logical Target shape                                                    #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLLogicalTargetShape
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:logicalTarget ;  # Object of rml:TriplesMap
+    sh:targetClass rml:LogicalTarget ;  # Used as a class
+    # Already targets 'rml:logicalTarget'
+    rdfs:label "RML Logical Target" ;
+    rdfs:comment """
+    A logical target is any target to where generated RDF triples are exported
+    to.
+    """ ;
+    sh:message """
+    RML Logical Target requires one rml:target.
+    """ ;
+
+    # rml:target
+    sh:property [
+        sh:path rml:target ;
+        rdfs:label "rml:target" ;
+        rdfs:comment """
+        The target (rml:target) locates the output target. It is a URI
+        that represents the target where it must export generated RDF triples
+        to.
+        """ ;
+        sh:message """
+        rml:target must be provided to locate the target. rml:target must 
+        be provided exactly once as an URI.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:BlankNodeOrIRI;
+        sh:node :RMLTargetShape;
+    ] ; 
+.
diff --git a/src/main/resources/shapes/rml-io/mapping_validator.py b/src/main/resources/shapes/rml-io/mapping_validator.py
new file mode 100644
index 00000000..033c8b87
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/mapping_validator.py
@@ -0,0 +1,45 @@
+from logging import debug, info, critical
+from pyshacl import validate
+from rdflib import Graph
+from shutil import get_terminal_size
+
+
+class MappingValidator:
+    def __init__(self, shape: str, ontology: str) -> None:
+        sg = Graph()
+        sg.parse(shape, format='turtle')
+        self._shape = sg
+        og = Graph()
+        og.parse(ontology, format='turtle')
+        self._ont = og
+
+    def validate(self, rules: Graph, print_report: bool = True) -> None:
+        valid: bool
+        report_graph: Graph
+        report_text: str
+        valid, report_graph, report_text = validate(rules,
+                                                    shacl_graph=self._shape,
+                                                    ont_graph=self._ont,
+                                                    do_owl_imports=True)
+        debug(f'RML rules valid: {valid}')
+        debug(f'SHACL validation report: {report_text}')
+
+        # If mapping rules are invalid, print SHACL report and raise exception
+        if not valid and print_report:
+            self._print_report(report_text)
+            msg = 'RML mapping rules are invalid, a detailed explanation' \
+                ' is available in the report'
+            critical(msg)
+            raise ValueError(msg)
+
+    def _print_report(self, report_text: str) -> None:
+        tty_columns: int
+        tty_columns, _ = get_terminal_size()
+        info('-' * tty_columns)
+        title: str = 'RML rules validation report'
+        white_space: int = int((tty_columns - len(title)) / 2)
+        title = ' ' * white_space + title + ' ' * white_space
+        info(title)
+        info('-' * tty_columns)
+        info(report_text)
+        info('-' * tty_columns)
diff --git a/src/main/resources/shapes/rml-io/relative_path_source.ttl b/src/main/resources/shapes/rml-io/relative_path_source.ttl
new file mode 100644
index 00000000..0bf5d2b8
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/relative_path_source.ttl
@@ -0,0 +1,56 @@
+###############################################################################
+# RML Relative Path Source shape                                              #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2024)                     #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLRelativePathSourceShape
+    a sh:NodeShape ;
+    sh:targetClass rml:RelativePathSource ;  # Used as a class
+    rdfs:label "RML Relative Path Source" ;
+    rdfs:comment """
+    A RML Relative Path Source provides a source with relative paths which is
+    not provided by existing vocabularies such as DCAT without a base IRI.
+    """ ;
+    sh:message """
+    RML Relative Path Source accepts one rml:root, and one rml:path.
+    rml:root is optional and defaults to rml:CurrentWorkingDirectory.
+    """ ;
+
+    # rml:root
+    sh:property [
+        sh:path rml:root ;
+        rdfs:label "rml:root" ;
+        rdfs:comment """
+        rml:root defines the root directory against which relative paths are
+        resolved. If not provided, defaults to the current working directory.
+        """ ;
+        sh:message """
+        rml:root must be either rml:CurrentWorkingDirectory or
+        rml:MappingDirectory.
+        """ ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+        sh:in (rml:CurrentWorkingDirectory rml:MappingDirectory) ;
+    ] ; 
+
+    # rml:path
+    sh:property [
+        sh:path rml:path ;
+        rdfs:label "rml:path" ;
+        rdfs:comment """
+        rml:path specifies the relative path to access for the source.
+        """ ;
+        sh:message """
+        rml:path must be a string Literal.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:Literal ;
+    ] ;
+.
diff --git a/src/main/resources/shapes/rml-io/relative_path_target.ttl b/src/main/resources/shapes/rml-io/relative_path_target.ttl
new file mode 100644
index 00000000..980d5373
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/relative_path_target.ttl
@@ -0,0 +1,56 @@
+###############################################################################
+# RML Relative Path Target shape                                              #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2024)                     #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLRelativePathTargetShape
+    a sh:NodeShape ;
+    sh:targetClass rml:RelativePathTarget ;  # Used as a class
+    rdfs:label "RML Relative Path Target" ;
+    rdfs:comment """
+    A RML Relative Path Target provides a target with relative paths which is
+    not provided by existing vocabularies such as DCAT without a base IRI.
+    """ ;
+    sh:message """
+    RML Relative Path Target accepts one rml:root, and one rml:path.
+    rml:root is optional and defaults to rml:CurrentWorkingDirectory.
+    """ ;
+
+    # rml:root
+    sh:property [
+        sh:path rml:root ;
+        rdfs:label "rml:root" ;
+        rdfs:comment """
+        rml:root defines the root directory against which relative paths are
+        resolved. If not provided, defaults to the current working directory.
+        """ ;
+        sh:message """
+        rml:root must be either rml:CurrentWorkingDirectory or
+        rml:MappingDirectory.
+        """ ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+        sh:in (rml:CurrentWorkingDirectory rml:MappingDirectory) ;
+    ] ; 
+
+    # rml:path
+    sh:property [
+        sh:path rml:path ;
+        rdfs:label "rml:path" ;
+        rdfs:comment """
+        rml:path specifies the relative path to access for the target.
+        """ ;
+        sh:message """
+        rml:path must be a string Literal.
+        """ ;
+        sh:minCount 1 ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:Literal ;
+    ] ;
+.
diff --git a/src/main/resources/shapes/rml-io/requirements.txt b/src/main/resources/shapes/rml-io/requirements.txt
new file mode 100644
index 00000000..3d264b8e
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/requirements.txt
@@ -0,0 +1,3 @@
+parameterized
+rdflib
+pyshacl
diff --git a/src/main/resources/shapes/rml-io/shapes_graph.ttl b/src/main/resources/shapes/rml-io/shapes_graph.ttl
new file mode 100644
index 00000000..40f733c4
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/shapes_graph.ttl
@@ -0,0 +1,5 @@
+@prefix owl:  .
+
+ a owl:Ontology ;
+    owl:imports  ;
+.
diff --git a/src/main/resources/shapes/rml-io/source.ttl b/src/main/resources/shapes/rml-io/source.ttl
new file mode 100644
index 00000000..9a29e45c
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/source.ttl
@@ -0,0 +1,91 @@
+###############################################################################
+# RML Source shape                                                            #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLSourceShape
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:source ;  # Object of rml:LogicalSource
+    sh:targetClass rml:Source ;  # Used as a class
+    # Already targets 'rml:source'
+    rdfs:label "RML Source" ;
+    rdfs:comment """
+    A source describes access to a data source. Any data access description
+    is allowed, but rml:Source provides additional properties to complete
+    such descriptions.
+    """ ;
+    sh:message """
+    RML Source accepts one or multiple rml:null, one rml:compression,
+    and one rml:encoding. All of them are optional.
+    """ ;
+
+    # rml:null
+    sh:property [
+        sh:path rml:null ;
+        rdfs:label "rml:null" ;
+        rdfs:comment """
+        rml:null specifies how NULL or empty values are exposed by the data 
+        source.
+        """ ;
+        sh:message """
+        rml:source must be provided as a string Literal.
+        """ ;
+        sh:minCount 0 ;
+        sh:nodeKind sh:Literal;
+        sh:datatype xsd:string ;
+    ] ; 
+
+    # rml:compression
+    sh:property [
+        sh:path rml:compression ;
+        rdfs:label "rml:compression" ;
+        rdfs:comment """
+        rml:compression specifies the compression algorithm to use when
+        accessing the data source. By default, no compression is applied.
+        """ ;
+        sh:message """
+        rml:compression must be provided as an IRI.
+        """ ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:IRI;
+    ] ; 
+
+    # rml:encoding
+    sh:property [
+        sh:path rml:encoding ;
+        rdfs:label "rml:encoding" ;
+        rdfs:comment """
+        rml:encoding specifies the encoding to use when accessing the data 
+        source. By default, UTF-8 is used.
+        """ ;
+        sh:message """
+        rml:encoding must be provided as an IRI.
+        """ ;
+        sh:minCount 0;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:IRI ;
+    ] ;
+
+    # rml:null
+    sh:property [
+        sh:path rml:null ;
+        rdfs:label "rml:null" ;
+        rdfs:comment """
+        rml:null specifies which data values inside the source should be 
+        considered as NULL. Defaults to the default NULL character of a source,
+        if available.
+        """ ;
+        sh:message """
+        rml:null must be provided as a Literal.
+        """ ;
+        sh:minCount 0;
+        sh:nodeKind sh:Literal ;
+    ] ;
+.
diff --git a/src/main/resources/shapes/rml-io/target.ttl b/src/main/resources/shapes/rml-io/target.ttl
new file mode 100644
index 00000000..82b55a0b
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/target.ttl
@@ -0,0 +1,92 @@
+###############################################################################
+# RML Target shape                                                            #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2024)              #
+###############################################################################
+@prefix sh:  .
+@prefix rdfs:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+:RMLTargetShape
+    a sh:NodeShape ;
+    sh:targetObjectsOf rml:target ;  # Object of rml:LogicalTarget
+    sh:targetClass rml:Target ;  # Used as a class
+    # Already targets 'rml:target'
+    rdfs:label "RML Target" ;
+    rdfs:comment """
+    A target describes access to a data target. Any data access description
+    is allowed, but rml:Target provides additional properties to complete
+    such descriptions.
+    """ ;
+    sh:message """
+    RML Target accepts one rml:compression, and one rml:encoding.
+    All of them are optional.
+    """ ;
+
+    # rml:compression
+    sh:property [
+        sh:path rml:compression ;
+        rdfs:label "rml:compression" ;
+        rdfs:comment """
+        rml:compression specifies the compression algorithm to use when
+        accessing the data target. By default, no compression is applied.
+        """ ;
+        sh:message """
+        rml:compression must be provided as an IRI.
+        """ ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:IRI;
+    ] ; 
+
+    # rml:encoding
+    sh:property [
+        sh:path rml:encoding ;
+        rdfs:label "rml:encoding" ;
+        rdfs:comment """
+        rml:encoding specifies the encoding to use when accessing the data 
+        target. By default, UTF-8 is used.
+        """ ;
+        sh:message """
+        rml:encoding must be provided as an IRI.
+        """ ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:IRI ;
+    ] ;
+
+    # rml:serialization
+    sh:property [
+        sh:path rml:serialization ;
+        rdfs:label "rml:serialization" ;
+        rdfs:comment """
+        rml:serialization specifies the serialization format to use when
+        exporting the generated RDF to a target. By default N-Quads is used.
+        """ ;
+        sh:message """
+        rml:serialization must be provided as an IRI.
+        """ ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+        sh:nodeKind sh:IRI ;
+    ] ;
+
+    # rml:mode
+    sh:property [
+        sh:path rml:mode ;
+        rdfs:label "rml:mode" ;
+        rdfs:comment """
+        rml:mode specifies in which mode the target is opened such as read-only,
+        write-only, both, etc.
+        """ ;
+        sh:message """
+        rml:mode must be specified by any of the modes from rml:Mode class.
+        """ ;
+        sh:minCount 0 ;
+        sh:maxCount 1 ;
+        sh:in (rml:Read rml:ReadWrite rml:Write rml:WriteRead rml:Append
+               rml:AppendRead) ;
+    ] ;
+.
diff --git a/src/main/resources/shapes/rml-io/tests.py b/src/main/resources/shapes/rml-io/tests.py
new file mode 100755
index 00000000..ef6666ae
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/tests.py
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+#
+# (c) Dylan Van Assche (2020 - 2023)
+# IDLab - Ghent University - imec
+# MIT license
+#
+
+import os
+import argparse
+import unittest
+import logging
+from parameterized import parameterized
+from glob import glob
+from rdflib import Graph
+
+from mapping_validator import MappingValidator
+from utils import replace_strings_in_file, cleanup_tmp_folder
+
+TEST_CASES_DIR = os.path.join(os.path.abspath('../test-cases'), '*/*.ttl')
+SHAPE_FILE_LOCATION = 'io.ttl'
+ONTOLOGY_FILE_LOCATION = '../ontology/documentation/ontology.ttl'
+
+
+class MappingValidatorTests(unittest.TestCase):
+    def _validate_rules(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+
+        # Replace import statements
+        shapes = replace_strings_in_file(SHAPE_FILE_LOCATION, {
+            '': ''
+        })
+        ontology = replace_strings_in_file(ONTOLOGY_FILE_LOCATION, {
+            '': ''
+        })
+
+        mapping_validator = MappingValidator(shapes, ontology)
+        mapping_validator.validate(rules)
+
+        cleanup_tmp_folder(shapes)
+        cleanup_tmp_folder(ontology)
+
+    def test_non_existing_mapping_rules(self) -> None:
+        with self.assertRaises(FileNotFoundError):
+            p = os.path.abspath('does_not_exist.ttl')
+            self._validate_rules(p)
+
+    @parameterized.expand([(p,) for p in sorted(glob(TEST_CASES_DIR))],
+                          skip_on_empty=True)
+    def test_validation_rules(self, path: str) -> None:
+        """
+        Test if our SHACL shapes are able to validate our validation mapping
+        rules test cases.
+        """
+        print(f'Testing validation with: {path}')
+        self._validate_rules(path)
+
+
+if __name__ == '__main__':
+    parser = argparse.ArgumentParser(description='Execute tests for SHACL '
+                                     'shapes on RML mapping rules.')
+    parser.add_argument('--verbose', '-v', action='count', default=1,
+                        help='Set verbosity level of messages. Example: -vvv')
+    args = parser.parse_args()
+
+    args.verbose = 70 - (10 * args.verbose) if args.verbose > 0 else 0
+    logging.basicConfig(level=args.verbose,
+                        format='%(asctime)s %(levelname)s: %(message)s',
+                        datefmt='%Y-%m-%d %H:%M:%S')
+
+    print(TEST_CASES_DIR)
+    unittest.main(failfast=False)
+
diff --git a/src/main/resources/shapes/rml-io/utils.py b/src/main/resources/shapes/rml-io/utils.py
new file mode 100644
index 00000000..437871a7
--- /dev/null
+++ b/src/main/resources/shapes/rml-io/utils.py
@@ -0,0 +1,25 @@
+import os
+import shutil
+
+def replace_strings_in_file(file_path: str, replacements: dict) -> str:
+    abs_path = os.path.abspath(file_path)
+    tmp_dir = os.path.join(os.path.dirname(abs_path), 'tmp')
+    os.makedirs(tmp_dir, exist_ok=True)
+    tmp_file_path = os.path.join(tmp_dir, os.path.basename(abs_path))
+
+    with open(abs_path, 'r') as file:
+        file_data = file.read()
+
+    for old_string, new_string in replacements.items():
+        file_data = file_data.replace(old_string, new_string)
+
+    with open(tmp_file_path, 'w') as file:
+        file.write(file_data)
+
+    return tmp_file_path
+
+def cleanup_tmp_folder(file_path: str) -> None:
+    abs_path = os.path.abspath(file_path)
+    tmp_dir = os.path.dirname(abs_path)
+    if os.path.exists(tmp_dir):
+        shutil.rmtree(tmp_dir)
diff --git a/src/main/resources/shapes/lv.ttl b/src/main/resources/shapes/rml-lv/lv.ttl
similarity index 100%
rename from src/main/resources/shapes/lv.ttl
rename to src/main/resources/shapes/rml-lv/lv.ttl
diff --git a/src/main/resources/shapes/rml-lv/mapping_validator.py b/src/main/resources/shapes/rml-lv/mapping_validator.py
new file mode 100755
index 00000000..033c8b87
--- /dev/null
+++ b/src/main/resources/shapes/rml-lv/mapping_validator.py
@@ -0,0 +1,45 @@
+from logging import debug, info, critical
+from pyshacl import validate
+from rdflib import Graph
+from shutil import get_terminal_size
+
+
+class MappingValidator:
+    def __init__(self, shape: str, ontology: str) -> None:
+        sg = Graph()
+        sg.parse(shape, format='turtle')
+        self._shape = sg
+        og = Graph()
+        og.parse(ontology, format='turtle')
+        self._ont = og
+
+    def validate(self, rules: Graph, print_report: bool = True) -> None:
+        valid: bool
+        report_graph: Graph
+        report_text: str
+        valid, report_graph, report_text = validate(rules,
+                                                    shacl_graph=self._shape,
+                                                    ont_graph=self._ont,
+                                                    do_owl_imports=True)
+        debug(f'RML rules valid: {valid}')
+        debug(f'SHACL validation report: {report_text}')
+
+        # If mapping rules are invalid, print SHACL report and raise exception
+        if not valid and print_report:
+            self._print_report(report_text)
+            msg = 'RML mapping rules are invalid, a detailed explanation' \
+                ' is available in the report'
+            critical(msg)
+            raise ValueError(msg)
+
+    def _print_report(self, report_text: str) -> None:
+        tty_columns: int
+        tty_columns, _ = get_terminal_size()
+        info('-' * tty_columns)
+        title: str = 'RML rules validation report'
+        white_space: int = int((tty_columns - len(title)) / 2)
+        title = ' ' * white_space + title + ' ' * white_space
+        info(title)
+        info('-' * tty_columns)
+        info(report_text)
+        info('-' * tty_columns)
diff --git a/src/main/resources/shapes/rml-lv/requirements.txt b/src/main/resources/shapes/rml-lv/requirements.txt
new file mode 100644
index 00000000..e9fdd848
--- /dev/null
+++ b/src/main/resources/shapes/rml-lv/requirements.txt
@@ -0,0 +1,3 @@
+parameterized
+rdflib
+pyshacl
\ No newline at end of file
diff --git a/src/main/resources/shapes/rml-lv/tests.py b/src/main/resources/shapes/rml-lv/tests.py
new file mode 100755
index 00000000..8fe1fdd3
--- /dev/null
+++ b/src/main/resources/shapes/rml-lv/tests.py
@@ -0,0 +1,72 @@
+#!/usr/bin/env python
+#
+# (c) Dylan Van Assche (2020 - 2023)
+# IDLab - Ghent University - imec
+# MIT license
+#
+
+import os
+import argparse
+import unittest
+import logging
+from parameterized import parameterized
+from glob import glob
+from rdflib import Graph
+
+from mapping_validator import MappingValidator
+from utils import replace_strings_in_file, cleanup_tmp_folder
+
+TEST_CASES_DIR = os.path.join(os.path.abspath('../test-cases'), '*/*.ttl')
+SHAPE_FILE_LOCATION = 'lv.ttl'
+ONTOLOGY_FILE_LOCATION = '../ontology/documentation/ontology.ttl'
+
+
+class MappingValidatorTests(unittest.TestCase):
+    def _validate_rules(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+
+        # Replace import statements
+        # also include io shapes just to validate the logical sources in the test cases
+        shapes = replace_strings_in_file(SHAPE_FILE_LOCATION, {
+            '': ', '
+        })
+        ontology = replace_strings_in_file(ONTOLOGY_FILE_LOCATION, {
+            '': ''
+        })
+
+        mapping_validator = MappingValidator(shapes, ontology)
+        mapping_validator.validate(rules)
+
+        cleanup_tmp_folder(shapes)
+        cleanup_tmp_folder(ontology)
+
+    def test_non_existing_mapping_rules(self) -> None:
+        with self.assertRaises(FileNotFoundError):
+            p = os.path.abspath('does_not_exist.ttl')
+            self._validate_rules(p)
+
+    @parameterized.expand([(p,) for p in sorted(glob(TEST_CASES_DIR))],
+                          skip_on_empty=True)
+    def test_validation_rules(self, path: str) -> None:
+        """
+        Test if our SHACL shapes are able to validate our validation mapping
+        rules test cases.
+        """
+        print(f'Testing validation with: {path}')
+        self._validate_rules(path)
+
+
+if __name__ == '__main__':
+    parser = argparse.ArgumentParser(description='Execute tests for SHACL '
+                                     'shapes on RML mapping rules.')
+    parser.add_argument('--verbose', '-v', action='count', default=1,
+                        help='Set verbosity level of messages. Example: -vvv')
+    args = parser.parse_args()
+
+    args.verbose = 70 - (10 * args.verbose) if args.verbose > 0 else 0
+    logging.basicConfig(level=args.verbose,
+                        format='%(asctime)s %(levelname)s: %(message)s',
+                        datefmt='%Y-%m-%d %H:%M:%S')
+
+    print(TEST_CASES_DIR)
+    unittest.main(failfast=False)
diff --git a/src/main/resources/shapes/rml-lv/utils.py b/src/main/resources/shapes/rml-lv/utils.py
new file mode 100644
index 00000000..437871a7
--- /dev/null
+++ b/src/main/resources/shapes/rml-lv/utils.py
@@ -0,0 +1,25 @@
+import os
+import shutil
+
+def replace_strings_in_file(file_path: str, replacements: dict) -> str:
+    abs_path = os.path.abspath(file_path)
+    tmp_dir = os.path.join(os.path.dirname(abs_path), 'tmp')
+    os.makedirs(tmp_dir, exist_ok=True)
+    tmp_file_path = os.path.join(tmp_dir, os.path.basename(abs_path))
+
+    with open(abs_path, 'r') as file:
+        file_data = file.read()
+
+    for old_string, new_string in replacements.items():
+        file_data = file_data.replace(old_string, new_string)
+
+    with open(tmp_file_path, 'w') as file:
+        file.write(file_data)
+
+    return tmp_file_path
+
+def cleanup_tmp_folder(file_path: str) -> None:
+    abs_path = os.path.abspath(file_path)
+    tmp_dir = os.path.dirname(abs_path)
+    if os.path.exists(tmp_dir):
+        shutil.rmtree(tmp_dir)
diff --git a/src/main/resources/shapes/rml-star/assertedtriples_map.ttl b/src/main/resources/shapes/rml-star/assertedtriples_map.ttl
new file mode 100644
index 00000000..628ab6e2
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/assertedtriples_map.ttl
@@ -0,0 +1,38 @@
+###############################################################################
+# RML Asserted Triples Map shape                                              #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2025)              #
+###############################################################################
+@prefix :  .
+@prefix rdfs:  .
+@prefix sh:  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  .
+
+# Validate an RML Asserted Triples Map
+:RMLAssertedTriplesMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:AssertedTriplesMap ;
+    sh:message "AssertedTriplesMap" ;
+    rdfs:comment """
+    Represents a Asserted Triples Map.
+    """ ;
+    sh:message """
+    Asserted Triples Map requires exactly one rml:subject or 
+    one rml:subjectMap and zero or more rml:predicateObjectMaps
+    and exactly one rml:logicalSource.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTriplesMapPropertiesShape
+        # Asserted Triples Map specific shapes
+        [
+            sh:path rdf:type ;
+            sh:message """
+            Asserted Triples Map must have a rml:AssertedTriplesMap type.
+            """ ;
+            sh:value rml:AssertedTriplesMap ;
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-star/external_shapes.ttl b/src/main/resources/shapes/rml-star/external_shapes.ttl
new file mode 100644
index 00000000..b58054a9
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/external_shapes.ttl
@@ -0,0 +1,20 @@
+###############################################################################
+# RML Star external resources shapes                                          #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023)                     #
+###############################################################################
+@prefix sh:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+# Shapes are defined in the corresponding repositories of each specification
+# Provide their IRI as stub to allow validation in Star.
+
+:RMLJoinConditionPropertiesShape
+    a sh:NodeShape;   
+.
+
+:RMLTriplesMapPropertiesShape
+    a sh:NodeShape;
+.
diff --git a/src/main/resources/shapes/rml-star/generate_shape.py b/src/main/resources/shapes/rml-star/generate_shape.py
new file mode 100755
index 00000000..33e47459
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/generate_shape.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+
+import argparse
+import sys
+from os import path
+from glob import glob
+from rdflib import Graph, Namespace
+from rdflib.plugins.serializers.turtle import TurtleSerializer
+from rdflib import plugin
+
+SUBSHAPE_FORMAT = 'turtle'
+SUBSHAPE_GLOB_PATTERN = '*.ttl'
+SHACL = Namespace('http://www.w3.org/ns/shacl#')
+RML = Namespace('http://w3id.org/rml/')
+
+
+class TurtleWithPrefixes(TurtleSerializer):
+    """
+    A turtle serializer that always emits prefixes
+    Workaround for https://github.com/RDFLib/rdflib/issues/1048
+    """
+    roundtrip_prefixes = True  # Undocumented, forces to write all prefixes
+
+
+class ShapeGenerator:
+    """
+    Generates a complete SHACL shape of all the SHACL subshapes.
+    Useful for using the shapes in the shacl.org Playground.
+    """
+    def __init__(self, glob_pattern: str, rdf_format: str,
+                 destination: str) -> None:
+        self._glob_pattern: str = glob_pattern
+        self._rdf_format: str = rdf_format
+        self._destination: str = destination
+        self._shape = Graph()
+        self._shape.bind('sh', SHACL)
+        self._shape.bind('rml', RML)
+        # Register TurtleWithPrefixes serializer as 'tortoise' format
+        plugin.register('tortoise',
+                        plugin.Serializer,
+                        'generate_shape',
+                        'TurtleWithPrefixes')
+
+    def generate(self) -> None:
+        """
+        Generate a full shape from the sub shapes.
+        """
+        print('Reading subshapes:')
+        for sub_shape in glob(self._glob_pattern):
+            if 'star.ttl' in sub_shape or 'shacl.ttl' in sub_shape:
+                continue
+            print(f"\t{sub_shape}")
+            g = Graph()
+            g.bind('sh', SHACL)
+            g.bind('rml', RML)
+            self._shape += g.parse(sub_shape, format=self._rdf_format)
+
+        print(f'Writing shape to {self._destination}')
+        self._shape.serialize(destination=self._destination, format='tortoise')
+
+
+if __name__ == '__main__':
+    p = argparse.ArgumentParser(description='Generate a complete SHACL shape '
+                                'from the subshapes.')
+    p.add_argument('destination', type=str, help='Location to write the '
+                   'complete SHACL shape as Turtle.')
+    # Arguments parsing
+    args = p.parse_args()
+    if not path.exists(args.destination):
+        print(f'{args.destination} file path does not exist!')
+        sys.exit(1)
+
+    if path.isdir(args.destination):
+        args.destination = path.join(args.destination, 'star.ttl')
+
+    # Generate shape
+    generator = ShapeGenerator(SUBSHAPE_GLOB_PATTERN, SUBSHAPE_FORMAT,
+                               args.destination)
+    generator.generate()
diff --git a/src/main/resources/shapes/rml-star/mapping_validator.py b/src/main/resources/shapes/rml-star/mapping_validator.py
new file mode 100755
index 00000000..dabb1d24
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/mapping_validator.py
@@ -0,0 +1,40 @@
+from logging import debug, info, critical
+from pyshacl import validate
+from rdflib import Graph
+from shutil import get_terminal_size
+
+
+class MappingValidator:
+    def __init__(self, shape: str) -> None:
+        g = Graph()
+        g.parse(shape, format='turtle')
+        self._shape = g
+
+    def validate(self, rules: Graph, print_report: bool = True) -> None:
+        valid: bool
+        report_graph: Graph
+        report_text: str
+        valid, report_graph, report_text = validate(rules,
+                                                    shacl_graph=self._shape)
+        debug(f'RML rules valid: {valid}')
+        debug(f'SHACL validation report: {report_text}')
+
+        # If mapping rules are invalid, print SHACL report and raise exception
+        if not valid and print_report:
+            self._print_report(report_text)
+            msg = 'RML mapping rules are invalid, a detailed explanation' \
+                ' is available in the report'
+            critical(msg)
+            raise ValueError(msg)
+
+    def _print_report(self, report_text: str) -> None:
+        tty_columns: int
+        tty_columns, _ = get_terminal_size()
+        info('-' * tty_columns)
+        title: str = 'RML rules validation report'
+        white_space: int = int((tty_columns - len(title)) / 2)
+        title = ' ' * white_space + title + ' ' * white_space
+        info(title)
+        info('-' * tty_columns)
+        info(report_text)
+        info('-' * tty_columns)
diff --git a/src/main/resources/shapes/rml-star/nonassertedtriples_map.ttl b/src/main/resources/shapes/rml-star/nonassertedtriples_map.ttl
new file mode 100644
index 00000000..7de4a219
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/nonassertedtriples_map.ttl
@@ -0,0 +1,38 @@
+###############################################################################
+# RML Non Asserted Triples Map shape                                          #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2025)              #
+###############################################################################
+@prefix :  .
+@prefix rdfs:  .
+@prefix sh:  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  .
+
+# Validate an RML Non Asserted Triples Map
+:RMLNonAssertedTriplesMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:NonAssertedTriplesMap ;
+    sh:message "NonAssertedTriplesMap" ;
+    rdfs:comment """
+    Represents a Non Asserted Triples Map.
+    """ ;
+    sh:message """
+    Non Asserted Triples Map requires exactly one rml:subject or 
+    one rml:subjectMap and zero or more rml:predicateObjectMaps
+    and exactly one rml:logicalSource.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLTriplesMapPropertiesShape
+        # Non Asserted Triples Map specific shapes
+        [
+            sh:path rdf:type ;
+            sh:message """
+            Non Asserted Triples Map must have a rml:NonAssertedTriplesMap type.
+            """ ;
+            sh:value rml:NonAssertedTriplesMap ;
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-star/requirements.txt b/src/main/resources/shapes/rml-star/requirements.txt
new file mode 100644
index 00000000..3d264b8e
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/requirements.txt
@@ -0,0 +1,3 @@
+parameterized
+rdflib
+pyshacl
diff --git a/src/main/resources/shapes/rml-star/shacl.ttl b/src/main/resources/shapes/rml-star/shacl.ttl
new file mode 100644
index 00000000..e37856a1
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/shacl.ttl
@@ -0,0 +1,406 @@
+@prefix rdf:   .
+@prefix rdfs:  .
+@prefix sh:    .
+@prefix xsd:   .
+
+@prefix shsh:  .
+
+shsh:
+	rdfs:label "SHACL for SHACL"@en ;
+	rdfs:comment "This shapes graph can be used to validate SHACL shapes graphs against a subset of the SHACL syntax rules."@en ;
+	sh:declare [
+		sh:prefix "shsh" ;
+		sh:namespace "http://www.w3.org/ns/shacl-shacl#" ;
+	] .
+
+	
+shsh:ListShape
+	a sh:NodeShape ;
+	rdfs:label "List shape"@en ;
+	rdfs:comment "A shape describing well-formed RDF lists. Currently does not check for non-recursion. This could be expressed using SHACL-SPARQL."@en ;
+	rdfs:seeAlso  ;
+	sh:property [
+		sh:path [ sh:zeroOrMorePath rdf:rest ] ;
+		rdfs:comment "Each list member (including this node) must be have the shape shsh:ListNodeShape."@en ;
+		sh:hasValue rdf:nil ;
+		sh:node shsh:ListNodeShape ;
+	] .
+
+shsh:ListNodeShape
+	a sh:NodeShape ;
+	rdfs:label "List node shape"@en ;
+	rdfs:comment "Defines constraints on what it means for a node to be a node within a well-formed RDF list. Note that this does not check whether the rdf:rest items are also well-formed lists as this would lead to unsupported recursion."@en ;
+	sh:or ( [
+				sh:hasValue rdf:nil ;
+        		sh:property [
+					sh:path rdf:first ;
+					sh:maxCount 0 ;
+				] ;
+				sh:property [
+					sh:path rdf:rest ;
+					sh:maxCount 0 ;
+				] ;
+			]
+			[
+				sh:not [ sh:hasValue rdf:nil ] ;
+				sh:property [
+					sh:path rdf:first ;
+					sh:maxCount 1 ;
+					sh:minCount 1 ;
+				] ;
+				sh:property [
+					sh:path rdf:rest ;
+					sh:maxCount 1 ;
+					sh:minCount 1 ;
+				] ;
+			] ) .
+
+shsh:ShapeShape
+	a sh:NodeShape ;
+	rdfs:label "Shape shape"@en ;
+	rdfs:comment "A shape that can be used to validate syntax rules for other shapes."@en ;
+	
+	# See https://www.w3.org/TR/shacl/#shapes for what counts as a shape
+	sh:targetClass sh:NodeShape ;
+	sh:targetClass sh:PropertyShape ;
+	sh:targetSubjectsOf sh:targetClass, sh:targetNode, sh:targetObjectsOf, sh:targetSubjectsOf ;
+	sh:targetSubjectsOf sh:and, sh:class, sh:closed, sh:datatype, sh:disjoint, sh:equals, sh:flags, sh:hasValue,
+		sh:ignoredProperties, sh:in, sh:languageIn, sh:lessThan, sh:lessThanOrEquals, sh:maxCount, sh:maxExclusive,
+		sh:maxInclusive, sh:maxLength, sh:minCount, sh:minExclusive, sh:minInclusive, sh:minLength, sh:node, sh:nodeKind,
+		sh:not, sh:or, sh:pattern, sh:property, sh:qualifiedMaxCount, sh:qualifiedMinCount, sh:qualifiedValueShape,
+		sh:qualifiedValueShape, sh:qualifiedValueShapesDisjoint, sh:qualifiedValueShapesDisjoint, sh:uniqueLang, sh:xone ;
+
+	sh:targetObjectsOf sh:node ;        # node-node
+	sh:targetObjectsOf sh:not ;         # not-node
+	sh:targetObjectsOf sh:property ;    # property-node
+	sh:targetObjectsOf sh:qualifiedValueShape ; # qualifiedValueShape-node
+
+	# Shapes are either node shapes or property shapes
+	sh:xone ( shsh:NodeShapeShape shsh:PropertyShapeShape ) ;
+
+	sh:property [
+		sh:path sh:targetNode ;
+		sh:nodeKind	sh:IRIOrLiteral ;   # targetNode-nodeKind
+	] ; 
+	sh:property [
+		sh:path sh:targetClass ;
+		sh:nodeKind sh:IRI ;            # targetClass-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:targetSubjectsOf ;
+		sh:nodeKind sh:IRI ;            # targetSubjectsOf-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:targetObjectsOf ;
+		sh:nodeKind sh:IRI ;            # targetObjectsOf-nodeKind
+	] ;
+	sh:or ( [ sh:not [ 
+				sh:class rdfs:Class ; 
+				sh:or ( [ sh:class sh:NodeShape ] [ sh:class sh:PropertyShape ] )
+			] ]
+			[ sh:nodeKind sh:IRI ]
+		  ) ;                           # implicit-targetClass-nodeKind
+	
+	sh:property [
+		sh:path sh:severity ;
+		sh:maxCount 1 ;                 # severity-maxCount
+		sh:nodeKind sh:IRI ;            # severity-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:message ;
+		sh:or ( [ sh:datatype xsd:string ] [ sh:datatype rdf:langString ] ) ;   # message-datatype
+	] ;
+	sh:property [
+		sh:path sh:deactivated ;
+		sh:maxCount 1 ;                 # deactivated-maxCount
+		sh:in ( true false ) ;          # deactivated-datatype
+	] ;
+
+	sh:property [
+		sh:path sh:and ;
+		sh:node shsh:ListShape ;        # and-node
+	] ;
+	sh:property [
+		sh:path sh:class ;
+		sh:nodeKind sh:IRI ;            # class-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:closed ;
+		sh:datatype xsd:boolean ;       # closed-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:ignoredProperties ;
+		sh:node shsh:ListShape ;        # ignoredProperties-node
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path ( sh:ignoredProperties [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:nodeKind sh:IRI ;            # ignoredProperties-members-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:datatype ;
+		sh:nodeKind sh:IRI ;            # datatype-nodeKind
+		sh:maxCount 1 ;                 # datatype-maxCount
+	] ;
+	sh:property [
+		sh:path sh:disjoint ;
+		sh:nodeKind sh:IRI ;            # disjoint-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:equals ;
+		sh:nodeKind sh:IRI ;            # equals-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:in ;
+		sh:maxCount 1 ;                 # in-maxCount		
+		sh:node shsh:ListShape ;        # in-node
+	] ;
+	sh:property [
+		sh:path sh:languageIn ;
+		sh:maxCount 1 ;                 # languageIn-maxCount
+		sh:node shsh:ListShape ;        # languageIn-node
+	] ;
+	sh:property [
+		sh:path ( sh:languageIn [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:datatype xsd:string ;        # languageIn-members-datatype
+	] ;
+	sh:property [
+		sh:path sh:lessThan ;
+		sh:nodeKind sh:IRI ;            # lessThan-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:lessThanOrEquals ;
+		sh:nodeKind sh:IRI ;            # lessThanOrEquals-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxCount ;
+		sh:datatype xsd:integer ;       # maxCount-datatype
+		sh:maxCount 1 ;                 # maxCount-maxCount
+	] ;
+	sh:property [
+		sh:path sh:maxExclusive ;
+		sh:maxCount 1 ;                 # maxExclusive-maxCount
+		sh:nodeKind sh:Literal ;        # maxExclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxInclusive ;
+		sh:maxCount 1 ;                 # maxInclusive-maxCount
+		sh:nodeKind sh:Literal ;        # maxInclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:maxLength ;
+		sh:datatype xsd:integer ;       # maxLength-datatype
+		sh:maxCount 1 ;                 # maxLength-maxCount
+	] ;
+	sh:property [
+		sh:path sh:minCount ;
+		sh:datatype xsd:integer ;       # minCount-datatype
+		sh:maxCount 1 ;                 # minCount-maxCount
+	] ;
+	sh:property [
+		sh:path sh:minExclusive ;
+		sh:maxCount 1 ;                 # minExclusive-maxCount
+		sh:nodeKind sh:Literal ;        # minExclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:minInclusive ;
+		sh:maxCount 1 ;                 # minInclusive-maxCount
+		sh:nodeKind sh:Literal ;        # minInclusive-nodeKind
+	] ;
+	sh:property [
+		sh:path sh:minLength ;
+		sh:datatype xsd:integer ;       # minLength-datatype
+		sh:maxCount 1 ;                 # minLength-maxCount
+	] ;
+	sh:property [
+		sh:path sh:nodeKind ;
+		sh:in ( sh:BlankNode sh:IRI sh:Literal sh:BlankNodeOrIRI sh:BlankNodeOrLiteral sh:IRIOrLiteral ) ;	# nodeKind-in
+		sh:maxCount 1 ;                 # nodeKind-maxCount
+	] ;
+	sh:property [
+		sh:path sh:or ;
+		sh:node shsh:ListShape ;        # or-node
+	] ;
+	sh:property [
+		sh:path sh:pattern ;
+		sh:datatype xsd:string ;        # pattern-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+		# Not implemented: syntax rule pattern-regex
+	] ;
+	sh:property [
+		sh:path sh:flags ;
+		sh:datatype xsd:string ;        # flags-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedMaxCount ;
+		sh:datatype xsd:integer ;       # qualifiedMaxCount-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedMinCount ;
+		sh:datatype xsd:integer ;       # qualifiedMinCount-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShape ;
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShapesDisjoint ;
+		sh:datatype xsd:boolean ;       # qualifiedValueShapesDisjoint-datatype
+		sh:maxCount 1 ;                 # multiple-parameters
+	] ;
+	sh:property [
+		sh:path sh:uniqueLang ;
+		sh:datatype xsd:boolean ;       # uniqueLang-datatype
+		sh:maxCount 1 ;                 # uniqueLang-maxCount
+	] ;
+	sh:property [
+		sh:path sh:xone ;
+		sh:node shsh:ListShape ;        # xone-node
+	] .
+	
+shsh:NodeShapeShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:node ;        # node-node
+	sh:property [
+		sh:path sh:path ;
+		sh:maxCount 0 ;                 # NodeShape-path-maxCount
+	] ;
+	sh:property [
+		sh:path sh:lessThan ;
+		sh:maxCount 0 ;                 # lessThan-scope
+	] ;
+	sh:property [
+		sh:path sh:lessThanOrEquals ;
+		sh:maxCount 0 ;                 # lessThanOrEquals-scope
+	] ;
+	sh:property [
+		sh:path sh:maxCount ;
+		sh:maxCount 0 ;                 # maxCount-scope
+	] ;
+	sh:property [
+		sh:path sh:minCount ;
+		sh:maxCount 0 ;                 # minCount-scope
+	] ;
+	sh:property [
+		sh:path sh:qualifiedValueShape ;
+		sh:maxCount 0 ;                 # qualifiedValueShape-scope
+	] ;
+	sh:property [
+		sh:path sh:uniqueLang ;
+		sh:maxCount 0 ;                 # uniqueLang-scope
+	] .
+
+shsh:PropertyShapeShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:property ;    # property-node
+	sh:property [
+		sh:path sh:path ;
+		sh:maxCount 1 ;                 # path-maxCount
+		sh:minCount 1 ;                 # PropertyShape-path-minCount
+		sh:node shsh:PathShape ;        # path-node
+	] .
+
+# Values of sh:and, sh:or and sh:xone must be lists of shapes
+shsh:ShapesListShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:and ;         # and-members-node
+	sh:targetObjectsOf sh:or ;          # or-members-node
+	sh:targetObjectsOf sh:xone ;        # xone-members-node
+	sh:property [
+		sh:path ( [ sh:zeroOrMorePath rdf:rest ] rdf:first ) ;
+		sh:node shsh:ShapeShape ;
+	] .
+
+
+# A path of blank node path syntax, used to simulate recursion
+_:PathPath
+	sh:alternativePath (
+		( [ sh:zeroOrMorePath rdf:rest ] rdf:first )
+		( sh:alternativePath [ sh:zeroOrMorePath rdf:rest ] rdf:first )
+		sh:inversePath
+		sh:zeroOrMorePath
+		sh:oneOrMorePath
+		sh:zeroOrOnePath 
+	) .
+
+shsh:PathShape
+	a sh:NodeShape ;
+	rdfs:label "Path shape"@en ;
+	rdfs:comment "A shape that can be used to validate the syntax rules of well-formed SHACL paths."@en ;
+	rdfs:seeAlso  ;
+	sh:property [
+		sh:path [ sh:zeroOrMorePath _:PathPath ] ;
+		sh:node shsh:PathNodeShape ;
+	] .
+
+shsh:PathNodeShape
+	sh:xone (                           # path-metarule
+			[ sh:nodeKind sh:IRI ]          # 2.3.1.1: Predicate path
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.2: Sequence path
+			  sh:node shsh:PathListWithAtLeast2Members ;
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.3: Alternative path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:alternativePath ;
+			    sh:node shsh:PathListWithAtLeast2Members ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ]
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.4: Inverse path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:inversePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.5: Zero-or-more path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:zeroOrMorePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.6: One-or-more path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:oneOrMorePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+			[ sh:nodeKind sh:BlankNode ;    # 2.3.1.7: Zero-or-one path
+			  sh:closed true ;
+			  sh:property [
+			    sh:path sh:zeroOrOnePath ;
+			    sh:minCount 1 ;
+			    sh:maxCount 1 ;
+			  ] 
+			]
+		) .
+
+shsh:PathListWithAtLeast2Members
+	a sh:NodeShape ;
+	sh:node shsh:ListShape ;
+	sh:property [
+		sh:path [ sh:oneOrMorePath rdf:rest ] ;
+		sh:minCount 2 ;    # 1 other list node plus rdf:nil
+	] .
+
+shsh:ShapesGraphShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:shapesGraph ;
+	sh:nodeKind sh:IRI .                # shapesGraph-nodeKind
+
+shsh:EntailmentShape
+	a sh:NodeShape ;
+	sh:targetObjectsOf sh:entailment ;
+	sh:nodeKind sh:IRI .                # entailment-nodeKind
+
diff --git a/src/main/resources/shapes/rml-star/shared_properties.ttl b/src/main/resources/shapes/rml-star/shared_properties.ttl
new file mode 100644
index 00000000..82446fd5
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/shared_properties.ttl
@@ -0,0 +1,48 @@
+###############################################################################
+# RML shared properties among resources shapes                                #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023)                     #
+###############################################################################
+@prefix sh:  .
+@prefix :  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  . 
+
+
+:RMLAssertedAndNonTriplesMapPropertiesShape
+    a sh:NodeShape;   
+    sh:targetObjectsOf rml:quotedTriplesMap ;
+    sh:targetClass rml:AssertedTriplesMap ;
+    sh:targetClass rml:NonAssertedTriplesMap ;
+    sh:nodeKind sh:BlankNodeOrIRI ;
+    sh:and ( 
+        [
+            sh:path rml:predicateObjectMap ;
+            sh:message """
+            Exactly one Predicate Object Map must be specified in the
+            Triples Map referenced by rml:quotedTriplesMap.
+            """ ;
+            sh:minCount 1 ;
+            sh:maxCount 1 ;
+        ]
+        [
+            sh:message """
+            rml:quotedTriplesMap expects either a rml:AssertedTriplesMap 
+            or rml:NonAssertedTriplesMap.
+            """ ;
+            sh:or ([sh:node :RMLAssertedTriplesMapShape]
+                   [sh:node :RMLNonAssertedTriplesMapShape]) ;
+        ]
+        [
+            sh:message """
+            Either a rml:AssertedTriplesMap or rml:NonAssertedTriplesMap,
+            but not both.
+            """ ;
+            sh:path rdf:type ;
+            sh:alternativePath (rml:AssertedTriplesMap
+                                rml:NonAssertedTriplesMap );
+            sh:minCount 1 ;
+            sh:maxCount 1 ;
+        ]
+    );
+.
diff --git a/src/main/resources/shapes/star.ttl b/src/main/resources/shapes/rml-star/star.ttl
similarity index 98%
rename from src/main/resources/shapes/star.ttl
rename to src/main/resources/shapes/rml-star/star.ttl
index 4fb8c271..02c0f0ec 100644
--- a/src/main/resources/shapes/star.ttl
+++ b/src/main/resources/shapes/rml-star/star.ttl
@@ -54,7 +54,7 @@
     sh:targetObjectsOf rml:quotedTriplesMap .
 
  a sh:NodeShape ;
-    sh:and (  [ sh:description """
+    sh:and (  [ rdfs:comment """
             An Quoted Triples Map element to generate a RDF-star triple as 
             subject or object or another triple from a logical source record.
             """ ;
@@ -73,7 +73,7 @@
                 sh:xone ( [ sh:minCount 1 ;
                             sh:path rml:predicate ] [ sh:minCount 1 ;
                             sh:path rml:predicateMap ] ) ] ) ;
-    sh:description """
+    rdfs:comment """
     Represents a Star Map.
     """ ;
     sh:message """
@@ -89,7 +89,7 @@
             """ ;
                 sh:path rdf:type ;
                 sh:value rml:AssertedTriplesMap ] ) ;
-    sh:description """
+    rdfs:comment """
     Represents a Asserted Triples Map.
     """ ;
     sh:message """
@@ -108,7 +108,7 @@
             """ ;
                 sh:path rdf:type ;
                 sh:value rml:NonAssertedTriplesMap ] ) ;
-    sh:description """
+    rdfs:comment """
     Represents a Non Asserted Triples Map.
     """ ;
     sh:message """
diff --git a/src/main/resources/shapes/rml-star/star_map.ttl b/src/main/resources/shapes/rml-star/star_map.ttl
new file mode 100644
index 00000000..73486a49
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/star_map.ttl
@@ -0,0 +1,61 @@
+###############################################################################
+# RML Star Map shape                                                          #
+# Copyright Dylan Van Assche, IDLab - UGent - imec (2023 - 2025)              #
+###############################################################################
+@prefix :  .
+@prefix rdfs:  .
+@prefix sh:  .
+@prefix rdf:  .
+@prefix rml:  .
+@prefix xsd:  .
+
+# Validate an RMLS Star Map
+:RMLStarMapShape
+    a sh:NodeShape ;
+    sh:targetClass rml:StarMap ;
+    sh:message "StarMap" ;
+    rdfs:comment """
+    Represents a Star Map.
+    """ ;
+    sh:message """
+    Star Map requires exactly one rml:quotedTriplesMap and
+    zero or more rml:joinCondition.
+    """ ;
+
+    sh:and (
+        # Inherited shapes
+        :RMLJoinConditionPropertiesShape
+        # Star Map specific shapes
+        [
+            sh:path rml:quotedTriplesMap ;
+            sh:name "quotedTriplesMap" ;
+            sh:description """
+            An Quoted Triples Map element to generate a RDF-star triple as 
+            subject or object or another triple from a logical source record.
+            """ ;
+            sh:message """
+            Exactly one rml:quotedTriplesMap is required.
+            """ ;
+            sh:nodeKind sh:BlankNodeOrIRI ;
+            sh:minCount 1 ;
+            sh:maxCount 1 ;
+        ]
+        [
+            sh:targetObjectsOf rml:predicateObjectMap ;
+            sh:name "PredicateMap" ;
+            sh:message """
+            An Quoted Triples Map may never be used for generating a predicate.
+            """ ;
+            sh:xone (
+                [
+                    sh:path rml:predicate ;
+                    sh:minCount 1 ;
+                ] 
+                [
+                    sh:path rml:predicateMap ;
+                    sh:minCount 1 ;
+                ] 
+            );
+        ]
+    ) ;
+.
diff --git a/src/main/resources/shapes/rml-star/tests.py b/src/main/resources/shapes/rml-star/tests.py
new file mode 100755
index 00000000..317a08d7
--- /dev/null
+++ b/src/main/resources/shapes/rml-star/tests.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+#
+# (c) Dylan Van Assche (2020 - 2023)
+# IDLab - Ghent University - imec
+# MIT license
+#
+
+import os
+import argparse
+import unittest
+import logging
+from parameterized import parameterized
+from glob import glob
+from rdflib import Graph
+
+from mapping_validator import MappingValidator
+
+TEST_CASES_DIR = os.path.join(os.path.abspath('../test-cases'),
+                              '*/*/mapping.ttl')
+STAR_SHAPE_FILE = os.path.abspath('star.ttl')
+SHACL_SHAPE_FILE = os.path.abspath('shacl.ttl')
+
+
+class MappingValidatorTests(unittest.TestCase):
+    def _validate_rules(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+        mapping_validator = MappingValidator(STAR_SHAPE_FILE)
+        mapping_validator.validate(rules)
+
+    def _validate_shapes(self, path: str) -> None:
+        rules = Graph().parse(path, format='turtle')
+        mapping_validator = MappingValidator(SHACL_SHAPE_FILE)
+        mapping_validator.validate(rules)
+
+    def test_non_existing_mapping_rules(self) -> None:
+        with self.assertRaises(FileNotFoundError):
+            p = os.path.abspath('does_not_exist.ttl')
+            self._validate_rules(p)
+
+    @parameterized.expand([(p,) for p in sorted(glob(TEST_CASES_DIR))],
+                          skip_on_empty=True)
+    def test_validation_rules(self, path: str) -> None:
+        """
+        Test if our SHACL shapes are able to validate our validation mapping
+        rules test cases.
+        """
+        print(f'Testing validation with: {path}')
+        if 'invalid' in path:
+            with self.assertRaises(Exception):
+                self._validate_rules(path)
+        else:
+            self._validate_rules(path)
+
+    def test_validation_shapes(self) -> None:
+        """
+        Test if our SHACL shapes are valid according to the W3C Recommdendation
+        of SHACL. Validation with the official SHACL shapes for SHACL.
+
+        See https://www.w3.org/TR/shacl/#shacl-shacl
+        """
+        self._validate_shapes('./star.ttl')
+
+
+if __name__ == '__main__':
+    parser = argparse.ArgumentParser(description='Execute tests for SHACL '
+                                     'shapes on RML mapping rules.')
+    parser.add_argument('--verbose', '-v', action='count', default=1,
+                        help='Set verbosity level of messages. Example: -vvv')
+    args = parser.parse_args()
+
+    args.verbose = 70 - (10 * args.verbose) if args.verbose > 0 else 0
+    logging.basicConfig(level=args.verbose,
+                        format='%(asctime)s %(levelname)s: %(message)s',
+                        datefmt='%Y-%m-%d %H:%M:%S')
+
+    print(TEST_CASES_DIR)
+    unittest.main(failfast=False)
diff --git a/src/test/resources/rml-core/RMLTC0012a-JSON/README.md b/src/test/resources/rml-core/RMLTC0012a-JSON/README.md
index 810939a8..95239e9c 100644
--- a/src/test/resources/rml-core/RMLTC0012a-JSON/README.md
+++ b/src/test/resources/rml-core/RMLTC0012a-JSON/README.md
@@ -56,9 +56,9 @@
 
 **Output**
 ```
-_:BobSmith30  "30" .
+_:BobSmith30  "30"^^ .
 _:BobSmith30  "Bob Smith" .
-_:SueJones20  "20" .
+_:SueJones20  "20"^^ .
 _:SueJones20  "Sue Jones" .
 
 
diff --git a/src/test/resources/rml-core/dev.html b/src/test/resources/rml-core/dev.html
index f43f6cb5..a36285bc 100644
--- a/src/test/resources/rml-core/dev.html
+++ b/src/test/resources/rml-core/dev.html
@@ -143,7 +143,6 @@
 
-
diff --git a/src/test/resources/rml-core/docs/20250930/index.html b/src/test/resources/rml-core/docs/20250930/index.html new file mode 100644 index 00000000..782b75e6 --- /dev/null +++ b/src/test/resources/rml-core/docs/20250930/index.html @@ -0,0 +1,3878 @@ + + + + + + +RML-Core: Test Cases + + + + + + + + + + + + + + + + + + + +

Abstract

This document defines the RML-Core test cases to the determine the RML-Core specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Core test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Core specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Core test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC0000-JSON

+

Title: "one table, one column, zero rows"

+

Description: "Tests if an empty table produces an empty RDF graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": []
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
# empty database
+
+
+

5. RMLTC0001a-JSON

+

Title: "One column mapping, subject URI generation by using rml:template"

+

Description: "Tests: (1) one column mapping; (2) subject URI generation by using rml:template; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap <http://example.com/base/#NameSubjectMap> .
+
+<http://example.com/base/#NameSubjectMap> rml:template "http://example.com/{$.Name}" .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

6. RMLTC0001b-JSON

+

Title: "One column mapping, generation of a BlankNode subject by using rml:termType"

+

Description: "Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rml:termType; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

7. RMLTC0002a-JSON

+

Title: "Two columns mapping, generation of a subject URI by the concatenation of two column values"

+

Description: "Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

8. RMLTC0002b-JSON

+

Title: "Two columns mapping, generation of a BlankNode subject by using rml:template and rml:termType"

+

Description: "Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rml:template; (3) one column to one property"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "students{$.ID}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

9. RMLTC0002e-JSON

+

Title: "Two columns mapping, an undefined rml:path"

+

Description: "Tests the presence of an undefined rml:path"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

10. RMLTC0002g-JSON

+

Title: "Two columns mapping, invalid JSONPath"

+

Description: "Test the presence of an invalid JSONPath"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student2.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.IDs"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.ID}/{$.Name}"
+    ] .
+
+
+

11. RMLTC0003c-JSON

+

Title: "Three columns mapping, by using a rml:template to produce literal"

+

Description: "Tests: (1) three column mapping; and (2) the use of rml:template to produce literal"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.FirstName} {$.LastName}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+
+
+

12. RMLTC0004a-JSON

+

Title: "Two column mapping, from one row table to two different triples"

+

Description: "Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "Student": "Venus",
+    "Sport":"Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Student"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student;
+      rml:template "http://example.com/{$.Student}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Sport;
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .
+
+
+
+

13. RMLTC0004b-JSON

+

Title: "One column mapping, presence of rml:termType rml:Literal on rml:subjectMap"

+

Description: "Tests: (1) one column mapping (2) the presence of rml:termType rml:Literal on rml:subjectMap, which is invalid"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}";
+      rml:termType rml:Literal
+    ] .
+
+
+

14. RMLTC0005a-JSON

+

Title: "Typing of resources"

+

Description: "Tests the typing of resources"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    },
+    {
+      "fname": "Sue",
+      "lname": "Jones",
+      "amount": "20.0E0"
+    },
+    {
+      "fname": "Bob",
+      "lname": "Smith",
+      "amount": "30.0E0"
+    }
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "ious.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:owes
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:template "http://example.com/{$.fname};{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
+<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .
+
+
+
+

15. RMLTC0006a-JSON

+

Title: "Use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Description: "Tests the use of rml:constant in rml:subjectMap, rml:predicateMap, rml:objectMap and rml:graphMap"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:constant "Bad Student"
+        ];
+      rml:predicateMap [
+          rml:constant ex:description
+        ]
+    ];
+  rml:subjectMap [
+      rml:constant ex:BadStudent;
+      rml:graphMap [
+          rml:constant <http://example.com/graph/student>
+        ]
+    ] .
+
+

Output

+
<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .
+
+
+

16. RMLTC0007a-JSON

+

Title: "Typing resources by relying on rdf:type predicate"

+

Description: "Tests the typing resources by relying on rdf:type predicate"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+
+

17. RMLTC0007b-JSON

+

Title: "Assigning triples to Named Graphs"

+

Description: "Tests the generation of triples to a named graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .
+
+
+
+

18. RMLTC0007c-JSON

+

Title: "One row mapping, using rml:class"

+

Description: "Tests subjectmap with more than one class IRIs, rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class ex:Student, foaf:Person;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

19. RMLTC0007d-JSON

+

Title: "One column mapping, specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with an alternative of having rml:class, i.e., by specifying an rml:predicateObjectMap with predicate rdf:type"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:object ex:Student;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
+
+
+
+

20. RMLTC0007e-JSON

+

Title: "One column mapping, using rml:graphMap and rml:class"

+

Description: "Tests subjectmap with rml:graphMap and rml:class"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:class foaf:Person;
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+
+
+
+

21. RMLTC0007f-JSON

+

Title: "One column mapping, using rml:graphMap and specifying an rml:predicateObjectMap with rdf:type"

+

Description: "Tests subjectmap with rml:graphMap and specifying an rml:predicateObjectMap with predicate rdf:type"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph ex:PersonGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
+<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
+
+
+
+

22. RMLTC0007g-JSON

+

Title: "Assigning triples to the default graph"

+

Description: "Tests the generation of triples to the default graph"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graph rml:defaultGraph;
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
+
+
+
+

23. RMLTC0007h-JSON

+

Title: "Assigning triples to a non-IRI named graph"

+

Description: "Tests the generation of triples to a non-IRI named graph, which is an error"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "FirstName":"Venus",
+    "LastName":"Williams"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:reference "$.ID";
+          rml:termType rml:Literal
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.FirstName}"
+    ] .
+
+
+

24. RMLTC0008a-JSON

+

Title: "Generation of triples to a target graph by using rml:graphMap and rml:template"

+

Description: "Test that results of the mapping can be directed to a target graph by using rml:graphMap and rml:template"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.Sport"
+        ];
+      rml:predicate ex:Sport
+    ];
+  rml:subjectMap [
+      rml:graphMap [
+          rml:template "http://example.com/graph/Student/{$.ID}/{$.Name}"
+        ];
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 
+
+
+
+

25. RMLTC0008b-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map without join"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:Sport
+    ], [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ], [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:parentTriplesMap <http://example.com/base/TriplesMap2> .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object activity:Sport;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Sport}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
+<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
+<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .
+
+
+
+
+

26. RMLTC0008c-JSON

+

Title: "Generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Description: "Tests the generation of triples by using multiple predicateMaps within a rml:predicateObjectMap"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name, foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .
+
+
+
+

27. RMLTC0009a-JSON

+

Title: "Generation of triples from foreign key relations"

+

Description: "Test foreign key relationships among logical tables"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {
+      "ID": 100,
+      "Name": "Tennis"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .
+
+
+

28. RMLTC0009b-JSON

+

Title: "Generation of triples to multiple graphs"

+

Description: "Test that results from distinct parts of the mapping can be directed to different target graphs."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students" : [
+    { 
+      "ID": 10,
+      "Sport": 100,
+      "Name": "Venus Williams"
+    },
+    { 
+      "ID": 20,
+      "Name": "Demi Moore"
+    }
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {
+      "ID": 100,
+      "Name": "Tennis"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:graph <http://example.com/graph/students>;
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:graph <http://example.com/graph/practise>;
+      rml:objectMap [ a rml:RefObjectMap;
+          rml:joinCondition [
+              rml:child "$.Sport";
+              rml:parent "$.ID"
+            ];
+          rml:parentTriplesMap <http://example.com/base/TriplesMap2>
+        ];
+      rml:predicate <http://example.com/ontology/practises>
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Student>;
+      rml:graph <http://example.com/graph/students>;
+      rml:template "http://example.com/resource/student_{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:class <http://example.com/ontology/Sport>;
+      rml:graph <http://example.com/graph/sports>;
+      rml:template "http://example.com/resource/sport_{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
+<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
+<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
+<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
+<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .
+
+
+

29. RMLTC0010a-JSON

+

Title: "Template with table column with blank space"

+

Description: "Tests a template with blank space in column value"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2> <http://example.com/name> "Ireland" .
+<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

30. RMLTC0010b-JSON

+

Title: "Template with table columns with special chars"

+

Description: "Tests a template with special chars in column value"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:name
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
+<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .
+
+
+
+

31. RMLTC0010c-JSON

+

Title: "Template with table columns with special chars and backslashes"

+

Description: "Tests a template with special chars in reference value and backslash escapes in string templates"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [{
+    "Country Code": 1,
+    "Name":"Bolivia, Plurinational State of",
+    "ISO 3166": "BO"
+  }, {
+    "Country Code": 2,
+    "Name":"Ireland",
+    "ISO 3166": "IE"
+  }, {
+    "Country Code": 3,
+    "Name":"Saint Martin (French part)",
+    "ISO 3166": "MF"
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_info.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:predicate ex:code;
+      rml:objectMap [
+          rml:template "\\{\\{\\{ {$.['ISO 3166']} \\}\\}\\}";
+          rml:termType rml:Literal
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.['Country Code']}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
+<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
+<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .
+
+
+
+

32. RMLTC0011b-JSON

+

Title: "M to M relation, by using an additional Triples Map"

+

Description: "Tests, M to M relations, by using an additional Triples Map"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"ID":10, "FirstName":"Venus", "LastName":"Williams"},
+    {"ID":11, "FirstName":"Fernando", "LastName":"Alonso"},
+    {"ID":12, "FirstName":"David", "LastName":"Villa"}
+  ]
+}
+
+

Input 1

+
{
+  "sports": [
+    {"ID":110, "Description":"Tennis"},
+    {"ID":111, "Description":"Football"},
+    {"ID":112, "Description":"Formula1"}
+  ]
+}
+
+

Input 2

+
{
+  "links": [
+    {"ID_Student":10, "ID_Sport":110},
+    {"ID_Student":11, "ID_Sport":111},
+    {"ID_Student":11, "ID_Sport":112},
+    {"ID_Student":12, "ID_Sport":111}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/LinkMap_1_2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.links[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student_sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "http://example.com/sport/{$.ID_Sport}"
+        ];
+      rml:predicate ex:plays
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID_Student}"
+    ] .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate ex:firstName
+    ], [
+      rml:objectMap [
+          rml:reference "$.LastName"
+        ];
+      rml:predicate ex:lastName
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/student/{$.ID}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.sports[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "sport.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Description"
+        ];
+      rml:predicate ex:description
+    ], [
+      rml:objectMap [
+          rml:reference "$.ID"
+        ];
+      rml:predicate ex:id
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/sport/{$.ID}"
+    ] .
+
+

Output

+
<http://example.com/student/10> <http://example.com/lastName> "Williams" .
+<http://example.com/student/10> <http://example.com/firstName> "Venus" .
+<http://example.com/student/12> <http://example.com/lastName> "Villa" .
+<http://example.com/student/12> <http://example.com/firstName> "David" .
+<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
+<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
+<http://example.com/sport/110> <http://example.com/description> "Tennis" .
+<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/111> <http://example.com/description> "Football" .
+<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/sport/112> <http://example.com/description> "Formula1" .
+<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
+<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
+<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .
+
+
+
+

33. RMLTC0012a-JSON

+

Title: "Blank node referencing multiple columns"

+

Description: "Tests that blank nodes can be generated by referencing multiple columns"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}{$.amount}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

34. RMLTC0012b-JSON

+

Title: "Duplicate tuples generate same blank node"

+

Description: "Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "lives": [
+    {"fname":"Bob","lname":"Smith","city":"London"},
+    {"fname":"Sue","lname":"Jones","city":"Madrid"},
+    {"fname":"Bob","lname":"Smith","city":"London"}
+  ]
+}
+
+

Input 1

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.lives[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "lives.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.city"
+        ];
+      rml:predicate ex:city
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+

Output

+
_:BobSmith <http://example.com/city> "London" .
+_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
+_:SueJones <http://example.com/city> "Madrid" .
+_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
+
+
+
+

35. RMLTC0012c-JSON

+

Title: "TriplesMap without subjectMap"

+

Description: "Tests a RML with missing information, TriplesMap without subjectMap."

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ] .
+
+
+

36. RMLTC0012d-JSON

+

Title: "TriplesMap with two subjectMap"

+

Description: "Tests a RML with wrong information, TriplesMap with two subjectMap."

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20},
+    {"fname":"Bob","lname":"Smith","amount":30}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:template "{$.fname} {$.lname}";
+          rml:termType rml:Literal
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}_{$.lname}_{$.amount}";
+      rml:termType rml:BlankNode
+    ], [
+      rml:template "{$.amount}_{$.fname}_{$.lname}";
+      rml:termType rml:BlankNode
+    ] .
+
+
+

37. RMLTC0013a-JSON

+

Title: "Null value in JSON file"

+

Description: "Tests if null values in JSON files are handled correctly."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"ID":"1","Name":"Alice","DateOfBirth":null},
+    {"ID":"2","Name":"Bob","DateOfBirth":"September, 2010"}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.DateOfBirth"
+        ];
+      rml:predicate ex:BirthDay
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.ID}/{$.Name}/{$.DateOfBirth}"
+    ] .
+
+

Output

+
<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .
+
+
+

38. RMLTC0015a-JSON

+

Title: "Generation of language tags from a table with language information"

+

Description: "Generation of language tags from a table with language information"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"},
+    {"Code": "IE", "Name": "Irlanda"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "en";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_es.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "es";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+

Output

+
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
+<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
+<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .
+
+
+
+
+

39. RMLTC0015b-JSON

+

Title: "Generation of language tags from a table with language information, and a term map with invalid rml:language value"

+

Description: "Tests a term map with an invalid rml:language value, which is an error"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "countries": [
+    {"Code": "BO", "Name": "Estado Plurinacional de Bolivia"},
+    {"Code": "IE", "Name": "Irlanda"}
+  ]
+}
+
+

Mapping

+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-english";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.countries[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "country_en.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:language "a-spanish";
+          rml:reference "$.Name"
+        ];
+      rml:predicate rdfs:label
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Code}"
+    ] .
+
+
+

40. RMLTC0019a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {
+      "ID": 10,
+      "FirstName": "http://example.com/ns#Jhon",
+      "LastName": "Smith"
+    },
+    {
+      "ID": 20,
+      "FirstName": "Carlos",
+      "LastName": "Mendoza"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+

Output

+
<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
+<http://example.com/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .
+
+
+

41. RMLTC0019b-JSON

+

Title: "Generation of triples by using IRI value in columns, with data error"

+

Description: "Test the generation of triples by using IRI value in attributes, conforming RML mapping with data error (and limited results)"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {
+      "ID": 30,
+      "FirstName": "Juan Daniel",
+      "LastName": "Crespo"
+    }
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.FirstName"
+        ];
+      rml:predicate foaf:name
+    ];
+  rml:subjectMap [
+      rml:reference "$.FirstName"
+    ] .
+
+
+

42. RMLTC0020a-JSON

+

Title: "Generation of triples by using IRI value in columns"

+

Description: "Test the generation of triples by using IRI value in attributes"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "http://example.com/company/Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "path/../Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "{$.Name}";
+      rml:termType rml:IRI
+    ] .
+
+

Output

+
<http://example.com/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

43. RMLTC0021a-JSON

+

Title: "Generation of triples referencing object map"

+

Description: "Tests the mapping specification referencing object map with same logical source and join condition"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 20,
+    "Name":"Serena Williams",
+    "Sport": "Tennis"
+  }, {
+    "ID": 30,
+    "Name":"Loena Hendrickx",
+    "Sport": "Figure skating"
+  }]
+}
+
+

Mapping

+
@prefix activity: <http://example.com/activity/> .
+@prefix ex: <http://example.com/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/RefObjectMap1> a rml:RefObjectMap;
+  rml:joinCondition [
+      rml:child "$.Sport";
+      rml:parent "$.Sport"
+    ];
+  rml:parentTriplesMap <http://example.com/base/TriplesMap1> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap <http://example.com/base/RefObjectMap1>;
+      rml:predicate ex:sameSportAs
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.ID}/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/20/Serena%20Williams> . 
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> <http://example.com/Student/10/Venus%20Williams> . 
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> <http://example.com/Student/30/Loena%20Hendrickx> . 
+
+
+
+
+

44. RMLTC0022a-JSON

+

Title: "Generating of triples with constant datatype"

+

Description: "Test triples with a fixed constant datatype"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus",
+    "Age": 21
+  }]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatype xsd:string;
+          rml:reference "$.Name"
+        ];
+      rml:predicate foaf:name
+    ], [
+      rml:objectMap [
+          rml:datatype xsd:int;
+          rml:reference "$.Age"
+        ];
+      rml:predicate ex:age
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.Name}"
+    ] .
+
+

Output

+
<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/Venus> <http://example.com/age> "21"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

45. RMLTC0022b-JSON

+

Title: "Generating of triples with datatypeMap"

+

Description: "Test triples with a XSD datatype generated from the data"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[
+    { "FOO": 1, "BAR": "string"},
+    { "FOO": 2, "BAR": "int"}
+]
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "http://www.w3.org/2001/XMLSchema#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://www.w3.org/2001/XMLSchema#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://www.w3.org/2001/XMLSchema#int> .
+
+
+

46. RMLTC0022c-JSON

+

Title: "Generating of triples with datatypeMap with custom datatype"

+

Description: "Test triples with a custom datype from the data"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[
+    { "FOO": 1, "BAR": "string"},
+    { "FOO": 2, "BAR": "int"}
+]
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "data.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:datatypeMap [
+              rml:template "datatype#{$.BAR}"
+            ];
+          rml:reference "$.FOO"
+        ];
+      rml:predicate ex:x
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.FOO}"
+    ] .
+
+

Output

+
<http://example.com/1> <http://example.com/x> "1"^^<http://example.com/datatype#string> .
+<http://example.com/2> <http://example.com/x> "2"^^<http://example.com/datatype#int> .
+
+
+

47. RMLTC0023a-JSON

+

Title: "Invalid IRI template 1"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{{Name}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

48. RMLTC0023b-JSON

+

Title: "Invalid IRI template 2"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

49. RMLTC0023c-JSON

+

Title: "Invalid IRI template 3"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "Name":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{Name\}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

50. RMLTC0023d-JSON

+

Title: "Invalid IRI template 4"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\\\{Name\\\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+
+

51. RMLTC0023e-JSON

+

Title: "Invalid IRI template 5"

+

Description: "Test handling of invalid IRI template"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "N\ame":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:referenceFormulation rml:JSONPath;
+      rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{N\\\ame}";
+      rml:class foaf:Person;
+    ] .
+
+
+

52. RMLTC0023f-JSON

+

Title: "Valid IRI template with backslash-escape"

+

Description: "Test handling of a valid IRI template using backslash-escape"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [{
+    "ID": 10,
+    "{Name}":"Venus"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+     rml:referenceFormulation rml:JSONPath;
+     rml:iterator "$.students[*]";
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{\\{Name\\}}";
+      rml:class foaf:Person;
+    ] .
+
+
+

Output

+
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

53. RMLTC0024a-JSON

+

Title: "Usage of constant term maps in combination with explicitly defined term types"

+

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "students": [{
+    "Name":"Venus"
+  },
+  {
+    "Name":"Julio"
+  }]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example.com/>.
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.Name"
+        ];
+      rml:predicate ex:student
+    ];
+  rml:subjectMap [
+      rml:constant "School";
+      rml:termType rml:BlankNode
+  ] .
+
+
+

54. RMLTC0025a-JSON

+

Title: "Generation of triples from arrays"

+

Description: "Tests the generation of triples from array input data structures"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts[*]"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Student/Bob/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

55. RMLTC0025b-JSON

+

Title: "Generation of triples from arrays with wrong reference"

+

Description: "Tests the generation of triples from array input data structures. Test should fail as reference points to the array and not the values of the array"

+

Default Base IRI: http://example.com/

+

Error expected? Yes

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.fname}/{$.lname}"
+    ] .
+
+
+

56. RMLTC0025c-JSON

+

Title: "Generation of triples from arrays in subject and object"

+

Description: "Tests the generation of triples from array input data structures in subject and object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"names":["Bob", "Smith"],"amounts":[30, 40, 50]}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amounts[*]"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Student/{$.names[*]}"
+    ] .
+
+

Output

+
<http://example.com/Student/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Smith> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Smith> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "40"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Student/Bob> <http://example.com/amount> "50"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

57. RMLTC0026a-JSON

+

Title: "Two triples maps, one with rml:baseIRI and one without and generating absolute IRIs"

+

Description: "Tests the generation of triples from relative IRIs using base IRI"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

58. RMLTC0026b-JSON

+

Title: "Two triples maps, one with rml:baseIRI one one without and generating relative IRIs using baseIRI parameter"

+

Description: "Tests the generation of triples from relative IRI using base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://tp1.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://tp1.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://tp1.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

59. RMLTC0026c-JSON

+

Title: "Two triples maps, both with rml:baseIRI defined"

+

Description: "Tests the generation of triples using relative IRIs with base IRIs defined only in triples maps, without base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:baseIRI <http://example.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://example.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

60. RMLTC0026d-JSON

+

Title: "Two triples maps,both with rml:bseIRI defined and baseIRI parameter defined"

+

Description: "Tests the generation of triples by with base IRIs different than the base IRI parameter"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "persons": [
+    {"fname":"Bob","lname":"Smith","amount":30},
+    {"fname":"Sue","lname":"Jones","amount":20}
+  ]
+}
+
+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:baseIRI <http://example2.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.fname}"
+    ] .
+
+<http://example.com/base/TriplesMap2> a rml:TriplesMap;
+  rml:baseIRI <http://example2.com/>;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.persons[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "persons.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:objectMap [
+          rml:reference "$.amount"
+        ];
+      rml:predicate ex:amount
+    ];
+  rml:subjectMap [
+      rml:template "{$.lname}"
+    ] .
+
+

Output

+
<http://example2.com/Bob> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Jones> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Smith> <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example2.com/Sue> <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

61. RMLTC0027a-JSON

+

Title: "Generation of triples using the URI term type"

+

Description: "Tests the generation of triples with a URI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:URI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

62. RMLTC0027b-JSON

+

Title: "Generation of triples using the UnsafeURI term type"

+

Description: "Tests the generation of triples with a UnsafeURI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:UnsafeURI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

63. RMLTC0027c-JSON

+

Title: "Generation of triples using the UnsafeIRI term type"

+

Description: "Tests the generation of triples with a UnsafeIRI term type in the subject or object"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
{
+  "students": [
+    {"Name": "Alice"},
+    {"Name": "Bob"},
+    {"Name": "Bob/Charles"},
+    {"Name": "Danny"},
+    {"Name": "Emily Smith"}
+  ]
+}
+
+

Mapping

+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+  rml:logicalSource [ a rml:LogicalSource;
+      rml:iterator "$.students[*]";
+      rml:referenceFormulation rml:JSONPath;
+      rml:source [ a rml:RelativePathSource;
+          rml:root rml:MappingDirectory;
+          rml:path "student.json"
+        ]
+    ];
+  rml:predicateObjectMap [
+      rml:object foaf:Person;
+      rml:predicate rdf:type
+    ];
+  rml:subjectMap [
+      rml:template "http://example.com/Person/{$.Name}";
+      rml:termType rml:UnsafeIRI
+    ] .
+
+

Output

+
<http://example.com/Person/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+<http://example.com/Person/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
+
+
+

64. RMLTC0028a-JSON

+

Title: "Generation of the right datatype for a constant in the mapping"

+

Description: "Test the honoring of the datatype specified by the constant term in the mapping"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "foo": "bar"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+    rml:logicalSource [
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+    ];
+    rml:predicateObjectMap [
+      rml:predicate <http://example.org/ns/p> ;
+      rml:object true ; # datatype is boolean
+    ] .
+
+

Output

+
<https://example.org/instances/0> <http://example.org/ns/p> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
+
+
+

65. RMLTC0028b-JSON

+

Title: "Generation of all named graphs when rml:defaultGraph is involved"

+

Description: "Test if the default graph is also generated correctly."

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "name": "Alice"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix s: <http://schema.org/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+    rml:logicalSource [
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+      rml:class s:Person ;
+      rml:graph <graph:1> ;
+    ];
+    rml:predicateObjectMap [
+      rml:predicate s:givenName ;
+      rml:objectMap [ rml:reference "name" ] ;
+      rml:graph rml:defaultGraph ;
+    ].
+
+

Output

+
<https://example.org/instances/0> <http://schema.org/givenName> "Alice".
+<https://example.org/instances/0> <http://schema.org/givenName> "Alice" <graph:1> .
+<https://example.org/instances/0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> <graph:1> .
+
+
+

66. RMLTC0028c-JSON

+

Title: "Generation of the right language tag for a constant in the mapping"

+

Description: "Test the honoring of the language tag specified by the constant term in the mapping"

+

Default Base IRI: http://example.com/

+

Error expected? No

+

Input

+
[ { "id": "0", "foo": "bar"  } ] 
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap;
+    rml:logicalSource [
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]";
+      rml:source [ a rml:RelativePathSource;
+        rml:root rml:MappingDirectory;
+        rml:path "data.json"
+      ]
+    ];
+    rml:subjectMap [
+      rml:template "https://example.org/instances/{id}";
+    ];
+    rml:predicateObjectMap [
+      rml:predicate <http://example.org/ns/p> ;
+      rml:object "train"@en ;
+    ] .
+
+

Output

+
<https://example.org/instances/0> <http://example.org/ns/p> "train"@en .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-core/docs/index.html b/src/test/resources/rml-core/docs/index.html index 7039cea4..782b75e6 100644 --- a/src/test/resources/rml-core/docs/index.html +++ b/src/test/resources/rml-core/docs/index.html @@ -244,8 +244,8 @@ "copyrightStart": "2024", "doJsonLd": true, "group": "kg-construct", - "publishISODate": "2025-09-15T00:00:00.000Z", - "generatedSubtitle": "Draft Community Group Report 15 September 2025" + "publishISODate": "2025-09-30T00:00:00.000Z", + "generatedSubtitle": "Draft Community Group Report 30 September 2025" } @@ -254,7 +254,7 @@

RML-Core: Test Cases

Draft Community Group Report - +

@@ -2012,9 +2012,9 @@

RML-Core: Test Cases

] .

Output

-
_:BobSmith30 <http://example.com/amount> "30" .
+
_:BobSmith30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
 _:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
-_:SueJones20 <http://example.com/amount> "20" .
+_:SueJones20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
 _:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .
 
 
@@ -2884,19 +2884,6 @@

RML-Core: Test Cases

<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
 
-
- - - - Error response - - -

Error response

-

Error code: 404

-

Message: File not found.

-

Error code explanation: 404 - Nothing matches the given URI.

- -

53. RMLTC0024a-JSON

Title: "Usage of constant term maps in combination with explicitly defined term types"

Description: "Tests the usage of constant term maps in combination with explicitly defined term types"

From 96d25cac1d418ecb9d65396034e6d812a29eb05f Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Sun, 19 Oct 2025 21:08:09 +0200 Subject: [PATCH 14/28] First series of tests pass. --- src/main/java/burp/ls/CSVSource.java | 13 +- src/main/java/burp/ls/JSONSource.java | 4 +- .../burp/model/AbstractLogicalSource.java | 14 ++ .../burp/model/ConcreteExpressionMap.java | 35 ++--- src/main/java/burp/model/ExpressionField.java | 19 ++- src/main/java/burp/model/Field.java | 4 + .../java/burp/model/FieldExpressionMap.java | 27 ---- src/main/java/burp/model/Iterable.java | 14 ++ src/main/java/burp/model/IterableField.java | 38 ++++++ src/main/java/burp/model/Iteration.java | 3 +- src/main/java/burp/model/LogicalSource.java | 9 +- src/main/java/burp/model/LogicalView.java | 123 ++++++++++++++---- .../java/burp/model/ReferencingObjectMap.java | 4 +- src/main/java/burp/model/TriplesMap.java | 9 +- src/main/java/burp/parse/Parse.java | 6 +- src/main/resources/shapes/rml-core/core.ttl | 56 ++++---- .../shapes/rml-core/expression_map.ttl | 36 ++++- src/test/java/burp/TestLV.java | 24 ++++ 18 files changed, 297 insertions(+), 141 deletions(-) create mode 100644 src/main/java/burp/model/AbstractLogicalSource.java delete mode 100644 src/main/java/burp/model/FieldExpressionMap.java create mode 100644 src/main/java/burp/model/Iterable.java create mode 100644 src/test/java/burp/TestLV.java diff --git a/src/main/java/burp/ls/CSVSource.java b/src/main/java/burp/ls/CSVSource.java index 76f24697..1836022b 100644 --- a/src/main/java/burp/ls/CSVSource.java +++ b/src/main/java/burp/ls/CSVSource.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; import com.opencsv.CSVParserBuilder; import com.opencsv.CSVReader; @@ -81,7 +82,7 @@ public List getValuesFor(String reference) { throw new RuntimeException("Attribute " + reference + " does not exist."); String o = map.get(reference); - if(!nulls.contains(o)) + if(nulls == null || !nulls.contains(o)) l.add(o); return l; @@ -89,15 +90,7 @@ public List getValuesFor(String reference) { @Override public List getStringsFor(String reference) { - List l = new ArrayList<>(); - if(!map.containsKey(reference)) - throw new RuntimeException("Attribute " + reference + " does not exist."); - - String o = map.get(reference); - if(!nulls.contains(o)) - l.add(o); - - return l; + return getValuesFor(reference).stream().map(Object::toString).collect(Collectors.toList()); } } \ No newline at end of file diff --git a/src/main/java/burp/ls/JSONSource.java b/src/main/java/burp/ls/JSONSource.java index 31c24323..67bee887 100644 --- a/src/main/java/burp/ls/JSONSource.java +++ b/src/main/java/burp/ls/JSONSource.java @@ -73,7 +73,7 @@ public List getValuesFor(String reference) { for(Object o : l) { if (o instanceof List) throw new RuntimeException("Data error: reference retrieved an array"); - if (o != null && !nulls.contains(o)) + if (o != null && (nulls == null || !nulls.contains(o))) l2.add(o); } } catch (PathNotFoundException e) { @@ -91,7 +91,7 @@ public List getStringsFor(String reference) { for(Object o : l) { if (o instanceof List) throw new RuntimeException("Data error: reference retrieved an array"); - if (o != null && !nulls.contains(o)) + if (o != null && (nulls == null || !nulls.contains(o))) l2.add(o.toString()); } } catch (PathNotFoundException e) { diff --git a/src/main/java/burp/model/AbstractLogicalSource.java b/src/main/java/burp/model/AbstractLogicalSource.java new file mode 100644 index 00000000..7abf3ec4 --- /dev/null +++ b/src/main/java/burp/model/AbstractLogicalSource.java @@ -0,0 +1,14 @@ +package burp.model; + +import org.apache.jena.rdf.model.Resource; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +public abstract class AbstractLogicalSource extends Iterable { + + public Set nulls = new HashSet<>(); + public abstract Iterator iterator(); + +} \ No newline at end of file diff --git a/src/main/java/burp/model/ConcreteExpressionMap.java b/src/main/java/burp/model/ConcreteExpressionMap.java index f06d084a..aa524326 100644 --- a/src/main/java/burp/model/ConcreteExpressionMap.java +++ b/src/main/java/burp/model/ConcreteExpressionMap.java @@ -1,39 +1,32 @@ package burp.model; import java.util.ArrayList; +import java.util.Collections; import java.util.List; /** * * A ConcreteExpressionMap is a concrete implementation of the abstract class - * ExpressionMap for use in join conditions + * ExpressionMap for use in join conditions and logical views * */ public class ConcreteExpressionMap extends ExpressionMap { - public List generateValues(Iteration i) { - List l = new ArrayList<>(); - - if(expression instanceof RDFNodeConstant) { - // It is assumed to be a string, otherwise the shapes - // Would have caught the error. - l.add(((RDFNodeConstant) expression).constant.toString()); - return l; - } + public List generateValues(Iteration i) { + + if(expression instanceof RDFNodeConstant) + return Collections.singletonList(((RDFNodeConstant) expression).constant); - if(expression instanceof Template) { - l.addAll(((Template) expression).values(i)); - return l; - } + if(expression instanceof Template) + return new ArrayList<>(((Template) expression).values(i)); - if(expression instanceof Reference) { - List values = ((Reference) expression).values(i); - for(Object o : values) - l.add(o.toString()); - return l; - } + if(expression instanceof Reference) + return ((Reference) expression).values(i); + + if(expression instanceof FunctionExecution) + return ((FunctionExecution) expression).values(i, null); - throw new RuntimeException("Error generating language string."); + throw new RuntimeException("Error generating values."); } } \ No newline at end of file diff --git a/src/main/java/burp/model/ExpressionField.java b/src/main/java/burp/model/ExpressionField.java index 96a58eec..54c973c2 100644 --- a/src/main/java/burp/model/ExpressionField.java +++ b/src/main/java/burp/model/ExpressionField.java @@ -1,7 +1,24 @@ package burp.model; +import java.util.ArrayList; +import java.util.List; + public class ExpressionField extends Field { - public FieldExpressionMap fieldExpressionMap; + public ConcreteExpressionMap fieldExpressionMap; + + public List enRich(String parentIteration, LogicalIteration underlying){ + List result = new ArrayList<>(); + + int i = 0; + for(Object o : fieldExpressionMap.generateValues(underlying.getIteration(parentIteration))){ + LogicalIteration e = underlying.copy(); + e.put(getPrefix(parentIteration) + this.fieldName + ".#", i++); + e.put(getPrefix(parentIteration) + this.fieldName, o); + + result.add(e); + } + return result; + } } diff --git a/src/main/java/burp/model/Field.java b/src/main/java/burp/model/Field.java index 5a000052..25cb9e0b 100644 --- a/src/main/java/burp/model/Field.java +++ b/src/main/java/burp/model/Field.java @@ -4,5 +4,9 @@ public abstract class Field { public String fieldName ; + protected String getPrefix(String parent) { + return "".equals(parent) ? "" : parent + "."; + } + } diff --git a/src/main/java/burp/model/FieldExpressionMap.java b/src/main/java/burp/model/FieldExpressionMap.java deleted file mode 100644 index cfefdfd6..00000000 --- a/src/main/java/burp/model/FieldExpressionMap.java +++ /dev/null @@ -1,27 +0,0 @@ -package burp.model; - -import java.util.ArrayList; -import java.util.List; - -public class FieldExpressionMap extends ExpressionMap { - - public List generateStrings(Iteration i) { - List set = new ArrayList<>(); - - if(expression instanceof RDFNodeConstant) { - // It is assumed to be a string, otherwise the shapes - // Would have caught the error. - set.add(((RDFNodeConstant) expression).constant.toString()); - } - else if(expression instanceof Template) { - set.addAll(((Template) expression).values(i)); - } - else if(expression instanceof Reference) { - for(Object o : ((Reference) expression).values(i)) - set.add(o.toString()); - } - - return set; - } - -} \ No newline at end of file diff --git a/src/main/java/burp/model/Iterable.java b/src/main/java/burp/model/Iterable.java new file mode 100644 index 00000000..3503f3d0 --- /dev/null +++ b/src/main/java/burp/model/Iterable.java @@ -0,0 +1,14 @@ +package burp.model; + +import org.apache.jena.rdf.model.Resource; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +public abstract class Iterable { + + public String iterator; + public Resource referenceFormulation; + +} \ No newline at end of file diff --git a/src/main/java/burp/model/IterableField.java b/src/main/java/burp/model/IterableField.java index 7bda0a34..76fbf740 100644 --- a/src/main/java/burp/model/IterableField.java +++ b/src/main/java/burp/model/IterableField.java @@ -2,11 +2,49 @@ import org.apache.jena.rdf.model.Resource; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + public class IterableField extends Field { public String iterator; public Resource referenceFormulation; + public List expressionFields = new ArrayList<>(); + public List iterableFields = new ArrayList<>(); + + public List enrich(Iterator iterations, Resource referenceFormulation, String iterator, Set nulls) { + // Inherit if null + if (this.iterator == null) this.iterator = iterator; + if (this.referenceFormulation == null) this.referenceFormulation = referenceFormulation; + + List list = new ArrayList<>(); + + int index = 0; + while(iterations.hasNext()) { + Iteration i = iterations.next(); + LogicalIteration li = new LogicalIteration(nulls); + li.put(fieldName + ".#", index++); + li.put(fieldName, i); + + list.add(li); + } + + List eslist = new ArrayList<>(); + for(LogicalIteration li : list) { + for(ExpressionField es : expressionFields) { + eslist.addAll(es.enRich(fieldName, li)); + } + } + list = eslist; + + + return list; + } + // TODO } \ No newline at end of file diff --git a/src/main/java/burp/model/Iteration.java b/src/main/java/burp/model/Iteration.java index fb2023b5..f7ab8321 100644 --- a/src/main/java/burp/model/Iteration.java +++ b/src/main/java/burp/model/Iteration.java @@ -1,11 +1,12 @@ package burp.model; +import java.util.HashSet; import java.util.List; import java.util.Set; public abstract class Iteration { - public Set nulls = null; + public Set nulls = new HashSet<>(); public Iteration(Set nulls) { this.nulls = nulls; diff --git a/src/main/java/burp/model/LogicalSource.java b/src/main/java/burp/model/LogicalSource.java index 80307a65..2398e463 100644 --- a/src/main/java/burp/model/LogicalSource.java +++ b/src/main/java/burp/model/LogicalSource.java @@ -6,13 +6,6 @@ import java.util.Iterator; import java.util.Set; -public abstract class LogicalSource { - - public String iterator; - public Resource referenceFormulation; - - public Set nulls = new HashSet<>(); - - public abstract Iterator iterator(); +public abstract class LogicalSource extends AbstractLogicalSource { } \ No newline at end of file diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index 8760bbf7..dd63db29 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -1,53 +1,88 @@ package burp.model; -import java.io.FileReader; import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; -public class LogicalView extends LogicalSource { +public class LogicalView extends AbstractLogicalSource { + + private List iterations = null; - protected List iterations = null; public LogicalSource logicalSource; - public List fields = new ArrayList<>(); + public List expressionFields = new ArrayList<>(); + public List iterableFields = new ArrayList<>(); @Override public Iterator iterator() { try { if (iterations == null) { -// iterations = new ArrayList<>(); -// -// List> l = new ArrayList<>(); -// int i = 0; -// logicalSource.iterator().forEachRemaining(x-> { -// Map m = new HashMap<>(); -// m.put("#", i++); -// m.put("", x); -// }); - - // TODO + iterations = new ArrayList<>(); + + // The logical view acts like the root + IterableField root = new IterableField(); + root.referenceFormulation = logicalSource.referenceFormulation; + root.iterator = logicalSource.iterator; + root.expressionFields.addAll(expressionFields); + root.iterableFields.addAll(iterableFields); + root.fieldName = ""; + iterations = root.enrich(logicalSource.iterator(), logicalSource.referenceFormulation, logicalSource.iterator, logicalSource.nulls); + + iterations.iterator(); } - return iterations.iterator(); + + // Create wrapper to safely treat LogicalIterations as Iterations... + return new Iterator<>() { + private final Iterator inner = iterations.iterator(); + + @Override + public boolean hasNext() { + return inner.hasNext(); + } + + @Override + public Iteration next() { + return inner.next(); + } + }; + } catch (Throwable e) { throw new RuntimeException(e); } } + + public void addField(Field field) { + System.out.println(field); + if (field instanceof IterableField) { + iterableFields.add((IterableField) field); + } else if (field instanceof ExpressionField) { + expressionFields.add((ExpressionField) field); + } + else + throw new RuntimeException("Unknown field type."); + } } class LogicalIteration extends Iteration { - public final Map map = new HashMap<>(); + public Map map = new HashMap<>(); public LogicalIteration(Set nulls) { super(nulls); } + public LogicalIteration(Map map, Set nulls) { + super(nulls); + this.map = map; + } + @Override public List getValuesFor(String reference) { List l = new ArrayList<>(); if(!map.containsKey(reference)) throw new RuntimeException("Attribute " + reference + " does not exist."); - String o = map.get(reference); - if(!nulls.contains(o)) + Object o = map.get(reference); + if(nulls == null || !nulls.contains(o)) l.add(o); return l; @@ -55,15 +90,51 @@ public List getValuesFor(String reference) { @Override public List getStringsFor(String reference) { - List l = new ArrayList<>(); - if(!map.containsKey(reference)) - throw new RuntimeException("Attribute " + reference + " does not exist."); + return getValuesFor(reference).stream().map(Object::toString).collect(Collectors.toList()); + } - String o = map.get(reference); - if(!nulls.contains(o)) - l.add(o); + public String toString() { + Map widths = new LinkedHashMap<>(); + for (var e : map.entrySet()) { + int width = Math.max(e.getKey().length(), String.valueOf(e.getValue()).length()); + widths.put(e.getKey(), width); + } - return l; + StringBuilder sb = new StringBuilder(); + + // Build horizontal line + String line = "+" + widths.values().stream() + .map(w -> "-".repeat(w + 2)) + .reduce("", (a, b) -> a + "+" + b) + .substring(1) + "+"; + + // Header row (keys) + sb.append(line).append("\n"); + sb.append("|"); + for (var e : map.entrySet()) { + sb.append(" ").append(String.format("%-" + widths.get(e.getKey()) + "s", e.getKey())).append(" |"); + } + sb.append("\n").append(line).append("\n"); + + // Value row + sb.append("|"); + for (var e : map.entrySet()) { + sb.append(" ").append(String.format("%-" + widths.get(e.getKey()) + "s", e.getValue())).append(" |"); + } + sb.append("\n").append(line); + + return sb.toString(); + } + + public LogicalIteration copy() { + return new LogicalIteration(map,null); } + public void put(String key, Object o) { + map.put(key, o); + } + + public Iteration getIteration(String fieldName) { + return (Iteration) map.get(fieldName); + } } \ No newline at end of file diff --git a/src/main/java/burp/model/ReferencingObjectMap.java b/src/main/java/burp/model/ReferencingObjectMap.java index 566cfca3..2ea1833c 100644 --- a/src/main/java/burp/model/ReferencingObjectMap.java +++ b/src/main/java/burp/model/ReferencingObjectMap.java @@ -57,8 +57,8 @@ public List generateTerms(Iteration i, String baseIRI) { boolean ok = true; for (JoinCondition jc : joinConditions) { - List values1 = jc.childMap.generateValues(i); - List values2 = jc.parentMap.generateValues(i2); + List values1 = jc.childMap.generateValues(i); + List values2 = jc.parentMap.generateValues(i2); if (values1.stream().distinct().filter(values2::contains) .collect(Collectors.toSet()).isEmpty()) { diff --git a/src/main/java/burp/model/TriplesMap.java b/src/main/java/burp/model/TriplesMap.java index 8b1e071d..1ffec0b4 100644 --- a/src/main/java/burp/model/TriplesMap.java +++ b/src/main/java/burp/model/TriplesMap.java @@ -3,18 +3,11 @@ import java.util.ArrayList; import java.util.List; -import org.apache.jena.query.Dataset; - public class TriplesMap { - public LogicalSource logicalSource = null; + public AbstractLogicalSource logicalSource = null; public SubjectMap subjectMap = null; public List predicateObjectMaps = new ArrayList<>(); public String baseIRI = null; - public void generateInto(Dataset ds) { - // TODO Auto-generated method stub - - } - } \ No newline at end of file diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index 5e5992c8..cf8b2306 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -128,7 +128,7 @@ private static void normalizeConstants(Model mapping) { mapping.add(QueryExecutionFactory.create(IMPLICITTERMTYPE, mapping).execConstruct()); } - private static LogicalSource prepareLogicalSource(Resource ls, String mpath) throws Exception { + private static AbstractLogicalSource prepareLogicalSource(Resource ls, String mpath) throws Exception { // This is RML-LV if(ls.hasProperty(RML.viewOn)) { Resource view = ls.getPropertyResourceValue(RML.viewOn); @@ -136,7 +136,7 @@ private static LogicalSource prepareLogicalSource(Resource ls, String mpath) thr lv.logicalSource = LogicalSourceFactory.createJSONSource(view, mpath); ls.listProperties(RML.field).forEach(s -> { - lv.fields.add(prepareField(s.getObject().asResource())); + lv.addField(prepareField(s.getObject().asResource())); }); return lv; @@ -350,7 +350,7 @@ private static Field prepareField(Resource p) { return f; } else { ExpressionField f = new ExpressionField(); - FieldExpressionMap fem = new FieldExpressionMap(); + ConcreteExpressionMap fem = new ConcreteExpressionMap(); fem.expression = prepareExpression(p); f.fieldExpressionMap = fem; f.fieldName = p.getRequiredProperty(RML.fieldName).getObject().asLiteral().getString(); diff --git a/src/main/resources/shapes/rml-core/core.ttl b/src/main/resources/shapes/rml-core/core.ttl index 0bc85999..75df2895 100644 --- a/src/main/resources/shapes/rml-core/core.ttl +++ b/src/main/resources/shapes/rml-core/core.ttl @@ -676,43 +676,31 @@ Represents a Expression Map. """ ; sh:message """ - Expression Map requires one rml:template or one rml:constant or one + Expression Map may require one rml:template or one rml:constant or one rml:reference. """ ; - sh:property [ rdfs:label "template/constant/reference/returnMap/functionExecution" ; + sh:or ( [ sh:not [ sh:property [ sh:minCount 1 ; + sh:path rml:returnMap ] ] ] [ sh:property [ sh:maxCount 1 ; + sh:minCount 1 ; + sh:path rml:returnMap ], + [ sh:maxCount 1 ; + sh:minCount 1 ; + sh:path rml:functionExecution ] ] ) ; + sh:property [ rdfs:label "template/constant/reference/functionExecution" ; rdfs:comment """ - Exactly one rml:template, one rml:constant, one rml:reference, - one rml:returnMap, or one rml:functionExecution is required. + Only one rml:template, one rml:constant, one rml:reference, + or one rml:functionExecution is allowed. rml:returnMap is only allowed if rml:functionExecution is present. """ ; sh:maxCount 1 ; sh:message """ Exactly one rml:template, one rml:constant, one rml:reference, one rml:returnMap, or one rml:functionExecution is required. """ ; - sh:path [ sh:alternativePath ( rml:template rml:constant rml:reference rml:returnMap rml:functionExecution ) ] ; + sh:path [ sh:alternativePath ( rml:template rml:constant rml:reference rml:functionExecution ) ] ; sh:targetSubjectsOf rml:constant, rml:functionExecution, rml:reference, - rml:returnMap, rml:template ], - [ rdfs:label "reference" ; - rdfs:comment """ - A reference rml:reference is used to refer to a column in case of - databases, a record in case of CSV or TSV data source, an element in - case of XML data source, an object in case of a JSON data source, etc. - - A reference must be a valid identifier, considering the reference - formulation (rml:referenceFormulation) specified. The reference can be - an absolute path, or a path relative to the iterator specified at the - logical source. - """ ; - sh:datatype xsd:string ; - sh:message """ - rml:reference must be a string. - """ ; - sh:nodeKind sh:Literal ; - sh:path rml:reference ; - sh:targetSubjectsOf rml:reference ], [ rdfs:label "returnMap" ; rdfs:comment """ A Return Map rml:returnMap is used to define the return values of a FnO @@ -760,7 +748,25 @@ rml:constant must be an IRI or Literal. """ ; sh:path rml:constant ; - sh:targetSubjectsOf rml:constant ] . + sh:targetSubjectsOf rml:constant ], + [ rdfs:label "reference" ; + rdfs:comment """ + A reference rml:reference is used to refer to a column in case of + databases, a record in case of CSV or TSV data source, an element in + case of XML data source, an object in case of a JSON data source, etc. + + A reference must be a valid identifier, considering the reference + formulation (rml:referenceFormulation) specified. The reference can be + an absolute path, or a path relative to the iterator specified at the + logical source. + """ ; + sh:datatype xsd:string ; + sh:message """ + rml:reference must be a string. + """ ; + sh:nodeKind sh:Literal ; + sh:path rml:reference ; + sh:targetSubjectsOf rml:reference ] . a sh:PropertyShape ; rdfs:label "logicalTarget" ; diff --git a/src/main/resources/shapes/rml-core/expression_map.ttl b/src/main/resources/shapes/rml-core/expression_map.ttl index fc10303b..35e23dbe 100644 --- a/src/main/resources/shapes/rml-core/expression_map.ttl +++ b/src/main/resources/shapes/rml-core/expression_map.ttl @@ -16,7 +16,7 @@ Represents a Expression Map. """ ; sh:message """ - Expression Map requires one rml:template or one rml:constant or one + Expression Map may require one rml:template or one rml:constant or one rml:reference. """ ; @@ -26,23 +26,20 @@ sh:targetSubjectsOf rml:template ; sh:targetSubjectsOf rml:constant ; sh:targetSubjectsOf rml:reference ; - sh:targetSubjectsOf rml:returnMap ; sh:targetSubjectsOf rml:functionExecution ; sh:path [sh:alternativePath (rml:template rml:constant rml:reference - rml:returnMap rml:functionExecution)] ; - rdfs:label "template/constant/reference/returnMap/functionExecution" ; + rdfs:label "template/constant/reference/functionExecution" ; rdfs:comment """ - Exactly one rml:template, one rml:constant, one rml:reference, - one rml:returnMap, or one rml:functionExecution is required. + Only one rml:template, one rml:constant, one rml:reference, + or one rml:functionExecution is allowed. rml:returnMap is only allowed if rml:functionExecution is present. """ ; sh:message """ Exactly one rml:template, one rml:constant, one rml:reference, one rml:returnMap, or one rml:functionExecution is required. """ ; - sh:minCount 1 ; sh:maxCount 1 ; ] ; @@ -134,4 +131,29 @@ sh:nodeKind sh:BlankNodeOrIRI ; # Allow BlankNodes so nested structurces works as well for rml:returnMap ] ; + # If returnMap appears, then functionExecution must also appear + sh:or ( + + [ + sh:not [ + sh:property [ + sh:path rml:returnMap ; + sh:minCount 1 + ] + ] + ] + + [ + sh:property [ + sh:path rml:returnMap ; + sh:minCount 1 ; + sh:maxCount 1 + ] ; + sh:property [ + sh:path rml:functionExecution ; + sh:minCount 1 ; + sh:maxCount 1 + ] + ] + ) . diff --git a/src/test/java/burp/TestLV.java b/src/test/java/burp/TestLV.java new file mode 100644 index 00000000..b8e21944 --- /dev/null +++ b/src/test/java/burp/TestLV.java @@ -0,0 +1,24 @@ +package burp; + +import burp.model.TriplesMap; +import burp.parse.Parse; +import burp.util.BURPConfiguration; + +import java.io.File; +import java.nio.file.Files; +import java.util.List; + +public class TestLV { + + public static void main(String[] args) throws Exception { + String m = new File("./src/test/resources/rml-lv/RMLLVTC0000a/", "mapping.ttl").getAbsolutePath(); + String r = Files.createTempFile(null, ".nq").toString(); + args = new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }; + BURPConfiguration conf = new BURPConfiguration(args); + TriplesMap t = Parse.parseMappingFile(conf.mappingFile).get(0); + t.logicalSource.iterator().forEachRemaining(x -> { + System.out.println(x); + }); + } + +} From 8b15307802ae4102d032d97574ca5abfdb580510 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Sun, 19 Oct 2025 21:18:26 +0200 Subject: [PATCH 15/28] 13 of the 19 LV tests pass --- src/main/java/burp/model/LogicalView.java | 3 +-- src/main/java/burp/parse/Parse.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index dd63db29..c450e21a 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -1,14 +1,13 @@ package burp.model; import java.util.*; -import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; public class LogicalView extends AbstractLogicalSource { private List iterations = null; - public LogicalSource logicalSource; + public AbstractLogicalSource logicalSource; public List expressionFields = new ArrayList<>(); public List iterableFields = new ArrayList<>(); diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index cf8b2306..9008138a 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -133,7 +133,7 @@ private static AbstractLogicalSource prepareLogicalSource(Resource ls, String mp if(ls.hasProperty(RML.viewOn)) { Resource view = ls.getPropertyResourceValue(RML.viewOn); LogicalView lv = new LogicalView(); - lv.logicalSource = LogicalSourceFactory.createJSONSource(view, mpath); + lv.logicalSource = prepareLogicalSource(view, mpath); ls.listProperties(RML.field).forEach(s -> { lv.addField(prepareField(s.getObject().asResource())); From c9c26691efe19e814b412f27a286b0b1e4bab333 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Sun, 19 Oct 2025 22:38:11 +0200 Subject: [PATCH 16/28] Prep for nested calls --- src/main/java/burp/ls/CSVSource.java | 7 ++- src/main/java/burp/ls/JSONSource.java | 17 ++++++- src/main/java/burp/ls/RDBSource.java | 7 ++- src/main/java/burp/ls/SPARQLFileSource.java | 14 +++++- src/main/java/burp/ls/XMLSource.java | 6 +++ src/main/java/burp/model/ExpressionField.java | 2 +- src/main/java/burp/model/IterableField.java | 44 ++++++++++++++++--- src/main/java/burp/model/Iteration.java | 1 + src/main/java/burp/model/LogicalView.java | 8 +++- src/main/java/burp/parse/Parse.java | 15 ++++++- src/test/java/burp/TestLV.java | 2 +- 11 files changed, 106 insertions(+), 17 deletions(-) diff --git a/src/main/java/burp/ls/CSVSource.java b/src/main/java/burp/ls/CSVSource.java index 1836022b..09dcf89f 100644 --- a/src/main/java/burp/ls/CSVSource.java +++ b/src/main/java/burp/ls/CSVSource.java @@ -92,5 +92,10 @@ public List getValuesFor(String reference) { public List getStringsFor(String reference) { return getValuesFor(reference).stream().map(Object::toString).collect(Collectors.toList()); } - + + @Override + public List changeIterator(String iterator) { + throw new RuntimeException("We cannot change the iterator of a CSV iteration."); + } + } \ No newline at end of file diff --git a/src/main/java/burp/ls/JSONSource.java b/src/main/java/burp/ls/JSONSource.java index 67bee887..19ae6935 100644 --- a/src/main/java/burp/ls/JSONSource.java +++ b/src/main/java/burp/ls/JSONSource.java @@ -100,5 +100,20 @@ public List getStringsFor(String reference) { } return l2; } - + + @Override + public List changeIterator(String iterator) { + try { + List iterations = new ArrayList<>(); + String contents = doc.jsonString(); + List> nodes = JsonPath.using(c).parse(contents).read(iterator); + for (Map n : nodes) { + iterations.add(new JSONIteration(JSONObject.toJSONString(n), nulls)); + } + return iterations; + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + } \ No newline at end of file diff --git a/src/main/java/burp/ls/RDBSource.java b/src/main/java/burp/ls/RDBSource.java index 9e9c9420..ca85fb46 100644 --- a/src/main/java/burp/ls/RDBSource.java +++ b/src/main/java/burp/ls/RDBSource.java @@ -122,5 +122,10 @@ public List getStringsFor(String reference) { l.add(o.toString()); return l; } - + + @Override + public List changeIterator(String iterator) { + throw new RuntimeException("We cannot change the iterator of an RDB iteration."); + } + } \ No newline at end of file diff --git a/src/main/java/burp/ls/SPARQLFileSource.java b/src/main/java/burp/ls/SPARQLFileSource.java index 748bb162..ed42b281 100644 --- a/src/main/java/burp/ls/SPARQLFileSource.java +++ b/src/main/java/burp/ls/SPARQLFileSource.java @@ -78,7 +78,12 @@ public List getStringsFor(String reference) { l.add(n.toString()); return l; } - + + @Override + public List changeIterator(String iterator) { + throw new RuntimeException("We cannot change the iterator of a SPARQL iteration."); + } + } class SPARQLTSVIteratation extends Iteration { @@ -110,5 +115,10 @@ public List getStringsFor(String reference) { l.add(n.toString()); return l; } - + + @Override + public List changeIterator(String iterator) { + throw new RuntimeException("We cannot change the iterator of an SPARQL TSV iteration."); + } + } \ No newline at end of file diff --git a/src/main/java/burp/ls/XMLSource.java b/src/main/java/burp/ls/XMLSource.java index 162b4e76..a610d658 100644 --- a/src/main/java/burp/ls/XMLSource.java +++ b/src/main/java/burp/ls/XMLSource.java @@ -124,4 +124,10 @@ public List getStringsFor(String reference) { return l2; } + @Override + public List changeIterator(String iterator) { + // TODO: to implement + throw new RuntimeException("Not yet implemented."); + } + } diff --git a/src/main/java/burp/model/ExpressionField.java b/src/main/java/burp/model/ExpressionField.java index 54c973c2..273791dc 100644 --- a/src/main/java/burp/model/ExpressionField.java +++ b/src/main/java/burp/model/ExpressionField.java @@ -7,7 +7,7 @@ public class ExpressionField extends Field { public ConcreteExpressionMap fieldExpressionMap; - public List enRich(String parentIteration, LogicalIteration underlying){ + public List enrich(String parentIteration, LogicalIteration underlying){ List result = new ArrayList<>(); int i = 0; diff --git a/src/main/java/burp/model/IterableField.java b/src/main/java/burp/model/IterableField.java index 76fbf740..b6c1b501 100644 --- a/src/main/java/burp/model/IterableField.java +++ b/src/main/java/burp/model/IterableField.java @@ -16,13 +16,23 @@ public class IterableField extends Field { public List expressionFields = new ArrayList<>(); public List iterableFields = new ArrayList<>(); - public List enrich(Iterator iterations, Resource referenceFormulation, String iterator, Set nulls) { - // Inherit if null - if (this.iterator == null) this.iterator = iterator; - if (this.referenceFormulation == null) this.referenceFormulation = referenceFormulation; + public void addField(Field field) { + if (field instanceof IterableField) { + iterableFields.add((IterableField) field); + } else if (field instanceof ExpressionField) { + expressionFields.add((ExpressionField) field); + } + else + throw new RuntimeException("Unknown field type."); + } + public List enrich(Iterator iterations, Set nulls) { List list = new ArrayList<>(); + // TODO TO REMINDER + // HIER BEGINNEN WE MET DE ROOT + // DE RECURSIEVE CALLM OET ANDERS + int index = 0; while(iterations.hasNext()) { Iteration i = iterations.next(); @@ -33,14 +43,34 @@ public List enrich(Iterator iterations, Resource re list.add(li); } - List eslist = new ArrayList<>(); + // Let's process the expression fields + List nlist = new ArrayList<>(); for(LogicalIteration li : list) { for(ExpressionField es : expressionFields) { - eslist.addAll(es.enRich(fieldName, li)); + nlist.addAll(es.enrich(fieldName, li)); } } - list = eslist; + list = nlist; + // Let's process the iterable fields + nlist = new ArrayList<>(); + for(LogicalIteration li : list) { + for(IterableField iterableField : iterableFields) { + if(iterableField.referenceFormulation == null && iterableField.iterator == null) { + throw new RuntimeException("An Iterable Field has not been set with a new reference formulation or new iterator."); + } + + if(iterableField.referenceFormulation != null) { + // TODO: implement changing of reference formulation (with iterator) + } else { + // The iterator has changed + Iteration i = li.getIteration(fieldName); + List newiterations = i.changeIterator(iterableField.iterator); + nlist.addAll(iterableField.enrich(newiterations.iterator(), nulls)); + } + } + } + list = nlist; return list; } diff --git a/src/main/java/burp/model/Iteration.java b/src/main/java/burp/model/Iteration.java index f7ab8321..48661670 100644 --- a/src/main/java/burp/model/Iteration.java +++ b/src/main/java/burp/model/Iteration.java @@ -16,4 +16,5 @@ public Iteration(Set nulls) { public abstract List getStringsFor(String reference); + public abstract List changeIterator(String iterator); } \ No newline at end of file diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index c450e21a..957a5bf4 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -24,7 +24,7 @@ public Iterator iterator() { root.expressionFields.addAll(expressionFields); root.iterableFields.addAll(iterableFields); root.fieldName = ""; - iterations = root.enrich(logicalSource.iterator(), logicalSource.referenceFormulation, logicalSource.iterator, logicalSource.nulls); + iterations = root.enrich(logicalSource.iterator(), logicalSource.nulls); iterations.iterator(); } @@ -50,7 +50,6 @@ public Iteration next() { } public void addField(Field field) { - System.out.println(field); if (field instanceof IterableField) { iterableFields.add((IterableField) field); } else if (field instanceof ExpressionField) { @@ -92,6 +91,11 @@ public List getStringsFor(String reference) { return getValuesFor(reference).stream().map(Object::toString).collect(Collectors.toList()); } + @Override + public List changeIterator(String iterator) { + throw new RuntimeException("We cannot change the iterator of a logical iteration."); + } + public String toString() { Map widths = new LinkedHashMap<>(); for (var e : map.entrySet()) { diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index 9008138a..f16f6c81 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -345,7 +345,20 @@ private static Field prepareField(Resource p) { if(p.hasProperty(RML.field)) { // Create IterableField IterableField f = new IterableField(); - // TODO + + // Add the subfields + p.listProperties(RML.field).forEach(s -> { + f.addField(prepareField(s.getObject().asResource())); + }); + + if(p.hasProperty(RML.iterator)) { + f.iterator = p.getProperty(RML.iterator).getObject().asLiteral().getString(); + } + + if(p.hasProperty(RML.referenceFormulation)) { + f.referenceFormulation = p.getProperty(RML.referenceFormulation).getObject().asResource(); + } + f.fieldName = p.getRequiredProperty(RML.fieldName).getObject().asLiteral().getString(); return f; } else { diff --git a/src/test/java/burp/TestLV.java b/src/test/java/burp/TestLV.java index b8e21944..19ec8b1e 100644 --- a/src/test/java/burp/TestLV.java +++ b/src/test/java/burp/TestLV.java @@ -11,7 +11,7 @@ public class TestLV { public static void main(String[] args) throws Exception { - String m = new File("./src/test/resources/rml-lv/RMLLVTC0000a/", "mapping.ttl").getAbsolutePath(); + String m = new File("./src/test/resources/rml-lv/RMLLVTC0002a/", "mapping.ttl").getAbsolutePath(); String r = Files.createTempFile(null, ".nq").toString(); args = new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }; BURPConfiguration conf = new BURPConfiguration(args); From f4acc52e9fca5801b7ee17199940c52566e3e970 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Mon, 20 Oct 2025 17:24:09 +0200 Subject: [PATCH 17/28] Temp --- .../burp/model/AbstractLogicalSource.java | 6 +- src/main/java/burp/model/ContainsFields.java | 11 +++ src/main/java/burp/model/ExpressionField.java | 23 ++++-- src/main/java/burp/model/Field.java | 40 +++++++++- src/main/java/burp/model/FieldParent.java | 9 +++ src/main/java/burp/model/IterableField.java | 78 +++++++++---------- src/main/java/burp/model/LogicalView.java | 24 ++++-- 7 files changed, 135 insertions(+), 56 deletions(-) create mode 100644 src/main/java/burp/model/ContainsFields.java create mode 100644 src/main/java/burp/model/FieldParent.java diff --git a/src/main/java/burp/model/AbstractLogicalSource.java b/src/main/java/burp/model/AbstractLogicalSource.java index 7abf3ec4..dec43401 100644 --- a/src/main/java/burp/model/AbstractLogicalSource.java +++ b/src/main/java/burp/model/AbstractLogicalSource.java @@ -2,11 +2,9 @@ import org.apache.jena.rdf.model.Resource; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; +import java.util.*; -public abstract class AbstractLogicalSource extends Iterable { +public abstract class AbstractLogicalSource extends Iterable implements FieldParent { public Set nulls = new HashSet<>(); public abstract Iterator iterator(); diff --git a/src/main/java/burp/model/ContainsFields.java b/src/main/java/burp/model/ContainsFields.java new file mode 100644 index 00000000..4d430319 --- /dev/null +++ b/src/main/java/burp/model/ContainsFields.java @@ -0,0 +1,11 @@ +package burp.model; + +import java.util.List; + +public interface ContainsFields { + + List getIterableFields(); + List getExpressionFields(); + + void addField(Field field); +} diff --git a/src/main/java/burp/model/ExpressionField.java b/src/main/java/burp/model/ExpressionField.java index 273791dc..37b48e1b 100644 --- a/src/main/java/burp/model/ExpressionField.java +++ b/src/main/java/burp/model/ExpressionField.java @@ -1,24 +1,37 @@ package burp.model; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; public class ExpressionField extends Field { public ConcreteExpressionMap fieldExpressionMap; - public List enrich(String parentIteration, LogicalIteration underlying){ + public List enrich(LogicalIteration underlying){ List result = new ArrayList<>(); int i = 0; - for(Object o : fieldExpressionMap.generateValues(underlying.getIteration(parentIteration))){ + for(Object o : fieldExpressionMap.generateValues(underlying.getIteration(getParentIteration()))){ LogicalIteration e = underlying.copy(); - e.put(getPrefix(parentIteration) + this.fieldName + ".#", i++); - e.put(getPrefix(parentIteration) + this.fieldName, o); - + e.put(getAbsoluteFieldName() + ".#", i++); + e.put(getAbsoluteFieldName(), o); result.add(e); } return result; } + + private String getParentIteration() { + if(parent instanceof AbstractLogicalSource) + return ""; + + Field parent = (Field) this.parent; + return parent.fieldName; + } + + @Override + public Iterator iterator() { + return parent.iterator(); + } } diff --git a/src/main/java/burp/model/Field.java b/src/main/java/burp/model/Field.java index 25cb9e0b..c4988aa9 100644 --- a/src/main/java/burp/model/Field.java +++ b/src/main/java/burp/model/Field.java @@ -1,11 +1,45 @@ package burp.model; -public abstract class Field { +import java.util.ArrayList; +import java.util.List; + +public abstract class Field implements ContainsFields, FieldParent { public String fieldName ; + public FieldParent parent; + + public List expressionFields = new ArrayList<>(); + public List iterableFields = new ArrayList<>(); + + protected String getAbsoluteFieldName() { + if (parent instanceof AbstractLogicalSource) + return fieldName; + + Field parent = (Field) this.parent; + return parent.getAbsoluteFieldName() + "." + fieldName; + } + + @Override + public List getIterableFields() { + return iterableFields; + } + + @Override + public List getExpressionFields() { + return expressionFields; + } + + @Override + public void addField(Field field) { + field.parent = this; - protected String getPrefix(String parent) { - return "".equals(parent) ? "" : parent + "."; + if (field instanceof IterableField) { + getIterableFields().add((IterableField) field); + } else if (field instanceof ExpressionField) { + getExpressionFields().add((ExpressionField) field); + } + else + throw new RuntimeException("Unknown field type."); } } diff --git a/src/main/java/burp/model/FieldParent.java b/src/main/java/burp/model/FieldParent.java new file mode 100644 index 00000000..45843f04 --- /dev/null +++ b/src/main/java/burp/model/FieldParent.java @@ -0,0 +1,9 @@ +package burp.model; + +import java.util.Iterator; +import java.util.List; + +public interface FieldParent { + + Iterator iterator(); +} diff --git a/src/main/java/burp/model/IterableField.java b/src/main/java/burp/model/IterableField.java index b6c1b501..6bcc71a8 100644 --- a/src/main/java/burp/model/IterableField.java +++ b/src/main/java/burp/model/IterableField.java @@ -1,5 +1,6 @@ package burp.model; +import org.apache.jena.atlas.iterator.Iter; import org.apache.jena.rdf.model.Resource; import java.util.ArrayList; @@ -13,41 +14,48 @@ public class IterableField extends Field { public String iterator; public Resource referenceFormulation; - public List expressionFields = new ArrayList<>(); - public List iterableFields = new ArrayList<>(); - - public void addField(Field field) { - if (field instanceof IterableField) { - iterableFields.add((IterableField) field); - } else if (field instanceof ExpressionField) { - expressionFields.add((ExpressionField) field); - } - else - throw new RuntimeException("Unknown field type."); - } - - public List enrich(Iterator iterations, Set nulls) { + public List enrich() { List list = new ArrayList<>(); - // TODO TO REMINDER - // HIER BEGINNEN WE MET DE ROOT - // DE RECURSIEVE CALLM OET ANDERS + if(iterator == null && referenceFormulation == null) { + if(parent instanceof AbstractLogicalSource) { + // We have the root + Iterator iterator = parent.iterator(); + int index = 0; + while(iterator.hasNext()) { + Iteration i = iterator.next(); + LogicalIteration li = new LogicalIteration(((AbstractLogicalSource) parent).nulls); + li.put("#", index++); + li.put("", i); + list.add(li); + } - int index = 0; - while(iterations.hasNext()) { - Iteration i = iterations.next(); - LogicalIteration li = new LogicalIteration(nulls); - li.put(fieldName + ".#", index++); - li.put(fieldName, i); + } else { + throw new RuntimeException("No iterator or reference formulation for iterable field."); + } + } else if (referenceFormulation == null) { + // The iterator has chanced + // We take the iterator from the parent + Iterator iter = parent.iterator(); + int index = 0; + while(iter.hasNext()) { + Iteration i = iter.next(); + for(Iteration newIteration : i.changeIterator(iterator)) { + LogicalIteration li = new LogicalIteration(((AbstractLogicalSource) parent).nulls); + li.put(getAbsoluteFieldName(), index++); + li.put(getAbsoluteFieldName() + ".#", newIteration); + } + } - list.add(li); + } else { + // The reference formulation (and iterator) have changed. } // Let's process the expression fields List nlist = new ArrayList<>(); for(LogicalIteration li : list) { - for(ExpressionField es : expressionFields) { - nlist.addAll(es.enrich(fieldName, li)); + for(ExpressionField expressionField : expressionFields) { + nlist.addAll(expressionField.enrich(li)); } } list = nlist; @@ -56,18 +64,7 @@ public List enrich(Iterator iterations, Set nlist = new ArrayList<>(); for(LogicalIteration li : list) { for(IterableField iterableField : iterableFields) { - if(iterableField.referenceFormulation == null && iterableField.iterator == null) { - throw new RuntimeException("An Iterable Field has not been set with a new reference formulation or new iterator."); - } - - if(iterableField.referenceFormulation != null) { - // TODO: implement changing of reference formulation (with iterator) - } else { - // The iterator has changed - Iteration i = li.getIteration(fieldName); - List newiterations = i.changeIterator(iterableField.iterator); - nlist.addAll(iterableField.enrich(newiterations.iterator(), nulls)); - } + nlist.addAll(iterableField.enrich()); } } list = nlist; @@ -75,6 +72,9 @@ public List enrich(Iterator iterations, Set return list; } - // TODO + @Override + public Iterator iterator() { + return parent.iterator(); + } } \ No newline at end of file diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index 957a5bf4..6f161dd8 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -3,11 +3,12 @@ import java.util.*; import java.util.stream.Collectors; -public class LogicalView extends AbstractLogicalSource { +public class LogicalView extends AbstractLogicalSource implements ContainsFields { private List iterations = null; public AbstractLogicalSource logicalSource; + public List expressionFields = new ArrayList<>(); public List iterableFields = new ArrayList<>(); @@ -17,14 +18,13 @@ public Iterator iterator() { if (iterations == null) { iterations = new ArrayList<>(); - // The logical view acts like the root + // The logical view acts like a field that is the root IterableField root = new IterableField(); - root.referenceFormulation = logicalSource.referenceFormulation; - root.iterator = logicalSource.iterator; root.expressionFields.addAll(expressionFields); root.iterableFields.addAll(iterableFields); root.fieldName = ""; - iterations = root.enrich(logicalSource.iterator(), logicalSource.nulls); + root.parent = logicalSource; + iterations = root.enrich(); iterations.iterator(); } @@ -49,7 +49,21 @@ public Iteration next() { } } + @Override + public List getIterableFields() { + return iterableFields; + } + + @Override + public List getExpressionFields() { + return expressionFields; + } + + @Override public void addField(Field field) { + // The parent of a logical view's fields is its logical source. + field.parent = this.logicalSource; + if (field instanceof IterableField) { iterableFields.add((IterableField) field); } else if (field instanceof ExpressionField) { From a3a54d7bc09676675a5149bb0df7a6240969f66f Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Mon, 20 Oct 2025 18:58:35 +0200 Subject: [PATCH 18/28] We pass 21 of 32 tests --- .../burp/model/AbstractLogicalSource.java | 4 ++ src/main/java/burp/model/ExpressionField.java | 14 +--- src/main/java/burp/model/Field.java | 31 ++++++++- src/main/java/burp/model/FieldParent.java | 2 +- src/main/java/burp/model/IterableField.java | 65 +++---------------- src/main/java/burp/model/LogicalView.java | 22 ++++--- src/test/java/burp/TestLV.java | 1 - 7 files changed, 60 insertions(+), 79 deletions(-) diff --git a/src/main/java/burp/model/AbstractLogicalSource.java b/src/main/java/burp/model/AbstractLogicalSource.java index dec43401..ec463091 100644 --- a/src/main/java/burp/model/AbstractLogicalSource.java +++ b/src/main/java/burp/model/AbstractLogicalSource.java @@ -9,4 +9,8 @@ public abstract class AbstractLogicalSource extends Iterable implements FieldPar public Set nulls = new HashSet<>(); public abstract Iterator iterator(); + @Override + public String getAbsoluteFieldName() { + return ""; + } } \ No newline at end of file diff --git a/src/main/java/burp/model/ExpressionField.java b/src/main/java/burp/model/ExpressionField.java index 37b48e1b..e7b1e1df 100644 --- a/src/main/java/burp/model/ExpressionField.java +++ b/src/main/java/burp/model/ExpressionField.java @@ -12,7 +12,7 @@ public List enrich(LogicalIteration underlying){ List result = new ArrayList<>(); int i = 0; - for(Object o : fieldExpressionMap.generateValues(underlying.getIteration(getParentIteration()))){ + for(Object o : fieldExpressionMap.generateValues(underlying.getIteration(parent.getAbsoluteFieldName()))){ LogicalIteration e = underlying.copy(); e.put(getAbsoluteFieldName() + ".#", i++); e.put(getAbsoluteFieldName(), o); @@ -22,16 +22,4 @@ public List enrich(LogicalIteration underlying){ return result; } - private String getParentIteration() { - if(parent instanceof AbstractLogicalSource) - return ""; - - Field parent = (Field) this.parent; - return parent.fieldName; - } - - @Override - public Iterator iterator() { - return parent.iterator(); - } } diff --git a/src/main/java/burp/model/Field.java b/src/main/java/burp/model/Field.java index c4988aa9..c57efe63 100644 --- a/src/main/java/burp/model/Field.java +++ b/src/main/java/burp/model/Field.java @@ -11,7 +11,36 @@ public abstract class Field implements ContainsFields, FieldParent { public List expressionFields = new ArrayList<>(); public List iterableFields = new ArrayList<>(); - protected String getAbsoluteFieldName() { + public static List expand(List list, List expressionFields, List iterableFields) { + List result = new ArrayList<>(list); + + if (expressionFields != null && !expressionFields.isEmpty()) { + // Let's process the expression fields + for (ExpressionField expressionField : expressionFields) { + List nlist = new ArrayList<>(); + for (LogicalIteration li : result) { + nlist.addAll(expressionField.enrich(li)); + } + result = nlist; + } + } + + if (iterableFields != null && !iterableFields.isEmpty()) { + // Let's process the iterable fields + List nlist = new ArrayList<>(); + for (LogicalIteration li : result) { + for (IterableField iterableField : iterableFields) { + nlist.addAll(iterableField.enrich(li)); + } + } + result = nlist; + } + + return result; + } + + @Override + public String getAbsoluteFieldName() { if (parent instanceof AbstractLogicalSource) return fieldName; diff --git a/src/main/java/burp/model/FieldParent.java b/src/main/java/burp/model/FieldParent.java index 45843f04..3915bbb6 100644 --- a/src/main/java/burp/model/FieldParent.java +++ b/src/main/java/burp/model/FieldParent.java @@ -5,5 +5,5 @@ public interface FieldParent { - Iterator iterator(); + String getAbsoluteFieldName(); } diff --git a/src/main/java/burp/model/IterableField.java b/src/main/java/burp/model/IterableField.java index 6bcc71a8..383645b9 100644 --- a/src/main/java/burp/model/IterableField.java +++ b/src/main/java/burp/model/IterableField.java @@ -1,80 +1,35 @@ package burp.model; -import org.apache.jena.atlas.iterator.Iter; import org.apache.jena.rdf.model.Resource; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; public class IterableField extends Field { public String iterator; public Resource referenceFormulation; - public List enrich() { + public List enrich(LogicalIteration underlying) { List list = new ArrayList<>(); - if(iterator == null && referenceFormulation == null) { - if(parent instanceof AbstractLogicalSource) { - // We have the root - Iterator iterator = parent.iterator(); - int index = 0; - while(iterator.hasNext()) { - Iteration i = iterator.next(); - LogicalIteration li = new LogicalIteration(((AbstractLogicalSource) parent).nulls); - li.put("#", index++); - li.put("", i); - list.add(li); - } - - } else { - throw new RuntimeException("No iterator or reference formulation for iterable field."); - } - } else if (referenceFormulation == null) { + if (referenceFormulation == null) { // The iterator has chanced // We take the iterator from the parent - Iterator iter = parent.iterator(); + Iteration i = underlying.getIteration(parent.getAbsoluteFieldName()); int index = 0; - while(iter.hasNext()) { - Iteration i = iter.next(); - for(Iteration newIteration : i.changeIterator(iterator)) { - LogicalIteration li = new LogicalIteration(((AbstractLogicalSource) parent).nulls); - li.put(getAbsoluteFieldName(), index++); - li.put(getAbsoluteFieldName() + ".#", newIteration); - } + for(Iteration newIteration : i.changeIterator(iterator)) { + System.out.println(newIteration); + LogicalIteration e = underlying.copy(); + e.put(getAbsoluteFieldName() + ".#", index++); + e.put(getAbsoluteFieldName(), newIteration); + list.add(e); } - } else { // The reference formulation (and iterator) have changed. } - // Let's process the expression fields - List nlist = new ArrayList<>(); - for(LogicalIteration li : list) { - for(ExpressionField expressionField : expressionFields) { - nlist.addAll(expressionField.enrich(li)); - } - } - list = nlist; - - // Let's process the iterable fields - nlist = new ArrayList<>(); - for(LogicalIteration li : list) { - for(IterableField iterableField : iterableFields) { - nlist.addAll(iterableField.enrich()); - } - } - list = nlist; - - return list; - } - - @Override - public Iterator iterator() { - return parent.iterator(); + return Field.expand(list, expressionFields, iterableFields); } } \ No newline at end of file diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index 6f161dd8..41e7e877 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -18,13 +18,18 @@ public Iterator iterator() { if (iterations == null) { iterations = new ArrayList<>(); - // The logical view acts like a field that is the root - IterableField root = new IterableField(); - root.expressionFields.addAll(expressionFields); - root.iterableFields.addAll(iterableFields); - root.fieldName = ""; - root.parent = logicalSource; - iterations = root.enrich(); + List list = new ArrayList<>(); + Iterator iterator = logicalSource.iterator(); + int index = 0; + while(iterator.hasNext()) { + Iteration i = iterator.next(); + LogicalIteration li = new LogicalIteration(logicalSource.nulls); + li.put("#", index++); + li.put("", i); + list.add(li); + } + + iterations = Field.expand(list, expressionFields, iterableFields); iterations.iterator(); } @@ -72,6 +77,7 @@ public void addField(Field field) { else throw new RuntimeException("Unknown field type."); } + } class LogicalIteration extends Iteration { @@ -144,7 +150,7 @@ public String toString() { } public LogicalIteration copy() { - return new LogicalIteration(map,null); + return new LogicalIteration(new HashMap<>(map),null); } public void put(String key, Object o) { diff --git a/src/test/java/burp/TestLV.java b/src/test/java/burp/TestLV.java index 19ec8b1e..143f3d62 100644 --- a/src/test/java/burp/TestLV.java +++ b/src/test/java/burp/TestLV.java @@ -6,7 +6,6 @@ import java.io.File; import java.nio.file.Files; -import java.util.List; public class TestLV { From 8d92d8e3599cf8b9b125f5743b8e6ea6e8650dcb Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Mon, 20 Oct 2025 21:10:07 +0200 Subject: [PATCH 19/28] 25 of 32 tests passed --- src/main/java/burp/ls/CSVSource.java | 25 ++++--- src/main/java/burp/ls/JSONSource.java | 31 ++------- .../java/burp/ls/LogicalSourceFactory.java | 68 +++++++++++++++++-- src/main/java/burp/ls/RDBSource.java | 16 ++--- src/main/java/burp/ls/SPARQLFileSource.java | 9 ++- src/main/java/burp/ls/XMLSource.java | 19 +++++- src/main/java/burp/model/ExpressionField.java | 6 +- src/main/java/burp/model/IterableField.java | 25 ++++++- src/main/java/burp/model/Iteration.java | 2 +- src/main/java/burp/model/LogicalView.java | 29 +++++++- src/main/java/burp/parse/Parse.java | 33 ++++----- src/test/java/burp/TestLV.java | 2 +- 12 files changed, 183 insertions(+), 82 deletions(-) diff --git a/src/main/java/burp/ls/CSVSource.java b/src/main/java/burp/ls/CSVSource.java index 09dcf89f..6910aaf1 100644 --- a/src/main/java/burp/ls/CSVSource.java +++ b/src/main/java/burp/ls/CSVSource.java @@ -1,12 +1,8 @@ package burp.ls; import java.io.FileReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.io.StringWriter; +import java.util.*; import java.util.stream.Collectors; import com.opencsv.CSVParserBuilder; @@ -14,6 +10,7 @@ import com.opencsv.CSVReaderBuilder; import burp.model.Iteration; +import com.opencsv.CSVWriter; class CSVSource extends FileBasedLogicalSource { @@ -65,7 +62,8 @@ public Iterator iterator() { class CSVIteration extends Iteration { - private final Map map = new HashMap<>(); + // Use a LinkedHashMap to preserve a correspondence between keys and values + private final Map map = new LinkedHashMap<>(); protected CSVIteration(String[] header, String[] rec, Set nulls) { super(nulls); @@ -94,8 +92,17 @@ public List getStringsFor(String reference) { } @Override - public List changeIterator(String iterator) { - throw new RuntimeException("We cannot change the iterator of a CSV iteration."); + public String asString() { + StringWriter stringWriter = new StringWriter(); + try (CSVWriter writer = new CSVWriter(stringWriter)) { + String[] header = map.keySet().toArray(new String[0]); + writer.writeNext(header); + String[] rec = map.values().toArray(new String[0]); + writer.writeNext(rec); + } catch(Exception e) { + throw new RuntimeException("Error representing CSV iteration as CSV."); + } + return stringWriter.toString(); } } \ No newline at end of file diff --git a/src/main/java/burp/ls/JSONSource.java b/src/main/java/burp/ls/JSONSource.java index 19ae6935..eec35805 100644 --- a/src/main/java/burp/ls/JSONSource.java +++ b/src/main/java/burp/ls/JSONSource.java @@ -21,7 +21,7 @@ class JSONSource extends FileBasedLogicalSource { - private static final Configuration c = Configuration.builder() + public static final Configuration configuration = Configuration.builder() .mappingProvider(new JacksonMappingProvider()) .jsonProvider(new JacksonJsonProvider()) .build() @@ -34,7 +34,7 @@ public Iterator iterator() { iterations = new ArrayList<>(); String contents = Files.readString(Paths.get(getDecompressedFile()), encoding); - List> nodes = JsonPath.using(c).parse(contents).read(iterator); + List> nodes = JsonPath.using(configuration).parse(contents).read(iterator); for (Map n : nodes) { iterations.add(new JSONIteration(JSONObject.toJSONString(n), nulls)); } @@ -50,19 +50,10 @@ public Iterator iterator() { class JSONIteration extends Iteration { private DocumentContext doc = null; - - private static final Configuration c = Configuration - .builder() - .mappingProvider(new JacksonMappingProvider()) - .jsonProvider(new JacksonJsonProvider()) - .build() - .addOptions(Option.ALWAYS_RETURN_LIST) - ; - + protected JSONIteration(String json, Set nulls) { super(nulls); - - doc = JsonPath.using(c).parse(json); + doc = JsonPath.using(JSONSource.configuration).parse(json); } @Override @@ -102,18 +93,8 @@ public List getStringsFor(String reference) { } @Override - public List changeIterator(String iterator) { - try { - List iterations = new ArrayList<>(); - String contents = doc.jsonString(); - List> nodes = JsonPath.using(c).parse(contents).read(iterator); - for (Map n : nodes) { - iterations.add(new JSONIteration(JSONObject.toJSONString(n), nulls)); - } - return iterations; - } catch (Throwable e) { - throw new RuntimeException(e); - } + public String asString() { + return doc.jsonString(); } } \ No newline at end of file diff --git a/src/main/java/burp/ls/LogicalSourceFactory.java b/src/main/java/burp/ls/LogicalSourceFactory.java index ea89dca8..edbc7040 100644 --- a/src/main/java/burp/ls/LogicalSourceFactory.java +++ b/src/main/java/burp/ls/LogicalSourceFactory.java @@ -1,14 +1,19 @@ package burp.ls; import java.io.File; +import java.io.StringReader; import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - +import java.util.*; + +import burp.model.AbstractLogicalSource; +import burp.model.Iteration; +import com.jayway.jsonpath.JsonPath; +import com.opencsv.CSVReader; +import net.minidev.json.JSONObject; +import org.apache.commons.io.IOUtils; import org.apache.jena.rdf.model.Resource; import org.apache.jena.rdf.model.Statement; import org.apache.jena.rdf.model.StmtIterator; @@ -25,6 +30,15 @@ import burp.vocabularies.UCOCore; import burp.vocabularies.UCOObservable; import burp.vocabularies.YS; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathFactory; public class LogicalSourceFactory { @@ -350,4 +364,50 @@ private static HashMap getPrefixMap(Resource ls) { return prefixMap; } + public static List changeIterator(String iterationAsString, Resource rf, String iterator) { + try { + if (RML.JSONPath.equals(rf)) { + // Create JSON iterations + List iterations = new ArrayList<>(); + String contents = iterationAsString; + List> nodes = JsonPath.using(JSONSource.configuration).parse(contents).read(iterator); + for (Map n : nodes) + // TODO: How do we provide null values? + iterations.add(new JSONIteration(JSONObject.toJSONString(n), new HashSet<>())); + return iterations; + + } else if (RML.CSV.equals(rf)) { + // Create CSV iterations + CSVReader reader = new CSVReader(new StringReader(iterationAsString)); + List all = reader.readAll(); + reader.close(); + String[] header = all.remove(0); + List iterations = new ArrayList<>(); + for (String[] rec : all) + // TODO: How do we provide null values? + iterations.add(new CSVIteration(header, rec, new HashSet<>())); + return iterations; + + } else if (RML.XPath.equals(rf)) { + // Create XPATH iterations + DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = builderFactory.newDocumentBuilder(); + Document xmlDocument = builder.parse(IOUtils.toInputStream(iterationAsString)); + XPath xPath = XPathFactory.newInstance().newXPath(); + NodeList nodes = (NodeList) xPath.compile(iterator).evaluate(xmlDocument, XPathConstants.NODESET); + + List iterations = new ArrayList<>(); + for (int index = 0; index < nodes.getLength(); index++) { + Node node = nodes.item(index); + // TODO: How do we provide null values? + // TODO: How do we provide the prefix mappings? + iterations.add(new XMLIteration(node, new HashSet<>(), new HashMap<>())); + } + } + } catch (Throwable e) { + throw new RuntimeException(e); + } + + throw new RuntimeException("Other reference formulations for iterable fields are not yet supported: " + rf); + } } diff --git a/src/main/java/burp/ls/RDBSource.java b/src/main/java/burp/ls/RDBSource.java index ca85fb46..897c9166 100644 --- a/src/main/java/burp/ls/RDBSource.java +++ b/src/main/java/burp/ls/RDBSource.java @@ -1,18 +1,14 @@ package burp.ls; +import java.io.StringWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; +import java.util.*; +import com.opencsv.CSVWriter; import org.apache.commons.text.StringEscapeUtils; import burp.model.Iteration; @@ -72,7 +68,7 @@ public Iteration next() { class RDBIteration extends Iteration { - private final Map values = new HashMap<>(); + private final Map values = new LinkedHashMap<>(); protected RDBIteration(ResultSet resultSet, Map indexMap, Set nulls) { super(nulls); @@ -124,8 +120,8 @@ public List getStringsFor(String reference) { } @Override - public List changeIterator(String iterator) { - throw new RuntimeException("We cannot change the iterator of an RDB iteration."); + public String asString() { + throw new RuntimeException("Not implemented. Does this make sense in the context of LV?"); } } \ No newline at end of file diff --git a/src/main/java/burp/ls/SPARQLFileSource.java b/src/main/java/burp/ls/SPARQLFileSource.java index ed42b281..2de1b886 100644 --- a/src/main/java/burp/ls/SPARQLFileSource.java +++ b/src/main/java/burp/ls/SPARQLFileSource.java @@ -80,8 +80,8 @@ public List getStringsFor(String reference) { } @Override - public List changeIterator(String iterator) { - throw new RuntimeException("We cannot change the iterator of a SPARQL iteration."); + public String asString() { + throw new RuntimeException("Not implemented. Does this make sense in the context of LV?"); } } @@ -117,8 +117,7 @@ public List getStringsFor(String reference) { } @Override - public List changeIterator(String iterator) { - throw new RuntimeException("We cannot change the iterator of an SPARQL TSV iteration."); + public String asString() { + throw new RuntimeException("Not implemented. Does this make sense in the context of LV?"); } - } \ No newline at end of file diff --git a/src/main/java/burp/ls/XMLSource.java b/src/main/java/burp/ls/XMLSource.java index a610d658..8e83ac08 100644 --- a/src/main/java/burp/ls/XMLSource.java +++ b/src/main/java/burp/ls/XMLSource.java @@ -1,5 +1,6 @@ package burp.ls; +import java.io.StringWriter; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; @@ -10,6 +11,11 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; @@ -125,9 +131,16 @@ public List getStringsFor(String reference) { } @Override - public List changeIterator(String iterator) { - // TODO: to implement - throw new RuntimeException("Not yet implemented."); + public String asString() { + try { + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer transformer = tf.newTransformer(); + StringWriter writer = new StringWriter(); + transformer.transform(new DOMSource(node), new StreamResult(writer)); + return writer.toString(); + } catch (Exception e) { + throw new RuntimeException("Error converting Node to String", e); + } } } diff --git a/src/main/java/burp/model/ExpressionField.java b/src/main/java/burp/model/ExpressionField.java index e7b1e1df..83395558 100644 --- a/src/main/java/burp/model/ExpressionField.java +++ b/src/main/java/burp/model/ExpressionField.java @@ -9,17 +9,17 @@ public class ExpressionField extends Field { public ConcreteExpressionMap fieldExpressionMap; public List enrich(LogicalIteration underlying){ - List result = new ArrayList<>(); + List list = new ArrayList<>(); int i = 0; for(Object o : fieldExpressionMap.generateValues(underlying.getIteration(parent.getAbsoluteFieldName()))){ LogicalIteration e = underlying.copy(); e.put(getAbsoluteFieldName() + ".#", i++); e.put(getAbsoluteFieldName(), o); - result.add(e); + list.add(e); } - return result; + return Field.expand(list, expressionFields, iterableFields); } } diff --git a/src/main/java/burp/model/IterableField.java b/src/main/java/burp/model/IterableField.java index 383645b9..3e3a321d 100644 --- a/src/main/java/burp/model/IterableField.java +++ b/src/main/java/burp/model/IterableField.java @@ -1,8 +1,10 @@ package burp.model; +import burp.ls.LogicalSourceFactory; import org.apache.jena.rdf.model.Resource; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; public class IterableField extends Field { @@ -16,10 +18,9 @@ public List enrich(LogicalIteration underlying) { if (referenceFormulation == null) { // The iterator has chanced // We take the iterator from the parent - Iteration i = underlying.getIteration(parent.getAbsoluteFieldName()); + String i = underlying.getIterationString(parent.getAbsoluteFieldName()); int index = 0; - for(Iteration newIteration : i.changeIterator(iterator)) { - System.out.println(newIteration); + for(Iteration newIteration : LogicalSourceFactory.changeIterator(i, getAncestorReferenceFormulation(), iterator)) { LogicalIteration e = underlying.copy(); e.put(getAbsoluteFieldName() + ".#", index++); e.put(getAbsoluteFieldName(), newIteration); @@ -27,9 +28,27 @@ public List enrich(LogicalIteration underlying) { } } else { // The reference formulation (and iterator) have changed. + String i = underlying.getIterationString(parent.getAbsoluteFieldName()); + + int index = 0; + for(Iteration newIteration : LogicalSourceFactory.changeIterator(i, referenceFormulation, iterator)) { + System.out.println(newIteration); + LogicalIteration e = underlying.copy(); + e.put(getAbsoluteFieldName() + ".#", index++); + e.put(getAbsoluteFieldName(), newIteration); + list.add(e); + } } return Field.expand(list, expressionFields, iterableFields); } + private Resource getAncestorReferenceFormulation() { + // Since we explicitly created an IterableField for the rood. the two lines below should suffice. + if(referenceFormulation != null) return referenceFormulation; + if(parent instanceof IterableField) return ((IterableField) parent).getAncestorReferenceFormulation(); + if(parent instanceof LogicalSource) return ((LogicalSource) parent).referenceFormulation; + return null; + } + } \ No newline at end of file diff --git a/src/main/java/burp/model/Iteration.java b/src/main/java/burp/model/Iteration.java index 48661670..bfa29bd4 100644 --- a/src/main/java/burp/model/Iteration.java +++ b/src/main/java/burp/model/Iteration.java @@ -16,5 +16,5 @@ public Iteration(Set nulls) { public abstract List getStringsFor(String reference); - public abstract List changeIterator(String iterator); + public abstract String asString(); } \ No newline at end of file diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index 41e7e877..9358c595 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -1,5 +1,8 @@ package burp.model; +import com.opencsv.CSVWriter; + +import java.io.StringWriter; import java.util.*; import java.util.stream.Collectors; @@ -100,6 +103,10 @@ public List getValuesFor(String reference) { throw new RuntimeException("Attribute " + reference + " does not exist."); Object o = map.get(reference); + + if(o instanceof Iteration) + throw new RuntimeException("Attribute " + reference + " refers to a record key."); + if(nulls == null || !nulls.contains(o)) l.add(o); @@ -112,8 +119,17 @@ public List getStringsFor(String reference) { } @Override - public List changeIterator(String iterator) { - throw new RuntimeException("We cannot change the iterator of a logical iteration."); + public String asString() { + StringWriter stringWriter = new StringWriter(); + try (CSVWriter writer = new CSVWriter(stringWriter)) { + String[] header = map.keySet().toArray(new String[0]); + writer.writeNext(header); + String[] rec = map.values().toArray(new String[0]); + writer.writeNext(rec); + } catch(Exception e) { + throw new RuntimeException("Error representing logical iteration as String/CSV."); + } + return stringWriter.toString(); } public String toString() { @@ -157,7 +173,16 @@ public void put(String key, Object o) { map.put(key, o); } + // Used by ExpressionField public Iteration getIteration(String fieldName) { return (Iteration) map.get(fieldName); } + + // Used by IterableField + public String getIterationString(String fieldName) { + Object o = map.get(fieldName); + if(o instanceof Iteration) + return ((Iteration) o).asString(); + return o.toString(); + } } \ No newline at end of file diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index f16f6c81..9bb842dd 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -340,35 +340,36 @@ private static LanguageMap prepareLanguageMap(Resource lam) { } private static Field prepareField(Resource p) { - // ExpressionField and IterableField are mutually exclusive - // If we have an rml:field, property, then we have an IterableField - if(p.hasProperty(RML.field)) { + Expression e = prepareExpression(p); + Field field = null; + if(e == null) { // Create IterableField IterableField f = new IterableField(); - // Add the subfields - p.listProperties(RML.field).forEach(s -> { - f.addField(prepareField(s.getObject().asResource())); - }); - - if(p.hasProperty(RML.iterator)) { + if(p.hasProperty(RML.iterator)) f.iterator = p.getProperty(RML.iterator).getObject().asLiteral().getString(); - } - if(p.hasProperty(RML.referenceFormulation)) { + if(p.hasProperty(RML.referenceFormulation)) f.referenceFormulation = p.getProperty(RML.referenceFormulation).getObject().asResource(); - } - f.fieldName = p.getRequiredProperty(RML.fieldName).getObject().asLiteral().getString(); - return f; + field = f; } else { ExpressionField f = new ExpressionField(); ConcreteExpressionMap fem = new ConcreteExpressionMap(); fem.expression = prepareExpression(p); f.fieldExpressionMap = fem; - f.fieldName = p.getRequiredProperty(RML.fieldName).getObject().asLiteral().getString(); - return f; + field = f; } + + field.fieldName = p.getRequiredProperty(RML.fieldName).getObject().asLiteral().getString(); + + // Add the subfields + Field finalField = field; + p.listProperties(RML.field).forEach(s -> { + finalField.addField(prepareField(s.getObject().asResource())); + }); + + return finalField; } private static ReferencingObjectMap prepareReferencingObjectMap(Resource rom) { diff --git a/src/test/java/burp/TestLV.java b/src/test/java/burp/TestLV.java index 143f3d62..1b47ae9f 100644 --- a/src/test/java/burp/TestLV.java +++ b/src/test/java/burp/TestLV.java @@ -10,7 +10,7 @@ public class TestLV { public static void main(String[] args) throws Exception { - String m = new File("./src/test/resources/rml-lv/RMLLVTC0002a/", "mapping.ttl").getAbsolutePath(); + String m = new File("./src/test/resources/rml-lv/RMLLVTC0007a/", "mapping.ttl").getAbsolutePath(); String r = Files.createTempFile(null, ".nq").toString(); args = new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }; BURPConfiguration conf = new BURPConfiguration(args); From 0ef6ec6aa2d36464f291714c40eb8964fb09f702 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Thu, 23 Oct 2025 12:33:54 +0200 Subject: [PATCH 20/28] Solution for detecting cycles in shapes --- src/main/java/burp/parse/Parse.java | 6 ++- src/main/resources/shapes/lv-cycle-shapes.ttl | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 src/main/resources/shapes/lv-cycle-shapes.ttl diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index 9bb842dd..5e3ea9a8 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -70,12 +70,14 @@ private static boolean isValid(Model mapping) { core.read(Parse.class.getResourceAsStream("/shapes/rml-cc/cc.ttl"), "urn:dummy", FileUtils.langTurtle); //core.read(Parse.class.getResourceAsStream("/shapes/rml-io/io.ttl"), "urn:dummy", FileUtils.langTurtle); //core.read(Parse.class.getResourceAsStream("/shapes/rml-fnml/fnml.ttl"), "urn:dummy", FileUtils.langTurtle); - //core.read(Parse.class.getResourceAsStream("/shapes/rml-lv/lv.ttl"), "urn:dummy", FileUtils.langTurtle); - //core.read(Parse.class.getResourceAsStream("/shapes/rml-star/star.ttl"), "urn:dummy", FileUtils.langTurtle); + core.read(Parse.class.getResourceAsStream("/shapes/rml-lv/lv.ttl"), "urn:dummy", FileUtils.langTurtle); + core.read(Parse.class.getResourceAsStream("/shapes/lv-cycle-shapes.ttl"), "urn:dummy", FileUtils.langTurtle); + //core.read(Parse.class.getResourceAsStream("/shapes/rml-star/star.ttl"), "urn:dummy", FileUtils.langTurtle); ValidationReport report = ShaclValidator.get().validate(core.getGraph(), mapping.getGraph()); if(!report.conforms()) { ShLib.printReport(report); + System.err.println(report); return false; } diff --git a/src/main/resources/shapes/lv-cycle-shapes.ttl b/src/main/resources/shapes/lv-cycle-shapes.ttl new file mode 100644 index 00000000..051f87b2 --- /dev/null +++ b/src/main/resources/shapes/lv-cycle-shapes.ttl @@ -0,0 +1,43 @@ +@prefix owl: . +@prefix rml: . +@prefix rmlsh: . +@prefix sh: . +@prefix xsd: . +@prefix rdfs: . + + a owl:Ontology ; + owl:imports ; +. + +rmlsh:parentCyclesShape a sh:NodeShape ; + sh:targetSubjectsOf rml:viewOn ; + sh:targetSubjectsOf rml:field ; + + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "There must be no cycles via rml:viewOn or rml:Field." ; + sh:select """ + PREFIX rml: + SELECT ?this + WHERE { + ?this a rml:LogicalView . + ?this (rml:viewOn|rml:field)+ ?this . + } + """ ; + ] . + +rmlsh:joinCyclesShape a sh:NodeShape ; + sh:targetSubjectsOf rml:viewOn ; + + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "There must be no cycles via rml:viewOn and rml:leftJoin." ; + sh:select """ + PREFIX rml: + SELECT ?this + WHERE { + ?this a rml:LogicalView . + ?this (rml:leftJoin/rml:parentLogicalView)+ ?this . + } + """ ; + ] . \ No newline at end of file From f121daf270519a137e3959f0c7e4f899b70d4a69 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Fri, 24 Oct 2025 13:07:58 +0200 Subject: [PATCH 21/28] Fixed shapes to include rml:innerJoin --- src/main/resources/shapes/lv-cycle-shapes.ttl | 4 ++-- src/test/java/burp/TestLV.java | 2 +- src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md | 3 ++- src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl | 3 ++- 68 files changed, 135 insertions(+), 69 deletions(-) diff --git a/src/main/resources/shapes/lv-cycle-shapes.ttl b/src/main/resources/shapes/lv-cycle-shapes.ttl index 051f87b2..cabe3bdb 100644 --- a/src/main/resources/shapes/lv-cycle-shapes.ttl +++ b/src/main/resources/shapes/lv-cycle-shapes.ttl @@ -31,13 +31,13 @@ rmlsh:joinCyclesShape a sh:NodeShape ; sh:sparql [ a sh:SPARQLConstraint ; - sh:message "There must be no cycles via rml:viewOn and rml:leftJoin." ; + sh:message "There must be no cycles via rml:viewOn and rml:leftJoin or rml:innerJoin." ; sh:select """ PREFIX rml: SELECT ?this WHERE { ?this a rml:LogicalView . - ?this (rml:leftJoin/rml:parentLogicalView)+ ?this . + ?this ((rml:leftJoin|rml:innerJoin)/rml:parentLogicalView)+ ?this . } """ ; ] . \ No newline at end of file diff --git a/src/test/java/burp/TestLV.java b/src/test/java/burp/TestLV.java index 1b47ae9f..e8183e9d 100644 --- a/src/test/java/burp/TestLV.java +++ b/src/test/java/burp/TestLV.java @@ -10,7 +10,7 @@ public class TestLV { public static void main(String[] args) throws Exception { - String m = new File("./src/test/resources/rml-lv/RMLLVTC0007a/", "mapping.ttl").getAbsolutePath(); + String m = new File("./src/test/resources/rml-lv/RMLLVTC0006a/", "mapping.ttl").getAbsolutePath(); String r = Files.createTempFile(null, ".nq").toString(); args = new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }; BURPConfiguration conf = new BURPConfiguration(args); diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md index 77b13b89..52ddf5a4 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl index 3ae7402a..a72409e0 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md index 5e9a7982..22d00ea8 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl index 090551c6..20d9348f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md index bd4b3375..bf4ab396 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl index cc59ab25..ca963e35 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md index 72a129d2..e9b1bf21 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl index 464e375f..2117ebdb 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md index 62726bce..287d8936 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl index 5e5660fd..9924fa09 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md index e63a46f8..332832f9 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl index d4bea911..77149652 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md index c81d539c..f9fdbb84 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl index 8f6d0a71..7ed744a7 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md index e588372e..e809d696 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl index 416ef309..a3545827 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md index 3216e09f..49893b9b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl index 18df5616..8bed79e7 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md index 1fe75b53..27928980 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl index 11779d6d..87f8919e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md index c750967b..bbdfd65d 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl index 090551c6..20d9348f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md index facdad4a..b6d1a3d1 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl index cc59ab25..ca963e35 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md index 4ef9d729..51262015 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl index fec1cb92..6da934ad 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md index d78e6ac2..33d9a508 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl index 8b1336cb..19eee717 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md index bb8f5af1..a2a54a71 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl index 3791cabe..b0db209a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md index 650449eb..ef82ce64 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl index 3791cabe..b0db209a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md index f03ab6a1..d3c43302 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl index 87ece93e..a6f85e5e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md index 404032d8..df0571be 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl index 522fd8b7..b8cbc6a9 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md index 44aac394..d33ee77c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl index 210742e9..b8b8b2f4 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md index d3fa35a7..b2d8ef6b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl index 210742e9..b8b8b2f4 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md index bccb7e9b..a135240f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl index 024f013c..6a91a0db 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md index 8d145688..0b98d32c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl index 024f013c..6a91a0db 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md index cf730683..8d6caf6e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl index c838425d..0a156f5c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md index bbcc004e..81bf7f13 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl index 3978b48f..847277ca 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md index 2a6ef494..aed94f81 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl index ebfbcce8..14e90fed 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md index a7c4ec8f..4dac7a04 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl index dfcc4089..09f6a13d 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md index 5496169b..8478c6ae 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl index f0d8a3cb..e47599b5 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md index a1536a16..7cd91a0e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl index 050e35d1..fbd5b088 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md index de0b96e5..4d660585 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl index 2c1495ac..98d2787a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md index 554a3f28..68ed8977 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl index 090551c6..20d9348f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md index aa88b932..388c4ac2 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl index cc59ab25..ca963e35 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md index 5a0a7735..c4c65e88 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl index 92b09f42..1dd36510 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md index e26f112d..ad67043f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md @@ -14,8 +14,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl index 5f44efa7..230573f4 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl @@ -1,8 +1,9 @@ @prefix rml: . @prefix rdf: . @prefix ex: . +@base . - a rml:TriplesMap; +<#TM> a rml:TriplesMap; rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; From 30a059355af7872240896922a8e337a650df9814 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Fri, 24 Oct 2025 14:00:13 +0200 Subject: [PATCH 22/28] Prepared parsing of joins --- src/main/java/burp/model/ContainsFields.java | 1 + src/main/java/burp/model/LogicalView.java | 10 +++ src/main/java/burp/model/ViewInnerJoin.java | 4 + src/main/java/burp/model/ViewJoin.java | 36 +++++++++ src/main/java/burp/model/ViewLeftJoin.java | 4 + src/main/java/burp/parse/Parse.java | 78 +++++++++++++++++--- src/main/java/burp/vocabularies/RML.java | 13 ++-- 7 files changed, 130 insertions(+), 16 deletions(-) create mode 100644 src/main/java/burp/model/ViewInnerJoin.java create mode 100644 src/main/java/burp/model/ViewJoin.java create mode 100644 src/main/java/burp/model/ViewLeftJoin.java diff --git a/src/main/java/burp/model/ContainsFields.java b/src/main/java/burp/model/ContainsFields.java index 4d430319..c11cda60 100644 --- a/src/main/java/burp/model/ContainsFields.java +++ b/src/main/java/burp/model/ContainsFields.java @@ -8,4 +8,5 @@ public interface ContainsFields { List getExpressionFields(); void addField(Field field); + } diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index 9358c595..5ec5057f 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -15,6 +15,9 @@ public class LogicalView extends AbstractLogicalSource implements ContainsFields public List expressionFields = new ArrayList<>(); public List iterableFields = new ArrayList<>(); + public List leftJoins = new ArrayList<>(); + public List innerJoins = new ArrayList<>(); + @Override public Iterator iterator() { try { @@ -81,6 +84,13 @@ public void addField(Field field) { throw new RuntimeException("Unknown field type."); } + public void addLeftJoin(ViewLeftJoin leftJoin) { + leftJoins.add(leftJoin); + } + + public void addInnerJoin(ViewInnerJoin innerJoin) { + innerJoins.add(innerJoin); + } } class LogicalIteration extends Iteration { diff --git a/src/main/java/burp/model/ViewInnerJoin.java b/src/main/java/burp/model/ViewInnerJoin.java new file mode 100644 index 00000000..f189b522 --- /dev/null +++ b/src/main/java/burp/model/ViewInnerJoin.java @@ -0,0 +1,4 @@ +package burp.model; + +public class ViewInnerJoin extends ViewJoin { +} diff --git a/src/main/java/burp/model/ViewJoin.java b/src/main/java/burp/model/ViewJoin.java new file mode 100644 index 00000000..7c12031f --- /dev/null +++ b/src/main/java/burp/model/ViewJoin.java @@ -0,0 +1,36 @@ +package burp.model; + +import java.util.ArrayList; +import java.util.List; + +public abstract class ViewJoin implements ContainsFields { + + public LogicalView parentLogicalView; + public List joinConditions = new ArrayList<>(); + public List expressionFields = new ArrayList<>(); + public List iterableFields = new ArrayList<>(); + + @Override + public List getIterableFields() { + return iterableFields; + } + + @Override + public List getExpressionFields() { + return expressionFields; + } + + @Override + public void addField(Field field) { + field.parent = parentLogicalView; + + if (field instanceof IterableField) { + getIterableFields().add((IterableField) field); + } else if (field instanceof ExpressionField) { + getExpressionFields().add((ExpressionField) field); + } + else + throw new RuntimeException("Unknown field type."); + } + +} diff --git a/src/main/java/burp/model/ViewLeftJoin.java b/src/main/java/burp/model/ViewLeftJoin.java new file mode 100644 index 00000000..59627033 --- /dev/null +++ b/src/main/java/burp/model/ViewLeftJoin.java @@ -0,0 +1,4 @@ +package burp.model; + +public class ViewLeftJoin extends ViewJoin { +} diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index 5e3ea9a8..879163c3 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -24,12 +24,14 @@ public class Parse { - static Map triplesmaps = null; + static Map triplesmaps = null; + static Map logicalviews = null; public static List parseMappingFile(String mappingFile) throws Exception { String mpath = Paths.get(mappingFile).toAbsolutePath().getParent().toString(); triplesmaps = new HashMap<>(); + logicalviews = new HashMap<>(); Model mapping = RDFDataMgr.loadModel(mappingFile); @@ -133,15 +135,7 @@ private static void normalizeConstants(Model mapping) { private static AbstractLogicalSource prepareLogicalSource(Resource ls, String mpath) throws Exception { // This is RML-LV if(ls.hasProperty(RML.viewOn)) { - Resource view = ls.getPropertyResourceValue(RML.viewOn); - LogicalView lv = new LogicalView(); - lv.logicalSource = prepareLogicalSource(view, mpath); - - ls.listProperties(RML.field).forEach(s -> { - lv.addField(prepareField(s.getObject().asResource())); - }); - - return lv; + return prepareLogicalView(ls, mpath); } // This is RML-CORE @@ -181,7 +175,69 @@ else if (RML.SPARQL_Results_JSON.equals(referenceFormulation)) throw new Exception("Reference formulation not (yet) supported."); } - private static SubjectMap prepareSubjectMap(Resource sm) { + private static LogicalView prepareLogicalView(Resource ls, String mpath) { + try { + Resource view = ls.getPropertyResourceValue(RML.viewOn); + LogicalView lv = logicalviews.computeIfAbsent(ls, (x) -> new LogicalView()); + + lv.logicalSource = prepareLogicalSource(view, mpath); + + ls.listProperties(RML.field).forEach(s -> { + lv.addField(prepareField(s.getObject().asResource())); + }); + + ls.listProperties(RML.leftJoin).forEach(s -> { + lv.addLeftJoin(prepareLeftJoin(s.getObject().asResource())); + }); + + ls.listProperties(RML.innerJoin).forEach(s -> { + lv.addInnerJoin(prepareInnerJoin(s.getObject().asResource())); + }); + + return lv; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private static ViewLeftJoin prepareLeftJoin(Resource resource) { + ViewLeftJoin join = new ViewLeftJoin(); + prepareViewJoin(join, resource); + return join; + } + + private static ViewInnerJoin prepareInnerJoin(Resource resource) { + ViewInnerJoin join = new ViewInnerJoin(); + prepareViewJoin(join, resource); + return join; } + + private static void prepareViewJoin(ViewJoin viewJoin, Resource resource) { + Resource plv = resource.getRequiredProperty(RML.parentLogicalView).getObject().asResource(); + viewJoin.parentLogicalView = prepareLogicalView(plv, null); + + plv.listProperties(RML.joinCondition).forEach((s) -> { + JoinCondition jc = new JoinCondition(); + + Resource jcr = s.getObject().asResource(); + + Resource r = jcr.getPropertyResourceValue(RML.parentMap); + if(r != null) + jc.parentMap = prepareExpressionMap(r); + + r = jcr.getPropertyResourceValue(RML.childMap); + if(r != null) + jc.childMap = prepareExpressionMap(r); + + viewJoin.joinConditions.add(jc); + }); + + plv.listProperties(RML.field).forEach(s -> { + viewJoin.addField(prepareField(s.getObject().asResource())); + }); + + } + + private static SubjectMap prepareSubjectMap(Resource sm) { SubjectMap subjectMap = new SubjectMap(); subjectMap.expression = prepareExpression(sm); diff --git a/src/main/java/burp/vocabularies/RML.java b/src/main/java/burp/vocabularies/RML.java index 04a16354..69c88d51 100644 --- a/src/main/java/burp/vocabularies/RML.java +++ b/src/main/java/burp/vocabularies/RML.java @@ -63,19 +63,22 @@ public final class RML { public static final Property gather = ResourceFactory.createProperty(NS + "gather"); public static final Property gatherAs = ResourceFactory.createProperty(NS + "gatherAs"); public static final Property graphMap = ResourceFactory.createProperty(NS + "graphMap"); - public static final Property input = ResourceFactory.createProperty(NS + "input"); - public static final Property inputValueMap = ResourceFactory.createProperty(NS + "inputValueMap"); + public static final Property innerJoin = ResourceFactory.createProperty(NS + "innerJoin"); + public static final Property input = ResourceFactory.createProperty(NS + "input"); + public static final Property inputValueMap = ResourceFactory.createProperty(NS + "inputValueMap"); public static final Property iterator = ResourceFactory.createProperty(NS + "iterator"); public static final Property joinCondition = ResourceFactory.createProperty(NS + "joinCondition"); - public static final Property languageMap = ResourceFactory.createProperty(NS + "languageMap"); + public static final Property leftJoin = ResourceFactory.createProperty(NS + "leftJoin"); + public static final Property languageMap = ResourceFactory.createProperty(NS + "languageMap"); public static final Property logicalSource = ResourceFactory.createProperty(NS + "logicalSource"); public static final Property namespace = ResourceFactory.createProperty(NS + "namespace"); public static final Property namespacePrefix = ResourceFactory.createProperty(NS + "namespacePrefix"); public static final Property namespaceURL = ResourceFactory.createProperty(NS + "namespaceURL"); public static final Property NULL = ResourceFactory.createProperty(NS + "null"); public static final Property objectMap = ResourceFactory.createProperty(NS + "objectMap"); - public static final Property parameterMap = ResourceFactory.createProperty(NS + "parameterMap"); - public static final Property path = ResourceFactory.createProperty(NS + "path"); + public static final Property parameterMap = ResourceFactory.createProperty(NS + "parameterMap"); + public static final Property parentLogicalView = ResourceFactory.createProperty(NS + "parentLogicalView"); + public static final Property path = ResourceFactory.createProperty(NS + "path"); public static final Property parentMap = ResourceFactory.createProperty(NS + "parentMap"); public static final Property parentTriplesMap = ResourceFactory.createProperty(NS + "parentTriplesMap"); public static final Property predicateMap = ResourceFactory.createProperty(NS + "predicateMap"); From c5e59fffa35edbfa3db6c79c44d190e429290b10 Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Sun, 26 Oct 2025 22:11:53 +0100 Subject: [PATCH 23/28] Prepare parse --- src/main/java/burp/model/LogicalView.java | 22 +++++++++++----------- src/main/java/burp/parse/Parse.java | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index 5ec5057f..36483842 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -15,11 +15,10 @@ public class LogicalView extends AbstractLogicalSource implements ContainsFields public List expressionFields = new ArrayList<>(); public List iterableFields = new ArrayList<>(); - public List leftJoins = new ArrayList<>(); - public List innerJoins = new ArrayList<>(); + public List joins = new ArrayList<>(); @Override - public Iterator iterator() { + public Iterator iterator() { try { if (iterations == null) { iterations = new ArrayList<>(); @@ -27,7 +26,7 @@ public Iterator iterator() { List list = new ArrayList<>(); Iterator iterator = logicalSource.iterator(); int index = 0; - while(iterator.hasNext()) { + while (iterator.hasNext()) { Iteration i = iterator.next(); LogicalIteration li = new LogicalIteration(logicalSource.nulls); li.put("#", index++); @@ -37,6 +36,11 @@ public Iterator iterator() { iterations = Field.expand(list, expressionFields, iterableFields); + for(ViewJoin join : joins) { + // Compute the join. + + } + iterations.iterator(); } @@ -79,18 +83,14 @@ public void addField(Field field) { iterableFields.add((IterableField) field); } else if (field instanceof ExpressionField) { expressionFields.add((ExpressionField) field); - } - else + } else throw new RuntimeException("Unknown field type."); } - public void addLeftJoin(ViewLeftJoin leftJoin) { - leftJoins.add(leftJoin); + public void addJoin(ViewJoin join) { + joins.add(join); } - public void addInnerJoin(ViewInnerJoin innerJoin) { - innerJoins.add(innerJoin); - } } class LogicalIteration extends Iteration { diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index 879163c3..06516629 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -187,11 +187,11 @@ private static LogicalView prepareLogicalView(Resource ls, String mpath) { }); ls.listProperties(RML.leftJoin).forEach(s -> { - lv.addLeftJoin(prepareLeftJoin(s.getObject().asResource())); + lv.addJoin(prepareLeftJoin(s.getObject().asResource())); }); ls.listProperties(RML.innerJoin).forEach(s -> { - lv.addInnerJoin(prepareInnerJoin(s.getObject().asResource())); + lv.addJoin(prepareInnerJoin(s.getObject().asResource())); }); return lv; From 14b05dcf346fcc56ff4a06cfd1b45268c912f90f Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Wed, 29 Oct 2025 15:14:42 +0100 Subject: [PATCH 24/28] 31/32 of the LV tests pass --- src/main/java/burp/model/LogicalView.java | 26 +- src/main/java/burp/model/ViewInnerJoin.java | 4 - src/main/java/burp/model/ViewJoin.java | 102 +- src/main/java/burp/model/ViewLeftJoin.java | 4 - src/main/java/burp/parse/Parse.java | 97 +- src/main/java/burp/vocabularies/RML.java | 4 +- src/main/resources/shapes/lv-cycle-shapes.ttl | 43 - src/main/resources/shapes/rml-lv/lv.ttl | 30 + src/test/java/burp/TestLV.java | 2 +- .../rml-cc/RMLTC-CC-0001-Alt/README.md | 1 + .../rml-cc/RMLTC-CC-0001-Alt/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0001-Bag/README.md | 1 + .../rml-cc/RMLTC-CC-0001-Bag/mapping.ttl | 3 +- .../rml-cc/RMLTC-CC-0001-List/README.md | 1 + .../rml-cc/RMLTC-CC-0001-List/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0001-Seq/README.md | 1 + .../rml-cc/RMLTC-CC-0001-Seq/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0002-Bag/README.md | 1 + .../rml-cc/RMLTC-CC-0002-Bag/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0002-List/README.md | 1 + .../rml-cc/RMLTC-CC-0002-List/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0003-EB/README.md | 1 + .../rml-cc/RMLTC-CC-0003-EB/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0003-EL-BN/README.md | 1 + .../rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0003-EL-Named/README.md | 1 + .../rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0003-EL/README.md | 1 + .../rml-cc/RMLTC-CC-0003-EL/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0003-NEB/README.md | 1 + .../rml-cc/RMLTC-CC-0003-NEB/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0003-NEL/README.md | 1 + .../rml-cc/RMLTC-CC-0003-NEL/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0003-NELb/README.md | 1 + .../rml-cc/RMLTC-CC-0003-NELb/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0004-SM1/README.md | 1 + .../rml-cc/RMLTC-CC-0004-SM1/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0004-SM2/README.md | 1 + .../rml-cc/RMLTC-CC-0004-SM2/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0004-SM3/README.md | 1 + .../rml-cc/RMLTC-CC-0004-SM3/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0004-SM4/README.md | 1 + .../rml-cc/RMLTC-CC-0004-SM4/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0004-SM5/README.md | 1 + .../rml-cc/RMLTC-CC-0004-SM5/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0005-App1/README.md | 1 + .../rml-cc/RMLTC-CC-0005-App1/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0005-App2/README.md | 1 + .../rml-cc/RMLTC-CC-0005-App2/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0005-Car1/README.md | 1 + .../rml-cc/RMLTC-CC-0005-Car1/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0005-Car2/README.md | 1 + .../rml-cc/RMLTC-CC-0005-Car2/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0006-IT0/README.md | 1 + .../rml-cc/RMLTC-CC-0006-IT0/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0006-IT1/README.md | 1 + .../rml-cc/RMLTC-CC-0006-IT1/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0006-IT2/README.md | 1 + .../rml-cc/RMLTC-CC-0006-IT2/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0006-IT3/README.md | 1 + .../rml-cc/RMLTC-CC-0006-IT3/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0006-IT4/README.md | 1 + .../rml-cc/RMLTC-CC-0006-IT4/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0006-IT5/README.md | 1 + .../rml-cc/RMLTC-CC-0006-IT5/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0007-NES/README.md | 1 + .../rml-cc/RMLTC-CC-0007-NES/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0008-ROMa/README.md | 1 + .../rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl | 3 +- .../rml-cc/RMLTC-CC-0008-ROMb/README.md | 1 + .../rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0009-DUP-Bag/README.md | 1 + .../rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0009-DUP-List/README.md | 1 + .../rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0010-Lista/README.md | 1 + .../rml-cc/RMLTC-CC-0010-Lista/mapping.ttl | 1 + .../rml-cc/RMLTC-CC-0010-Listb/README.md | 1 + .../rml-cc/RMLTC-CC-0010-Listb/mapping.ttl | 1 + .../resources/rml-cc/docs/20250130/index.html | 2158 -------------- .../resources/rml-cc/docs/20250206/index.html | 2158 -------------- .../resources/rml-cc/docs/20250225/index.html | 2472 ----------------- src/test/resources/rml-cc/docs/index.html | 2472 ----------------- .../resources/rml-lv/RMLLVTC0008d/README.md | 39 + .../resources/rml-lv/RMLLVTC0008d/mapping.ttl | 26 + .../resources/rml-lv/RMLLVTC0008d/people.json | 26 + src/test/resources/rml-lv/metadata.csv | 1 + 87 files changed, 375 insertions(+), 9363 deletions(-) delete mode 100644 src/main/java/burp/model/ViewInnerJoin.java delete mode 100644 src/main/java/burp/model/ViewLeftJoin.java delete mode 100644 src/main/resources/shapes/lv-cycle-shapes.ttl delete mode 100644 src/test/resources/rml-cc/docs/20250130/index.html delete mode 100644 src/test/resources/rml-cc/docs/20250206/index.html delete mode 100644 src/test/resources/rml-cc/docs/20250225/index.html delete mode 100644 src/test/resources/rml-cc/docs/index.html create mode 100644 src/test/resources/rml-lv/RMLLVTC0008d/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0008d/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0008d/people.json diff --git a/src/main/java/burp/model/LogicalView.java b/src/main/java/burp/model/LogicalView.java index 36483842..5dec733d 100644 --- a/src/main/java/burp/model/LogicalView.java +++ b/src/main/java/burp/model/LogicalView.java @@ -37,11 +37,8 @@ public Iterator iterator() { iterations = Field.expand(list, expressionFields, iterableFields); for(ViewJoin join : joins) { - // Compute the join. - + iterations = join.expand(iterations); } - - iterations.iterator(); } // Create wrapper to safely treat LogicalIterations as Iterations... @@ -125,7 +122,11 @@ public List getValuesFor(String reference) { @Override public List getStringsFor(String reference) { - return getValuesFor(reference).stream().map(Object::toString).collect(Collectors.toList()); + return getValuesFor(reference) + .stream() + .filter(x -> x != null) + .map(Object::toString) + .collect(Collectors.toList()); } @Override @@ -180,6 +181,9 @@ public LogicalIteration copy() { } public void put(String key, Object o) { + if (map.containsKey(key)) { + throw new RuntimeException("Attribute " + key + " already exists in logical iteration (duplicate names in fields or joins)."); + } map.put(key, o); } @@ -195,4 +199,16 @@ public String getIterationString(String fieldName) { return ((Iteration) o).asString(); return o.toString(); } + + public void retainKeys(List keys) { + // remove all the keys in the map. + map.keySet().retainAll(keys); + } + + public void add(LogicalIteration iteration) { + for(String k : iteration.map.keySet()) { + // Use the Iteration's put instead of the maps to ensure not duplicate fields. + put(k, iteration.map.get(k)); + } + } } \ No newline at end of file diff --git a/src/main/java/burp/model/ViewInnerJoin.java b/src/main/java/burp/model/ViewInnerJoin.java deleted file mode 100644 index f189b522..00000000 --- a/src/main/java/burp/model/ViewInnerJoin.java +++ /dev/null @@ -1,4 +0,0 @@ -package burp.model; - -public class ViewInnerJoin extends ViewJoin { -} diff --git a/src/main/java/burp/model/ViewJoin.java b/src/main/java/burp/model/ViewJoin.java index 7c12031f..81724dbe 100644 --- a/src/main/java/burp/model/ViewJoin.java +++ b/src/main/java/burp/model/ViewJoin.java @@ -2,35 +2,113 @@ import java.util.ArrayList; import java.util.List; +import java.util.Spliterators; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; -public abstract class ViewJoin implements ContainsFields { +public class ViewJoin { public LogicalView parentLogicalView; public List joinConditions = new ArrayList<>(); public List expressionFields = new ArrayList<>(); - public List iterableFields = new ArrayList<>(); + public boolean isInnerJoin = false; - @Override - public List getIterableFields() { - return iterableFields; + private List iterations = null; + + public List expand(List childIterations) { + try { + if (iterations == null) { + // Get logical iterations of parent logical view + iterations = StreamSupport + .stream(Spliterators.spliteratorUnknownSize(parentLogicalView.iterator(), 0), false) + .map(a -> (LogicalIteration) a) + .collect(Collectors.toList()); + } + + List newList = new ArrayList<>(); + + for (LogicalIteration childIteration : childIterations) { + boolean hasACorrespondence = false; + + for(LogicalIteration parentIteration : iterations) { + if(matches(childIteration, parentIteration)) { + hasACorrespondence = true; + + // Create new logical iterations for each value of each expression map + List result = new ArrayList<>(); + result.add(childIteration); + for (ExpressionField e : expressionFields) { + result = enrichForJoin(e, result, parentIteration); + } + + // add all new iterations to the list + newList.addAll(result); + } + } + + // Make the outer join if there is no match + if(!hasACorrespondence && !isInnerJoin) { + LogicalIteration newIteration = childIteration.copy(); + for (ExpressionField e : expressionFields) { + newIteration.put(e.fieldName, null); + newIteration.put(e.fieldName + ".#", null); + } + newList.add(newIteration); + } + } + + return newList; + } catch (Throwable e) { + throw new RuntimeException(e); + } + } + + private List enrichForJoin(ExpressionField e, List result, LogicalIteration parentIteration) { + List nlist = new ArrayList<>(); + + for(LogicalIteration li : result) { + int count = 0; + for (Object o : e.fieldExpressionMap.generateValues(parentIteration)) { + LogicalIteration newLogicalIteration = li.copy(); + newLogicalIteration.put(e.fieldName, o); + newLogicalIteration.put(e.fieldName + ".#", count++); + nlist.add(newLogicalIteration); + } + } + + return nlist; + } + + private boolean matches(LogicalIteration childIteration, LogicalIteration parentIteration) { + // Expression Maps are multi-valued. We thus need + // For each join condition at least one match. + boolean ok = true; + for (JoinCondition jc : joinConditions) { + + List values1 = jc.childMap.generateValues(childIteration); + List values2 = jc.parentMap.generateValues(parentIteration); + + if (values1.stream().distinct().filter(values2::contains) + .collect(Collectors.toSet()).isEmpty()) { + // No match, break. + ok = false; + break; + } + } + return ok; } - @Override public List getExpressionFields() { return expressionFields; } - @Override public void addField(Field field) { field.parent = parentLogicalView; - - if (field instanceof IterableField) { - getIterableFields().add((IterableField) field); - } else if (field instanceof ExpressionField) { + if (field instanceof ExpressionField) { getExpressionFields().add((ExpressionField) field); } else - throw new RuntimeException("Unknown field type."); + throw new RuntimeException("Unknown field type for ViewJoin."); } } diff --git a/src/main/java/burp/model/ViewLeftJoin.java b/src/main/java/burp/model/ViewLeftJoin.java deleted file mode 100644 index 59627033..00000000 --- a/src/main/java/burp/model/ViewLeftJoin.java +++ /dev/null @@ -1,4 +0,0 @@ -package burp.model; - -public class ViewLeftJoin extends ViewJoin { -} diff --git a/src/main/java/burp/parse/Parse.java b/src/main/java/burp/parse/Parse.java index 06516629..31ea5cd3 100644 --- a/src/main/java/burp/parse/Parse.java +++ b/src/main/java/burp/parse/Parse.java @@ -21,14 +21,19 @@ import burp.model.gathermaputil.GatherMapMixin; import burp.vocabularies.RML; import burp.vocabularies.YS; +import org.apache.jena.vocabulary.XSD; public class Parse { static Map triplesmaps = null; static Map logicalviews = null; + private static String mappingPath = null; + private static String currentDirectory = null; + public static List parseMappingFile(String mappingFile) throws Exception { - String mpath = Paths.get(mappingFile).toAbsolutePath().getParent().toString(); + mappingPath = Paths.get(mappingFile).toAbsolutePath().getParent().toString(); + currentDirectory = Paths.get("").toAbsolutePath().toString(); triplesmaps = new HashMap<>(); logicalviews = new HashMap<>(); @@ -49,7 +54,7 @@ public static List parseMappingFile(String mappingFile) throws Excep TriplesMap tm = triplesmaps.computeIfAbsent(r, (x) -> new TriplesMap()); Resource ls = r.getPropertyResourceValue(RML.logicalSource); - tm.logicalSource = prepareLogicalSource(ls, mpath); + tm.logicalSource = prepareLogicalSource(ls); Resource sm = r.getPropertyResourceValue(RML.subjectMap); tm.subjectMap = prepareSubjectMap(sm); @@ -73,7 +78,6 @@ private static boolean isValid(Model mapping) { //core.read(Parse.class.getResourceAsStream("/shapes/rml-io/io.ttl"), "urn:dummy", FileUtils.langTurtle); //core.read(Parse.class.getResourceAsStream("/shapes/rml-fnml/fnml.ttl"), "urn:dummy", FileUtils.langTurtle); core.read(Parse.class.getResourceAsStream("/shapes/rml-lv/lv.ttl"), "urn:dummy", FileUtils.langTurtle); - core.read(Parse.class.getResourceAsStream("/shapes/lv-cycle-shapes.ttl"), "urn:dummy", FileUtils.langTurtle); //core.read(Parse.class.getResourceAsStream("/shapes/rml-star/star.ttl"), "urn:dummy", FileUtils.langTurtle); ValidationReport report = ShaclValidator.get().validate(core.getGraph(), mapping.getGraph()); @@ -132,38 +136,40 @@ private static void normalizeConstants(Model mapping) { mapping.add(QueryExecutionFactory.create(IMPLICITTERMTYPE, mapping).execConstruct()); } - private static AbstractLogicalSource prepareLogicalSource(Resource ls, String mpath) throws Exception { + private static AbstractLogicalSource prepareLogicalSource(Resource ls) throws Exception { // This is RML-LV if(ls.hasProperty(RML.viewOn)) { - return prepareLogicalView(ls, mpath); + return prepareLogicalView(ls); } // This is RML-CORE Resource referenceFormulation = ls.getPropertyResourceValue(RML.referenceFormulation); + // The path is by default the current working directory + String sourcePath = getSourcePath(ls); + LogicalSource s = null; if (RML.JSONPath.equals(referenceFormulation)) - s = LogicalSourceFactory.createJSONSource(ls, mpath); - + s = LogicalSourceFactory.createJSONSource(ls, sourcePath); // This is RML-IO else if (RML.CSV.equals(referenceFormulation)) - s = LogicalSourceFactory.createCSVSource(ls, mpath); + s = LogicalSourceFactory.createCSVSource(ls, sourcePath); else if (RML.XPath.equals(referenceFormulation)) - s = LogicalSourceFactory.createXMLSource(ls, mpath); + s = LogicalSourceFactory.createXMLSource(ls, sourcePath); else if (referenceFormulation.hasProperty(RDF.type, RML.XPathReferenceFormulation)) - s = LogicalSourceFactory.createXMLSource(ls, mpath); + s = LogicalSourceFactory.createXMLSource(ls, sourcePath); else if (RML.SQL2008Table.equals(referenceFormulation)) - s = LogicalSourceFactory.createSQL2008TableSource(ls, mpath); + s = LogicalSourceFactory.createSQL2008TableSource(ls, sourcePath); else if (RML.SQL2008Query.equals(referenceFormulation)) - s = LogicalSourceFactory.createSQL2008QuerySource(ls, mpath); + s = LogicalSourceFactory.createSQL2008QuerySource(ls, sourcePath); else if (RML.SPARQL_Results_CSV.equals(referenceFormulation)) - s = LogicalSourceFactory.createSPARQLSource(ls, mpath, false); + s = LogicalSourceFactory.createSPARQLSource(ls, sourcePath, false); else if (RML.SPARQL_Results_TSV.equals(referenceFormulation)) - s = LogicalSourceFactory.createSPARQLSource(ls, mpath, true); + s = LogicalSourceFactory.createSPARQLSource(ls, sourcePath, true); else if (RML.SPARQL_Results_XML.equals(referenceFormulation)) - s = LogicalSourceFactory.createSPARQLSource(ls, mpath, false); + s = LogicalSourceFactory.createSPARQLSource(ls, sourcePath, false); else if (RML.SPARQL_Results_JSON.equals(referenceFormulation)) - s = LogicalSourceFactory.createSPARQLSource(ls, mpath, false); + s = LogicalSourceFactory.createSPARQLSource(ls, sourcePath, false); if (referenceFormulation.hasProperty(RDF.type, YS.NetconfQuerySource)) s = LogicalSourceFactory.createNetconfQuerySource(ls); @@ -175,12 +181,41 @@ else if (RML.SPARQL_Results_JSON.equals(referenceFormulation)) throw new Exception("Reference formulation not (yet) supported."); } - private static LogicalView prepareLogicalView(Resource ls, String mpath) { + private static String getSourcePath(Resource ls) { + String sourcePath = currentDirectory; + Statement statement = ls.getPropertyResourceValue(RML.source).getProperty(RML.root); + if(statement != null) { + if(statement.getObject().isResource()) { + if(RML.MappingDirectory.equals(statement.getObject())) { + sourcePath = mappingPath; + } else if(RML.CurrentWorkingDirectory.equals(statement.getObject())) { + // ignore, by default sourcePath + } else + throw new RuntimeException("Invalid resource for rml:root " + statement.getObject()); + } else { + Literal l = statement.getLiteral(); + if(l.getLanguage() != null) + throw new RuntimeException("rml:root must be a plain literal or string " + l); + + if(l.getDatatype() != null && XSD.xstring.equals(l.getDatatype())) + throw new RuntimeException("rml:root must be a plain literal or string " + l); + + String path = l.getString(); + if (Paths.get(path).isAbsolute()) + sourcePath = path; + else + throw new RuntimeException("Unsupported path: " + path + ". Is it absolute?"); + } + } + return sourcePath; + } + + private static LogicalView prepareLogicalView(Resource ls) { try { Resource view = ls.getPropertyResourceValue(RML.viewOn); LogicalView lv = logicalviews.computeIfAbsent(ls, (x) -> new LogicalView()); - lv.logicalSource = prepareLogicalSource(view, mpath); + lv.logicalSource = prepareLogicalSource(view); ls.listProperties(RML.field).forEach(s -> { lv.addField(prepareField(s.getObject().asResource())); @@ -200,22 +235,22 @@ private static LogicalView prepareLogicalView(Resource ls, String mpath) { } } - private static ViewLeftJoin prepareLeftJoin(Resource resource) { - ViewLeftJoin join = new ViewLeftJoin(); - prepareViewJoin(join, resource); - return join; + private static ViewJoin prepareLeftJoin(Resource resource) { + return prepareViewJoin(false, resource); + } + + private static ViewJoin prepareInnerJoin(Resource resource) { + return prepareViewJoin(true, resource); } - private static ViewInnerJoin prepareInnerJoin(Resource resource) { - ViewInnerJoin join = new ViewInnerJoin(); - prepareViewJoin(join, resource); - return join; } + private static ViewJoin prepareViewJoin(boolean isInnerJoin, Resource resource) { + ViewJoin viewJoin = new ViewJoin(); + viewJoin.isInnerJoin = isInnerJoin; - private static void prepareViewJoin(ViewJoin viewJoin, Resource resource) { Resource plv = resource.getRequiredProperty(RML.parentLogicalView).getObject().asResource(); - viewJoin.parentLogicalView = prepareLogicalView(plv, null); + viewJoin.parentLogicalView = prepareLogicalView(plv); - plv.listProperties(RML.joinCondition).forEach((s) -> { + resource.listProperties(RML.joinCondition).forEach((s) -> { JoinCondition jc = new JoinCondition(); Resource jcr = s.getObject().asResource(); @@ -231,10 +266,12 @@ private static void prepareViewJoin(ViewJoin viewJoin, Resource resource) { viewJoin.joinConditions.add(jc); }); - plv.listProperties(RML.field).forEach(s -> { + // We need the fields on the Logical View Join + resource.listProperties(RML.field).forEach(s -> { viewJoin.addField(prepareField(s.getObject().asResource())); }); + return viewJoin; } private static SubjectMap prepareSubjectMap(Resource sm) { diff --git a/src/main/java/burp/vocabularies/RML.java b/src/main/java/burp/vocabularies/RML.java index 69c88d51..c4d77e6b 100644 --- a/src/main/java/burp/vocabularies/RML.java +++ b/src/main/java/burp/vocabularies/RML.java @@ -19,12 +19,12 @@ public final class RML { public static final Resource CSV = ResourceFactory.createResource(NS + "CSV"); public static final Resource JSONPath = ResourceFactory.createResource(NS + "JSONPath"); public static final Resource MappingDirectory = ResourceFactory.createResource(NS + "MappingDirectory"); - public static final Resource CurrentWorkingDirectory = ResourceFactory.createResource(NS + "CurrentWorkingDirectory"); + public static final Resource CurrentWorkingDirectory = ResourceFactory.createResource(NS + "CurrentWorkingDirectory"); public static final Resource Namespace = ResourceFactory.createResource(NS + "Namespace"); public static final Resource RelativePathSource = ResourceFactory.createResource(NS + "RelativePathSource"); public static final Resource SQL2008Table = ResourceFactory.createResource(NS + "SQL2008Table"); public static final Resource SQL2008Query = ResourceFactory.createResource(NS + "SQL2008Query"); - public static final Resource XPath = ResourceFactory.createResource(NS + "XPath"); + public static final Resource XPath = ResourceFactory.createResource(NS + "XPath"); public static final Resource XPathReferenceFormulation = ResourceFactory.createResource(NS + "XPathReferenceFormulation"); public static final Resource append = ResourceFactory.createResource(NS + "append"); diff --git a/src/main/resources/shapes/lv-cycle-shapes.ttl b/src/main/resources/shapes/lv-cycle-shapes.ttl deleted file mode 100644 index cabe3bdb..00000000 --- a/src/main/resources/shapes/lv-cycle-shapes.ttl +++ /dev/null @@ -1,43 +0,0 @@ -@prefix owl: . -@prefix rml: . -@prefix rmlsh: . -@prefix sh: . -@prefix xsd: . -@prefix rdfs: . - - a owl:Ontology ; - owl:imports ; -. - -rmlsh:parentCyclesShape a sh:NodeShape ; - sh:targetSubjectsOf rml:viewOn ; - sh:targetSubjectsOf rml:field ; - - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "There must be no cycles via rml:viewOn or rml:Field." ; - sh:select """ - PREFIX rml: - SELECT ?this - WHERE { - ?this a rml:LogicalView . - ?this (rml:viewOn|rml:field)+ ?this . - } - """ ; - ] . - -rmlsh:joinCyclesShape a sh:NodeShape ; - sh:targetSubjectsOf rml:viewOn ; - - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "There must be no cycles via rml:viewOn and rml:leftJoin or rml:innerJoin." ; - sh:select """ - PREFIX rml: - SELECT ?this - WHERE { - ?this a rml:LogicalView . - ?this ((rml:leftJoin|rml:innerJoin)/rml:parentLogicalView)+ ?this . - } - """ ; - ] . \ No newline at end of file diff --git a/src/main/resources/shapes/rml-lv/lv.ttl b/src/main/resources/shapes/rml-lv/lv.ttl index 6431da2c..31a23bea 100644 --- a/src/main/resources/shapes/rml-lv/lv.ttl +++ b/src/main/resources/shapes/rml-lv/lv.ttl @@ -312,3 +312,33 @@ rmlsh:InclusionAnnotationShape a sh:NodeShape; sh:maxCount 1 ; sh:nodeKind sh:BlankNodeOrIRI ; ] . + +rmlsh:parentCyclesShape a sh:NodeShape ; + sh:targetSubjectsOf rml:viewOn ; + sh:targetSubjectsOf rml:field ; + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "There must be no cycles via rml:viewOn or rml:Field." ; + sh:select """ + PREFIX rml: + SELECT ?this + WHERE { + ?this (rml:viewOn|rml:field)+ ?this . + } + """ ; + ] . + +rmlsh:joinCyclesShape a sh:NodeShape ; + sh:targetSubjectsOf rml:viewOn ; + sh:sparql [ + a sh:SPARQLConstraint ; + sh:message "There must be no cycles via rml:viewOn and rml:leftJoin or rml:innerJoin." ; + sh:select """ + PREFIX rml: + SELECT ?this + WHERE { + ?this a rml:LogicalView . + ?this ((rml:leftJoin|rml:innerJoin)/rml:parentLogicalView)+ ?this . + } + """ ; + ] . diff --git a/src/test/java/burp/TestLV.java b/src/test/java/burp/TestLV.java index e8183e9d..5f55a90b 100644 --- a/src/test/java/burp/TestLV.java +++ b/src/test/java/burp/TestLV.java @@ -10,7 +10,7 @@ public class TestLV { public static void main(String[] args) throws Exception { - String m = new File("./src/test/resources/rml-lv/RMLLVTC0006a/", "mapping.ttl").getAbsolutePath(); + String m = new File("./src/test/resources/rml-lv/RMLLVTC0006f/", "mapping.ttl").getAbsolutePath(); String r = Files.createTempFile(null, ".nq").toString(); args = new String[] { "-m", m, "-o", r, "-b", "http://example.com/base/" }; BURPConfiguration conf = new BURPConfiguration(args); diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md index 52ddf5a4..6b110ead 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl index a72409e0..fb1f6e89 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Alt/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md index 22d00ea8..8309c961 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl index 20d9348f..8bf02922 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Bag/mapping.ttl @@ -7,7 +7,7 @@ rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; - rml:iterator "$.*" ; + rml:iterator "$.*" ; ] ; rml:subjectMap [ @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md index bf4ab396..7c21fa39 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl index ca963e35..ffbf2cec 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-List/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md index e9b1bf21..68cc437a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl index 2117ebdb..da985a37 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0001-Seq/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md index 287d8936..5aa2713e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl index 9924fa09..6507a491 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-Bag/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md index 332832f9..dd6742d3 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl index 77149652..2834aaaa 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0002-List/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md index f9fdbb84..d257592d 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/README.md @@ -20,6 +20,7 @@ rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; + rml:root rml:MappingDirectory; rml:iterator "$.*" ; ] ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl index 7ed744a7..1259a80e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EB/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md index e809d696..ff6c4ab5 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/README.md @@ -39,6 +39,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl index a3545827..85986916 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-BN/mapping.ttl @@ -26,4 +26,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md index 49893b9b..1611e961 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/README.md @@ -39,6 +39,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl index 8bed79e7..5d62c54d 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL-Named/mapping.ttl @@ -26,4 +26,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md index 27928980..2ed674ec 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl index 87f8919e..8959a20b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-EL/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md index bbdfd65d..2f96aef4 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl index 20d9348f..13550573 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEB/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md index b6d1a3d1..ecc12fa5 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/README.md @@ -20,6 +20,7 @@ rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; + rml:root rml:MappingDirectory; rml:iterator "$.*" ; ] ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl index ca963e35..ffbf2cec 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NEL/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md index 51262015..153a4c16 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/README.md @@ -20,6 +20,7 @@ rml:logicalSource [ rml:source _:b738439 ; rml:referenceFormulation rml:JSONPath ; + rml:root rml:MappingDirectory; rml:iterator "$.*" ; ] ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl index 6da934ad..9e10e7c0 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0003-NELb/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md index 33d9a508..b4098f57 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/README.md @@ -35,6 +35,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl index 19eee717..8a207be6 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM1/mapping.ttl @@ -22,4 +22,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md index a2a54a71..c778fd07 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/README.md @@ -30,6 +30,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl index b0db209a..300ba48e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM2/mapping.ttl @@ -17,4 +17,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md index ef82ce64..a72b8cbf 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/README.md @@ -30,6 +30,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl index b0db209a..300ba48e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM3/mapping.ttl @@ -17,4 +17,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md index d3c43302..da8bc19a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/README.md @@ -35,6 +35,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl index a6f85e5e..3764abc9 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM4/mapping.ttl @@ -22,4 +22,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md index df0571be..8de8029f 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/README.md @@ -30,6 +30,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl index b8cbc6a9..5d7b726b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0004-SM5/mapping.ttl @@ -17,4 +17,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md index d33ee77c..3cb40aef 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl index b8b8b2f4..4bfc3c7b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App1/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md index b2d8ef6b..26329ad4 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl index b8b8b2f4..4bfc3c7b 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-App2/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md index a135240f..13c4bc27 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl index 6a91a0db..5943fd14 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car1/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md index 0b98d32c..12f44483 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl index 6a91a0db..5943fd14 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0005-Car2/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md index 8d6caf6e..b2893951 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl index 0a156f5c..7e1153f8 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT0/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md index 81bf7f13..6e71ce3a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl index 847277ca..cff5777c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT1/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md index aed94f81..a567edfa 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl index 14e90fed..277f7861 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT2/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md index 4dac7a04..e6b63cda 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl index 09f6a13d..0b312b93 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT3/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md index 8478c6ae..ff56fc15 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl index e47599b5..5f290596 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT4/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md index 7cd91a0e..1faa54ec 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl index fbd5b088..b55d7e3e 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0006-IT5/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md index 4d660585..5f31f93c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/README.md @@ -46,6 +46,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl index 98d2787a..7823b659 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0007-NES/mapping.ttl @@ -33,4 +33,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/README.md b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/README.md index 85bb6794..5f400157 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/README.md @@ -16,6 +16,7 @@ @prefix rdf: . _:b273446 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "student.csv" . a rml:TriplesMap ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl index 26953922..26803c21 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMa/mapping.ttl @@ -3,7 +3,8 @@ @prefix rdf: . _:b273446 a rml:RelativePathSource ; - rml:path "student.csv" . + rml:root rml:MappingDirectory ; + rml:path "student.csv" . a rml:TriplesMap ; rml:logicalSource [ a rml:LogicalSource ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/README.md index 2dfdba69..8b5690af 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/README.md @@ -16,6 +16,7 @@ @prefix rdf: . _:b273446 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "student.csv" . a rml:TriplesMap ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl index b1ce8c6c..e6707b77 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0008-ROMb/mapping.ttl @@ -3,6 +3,7 @@ @prefix rdf: . _:b273446 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "student.csv" . a rml:TriplesMap ; diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md index 68ed8977..5a486a88 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl index 20d9348f..13550573 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-Bag/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md index 388c4ac2..2b54356c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/README.md @@ -37,6 +37,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl index ca963e35..ffbf2cec 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0009-DUP-List/mapping.ttl @@ -24,4 +24,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md index c4c65e88..0a626168 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/README.md @@ -38,6 +38,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl index 1dd36510..64d5279c 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Lista/mapping.ttl @@ -25,4 +25,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md index ad67043f..08f434a3 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/README.md @@ -39,6 +39,7 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . ``` diff --git a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl index 230573f4..4131f96a 100644 --- a/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl +++ b/src/test/resources/rml-cc/RMLTC-CC-0010-Listb/mapping.ttl @@ -26,4 +26,5 @@ . _:b738439 a rml:RelativePathSource ; + rml:root rml:MappingDirectory ; rml:path "data.json" . \ No newline at end of file diff --git a/src/test/resources/rml-cc/docs/20250130/index.html b/src/test/resources/rml-cc/docs/20250130/index.html deleted file mode 100644 index 27f834b9..00000000 --- a/src/test/resources/rml-cc/docs/20250130/index.html +++ /dev/null @@ -1,2158 +0,0 @@ - - - - - - -RML-CC: Test Cases - - - - - - - - - - - - - - -
- -

RML-CC: Test Cases

-

- Draft Community Group Report - -

-
- -
Latest published version:
- https://www.w3.org/RML-CC-Testcases/ -
-
Latest editor's draft:
https://w3id.org/rml/cc/test-cases/
- - - - -
Editor:
- Dylan Van Assche - - - - (IDLab – Ghent University – imec) -
- -
Author:
- Dylan Van Assche - - - - (IDLab – Ghent University – imec) -
-
Feedback:
- GitHub kg-construct/rml-cc - (pull requests, - new issue, - open issues) -
- -
- - -
-
- - - -

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

-
- -

Status of This Document

- This specification was published by the - Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it - on the W3C Standards Track. - - Please note that under the - W3C Community Contributor License Agreement (CLA) - there is a limited opt-out and other conditions apply. - - Learn more about - W3C Community and Business Groups. -

- GitHub Issues are preferred for - discussion of this specification. - - -

- -

1. Introduction

-

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). -The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

-
- -

2. Data model

-

The test cases are semantically described for re-usability and shareability following the W3C Test case description. -Each test:Testcase as the following properties:

-
    -
  • dcterms:identifier: unique ID of the test case.
  • -
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • -
  • rmltest:input: One or more input data of the test case.
  • -
  • rmltest:output: One or more output data of the test case.
  • -
  • rmltest:inputFormat: the input data format.
  • -
  • rmltest:outputFormat: the output data format.
  • -
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • -
-
- -

3. Test cases

-

This section describes the RML-CC test cases. These descriptions are also available as RDF. -The files are available on GitHub in the folder test-cases. -Each test case is contained in a single folder, containing three types of files:

-
    -
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • -
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • -
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • -
-
- - -

4. RMLTC-CC-0001-Alt

-

Title: Generate a rdf:Alt as an object

-

Description: Tests if a rdf:Alt is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Alt ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-
-
-

5. RMLTC-CC-0001-Bag

-

Title: Generate a rdf:Bag as an object

-

Description: Tests if a rdf:Bag is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

6. RMLTC-CC-0001-List

-

Title: Generate a rdf:List as an object

-

Description: Tests if a rdf:List is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

7. RMLTC-CC-0001-Seq

-

Title: Generate a rdf:Seq as an object

-

Description: Tests if a rdf:Seq is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Seq ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

8. RMLTC-CC-0002-Bag

-

Title: Generate a named rdf:Bag as an object

-

Description: Tests if a named rdf:Bag is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-
-
-

9. RMLTC-CC-0002-List

-

Title: Generate a named rdf:List as an object

-

Description: Tests if a named rdf:List is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
-<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
-_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
-_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
-_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
-_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

10. RMLTC-CC-0003-EB

-

Title: Allow the generation of empty bags

-

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-
-

11. RMLTC-CC-0003-EL

-

Title: Allow the generation of empty lists

-

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

12. RMLTC-CC-0003-NEB

-

Title: Empty bags are not generated

-

Description: Tests if empty containers are not generated (expected default behavior).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-
-
-

13. RMLTC-CC-0003-NEL

-

Title: Empty lists are not generated

-

Description: Tests if empty lists are not generated (expected default behavior).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
-_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-
-
-

14. RMLTC-CC-0003-NELb

-

Title: Empty lists are not generated II

-

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer false ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
-_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-
-
-

15. RMLTC-CC-0004-SM1

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:createdBy ;
-        rml:object ex:JohnDoe ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

16. RMLTC-CC-0004-SM2

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

17. RMLTC-CC-0004-SM3

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

18. RMLTC-CC-0004-SM4

-

Title: GatherMap in subject map (bag)

-

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:Bag ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:createdBy ;
-        rml:object ex:JohnDoe ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-
-
-

19. RMLTC-CC-0004-SM5

-

Title: GatherMap in subject map (bag)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:Bag ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-
-

20. RMLTC-CC-0005-App1

-

Title: Append values of multiple term maps

-

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

21. RMLTC-CC-0005-App2

-

Title: Append values of multiple term maps

-

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
-_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
-_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
-_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
-_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
-_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
-_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
-_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-
-
-

22. RMLTC-CC-0005-Car1

-

Title: Cartesian product of values from multiple term maps of a gather map.

-

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-            rml:strategy rml:cartesianProduct ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
-_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
-_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
-_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
-_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

23. RMLTC-CC-0005-Car2

-

Title: Cartesian product of values from multiple term maps of a gather map.

-

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-            rml:strategy rml:cartesianProduct ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

24. RMLTC-CC-0006-IT0

-

Title: Gather values accross iterations.

-

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection or container.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

25. RMLTC-CC-0006-IT1

-

Title: Gather values accross iterations.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
-_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
-_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
-_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
-_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

26. RMLTC-CC-0006-IT2

-

Title: Gather values accross iterations.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
-_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
-_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
-_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
-_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
-_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
-_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
-_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
-_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
-_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
-_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
-_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

27. RMLTC-CC-0007-NES

-

Title: Nested gather maps

-

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather (
-                [
-                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-                    rml:gatherAs rdf:Bag ;
-                ]
-                [
-                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
-                    rml:gatherAs rdf:Bag ;
-                ]
-            ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
-
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-
-_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
-_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
-_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
-
-_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
-_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
-_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
-_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
-
-_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
-_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-
-

28. RMLTC-CC-0008-ROMa

-

Title:

-

Description:

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

-

Mapping

-
@prefix ex: <http://example.com/> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-
-_:b273446 a rml:RelativePathSource ;
-    rml:path "student.csv" .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
-    rml:logicalSource [ a rml:LogicalSource ;
-            rml:referenceFormulation rml:CSV ;
-            rml:source _:b273446 ] ;
-            
-    rml:predicateObjectMap [ 
-        rml:objectMap [
-                rml:reference "ID" ; rml:termType rml:BlankNode ;
-                rml:gather ( 
-                    [ 
-                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
-                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
-                    ] 
-                ) ;
-                rml:gatherAs rdf:List;
-            ] ;    
-        rml:predicate ex:sameSportAs 
-    ] ;
-
-    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
-_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
-_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
-_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
-
-
-

29. RMLTC-CC-0008-ROMb

-

Title:

-

Description:

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

-

Mapping

-
@prefix ex: <http://example.com/> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-
-_:b273446 a rml:RelativePathSource ;
-    rml:path "student.csv" .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
-    rml:logicalSource [ a rml:LogicalSource ;
-            rml:referenceFormulation rml:CSV ;
-            rml:source _:b273446 ] ;
-            
-    rml:predicateObjectMap [
-        rml:objectMap [
-            rml:reference "ID" ; rml:termType rml:BlankNode ;
-            rml:gather ( 
-                [ 
-                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
-                ] 
-            ) ;
-            rml:gatherAs rdf:List;
-        ] ;
-        rml:predicate ex:sameSportAs 
-    ] ;
-        
-    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
-
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
-
-
-

30. RMLTC-CC-0009-DUP-Bag

-

Title:

-

Description:

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

31. RMLTC-CC-0009-DUP-List

-

Title:

-

Description:

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

32. RMLTC-CC-0010-Lista

-

Title:

-

Description:

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
-
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
-
-
-

33. RMLTC-CC-0010-Listb

-

Title:

-

Description:

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
-
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
-
-
- - - - - diff --git a/src/test/resources/rml-cc/docs/20250206/index.html b/src/test/resources/rml-cc/docs/20250206/index.html deleted file mode 100644 index abe1c494..00000000 --- a/src/test/resources/rml-cc/docs/20250206/index.html +++ /dev/null @@ -1,2158 +0,0 @@ - - - - - - -RML-CC: Test Cases - - - - - - - - - - - - - - -
- -

RML-CC: Test Cases

-

- Draft Community Group Report - -

-
- -
Latest published version:
- https://www.w3.org/RML-CC-Testcases/ -
-
Latest editor's draft:
https://w3id.org/rml/cc/test-cases/
- - - - -
Editor:
- Dylan Van Assche - - - - (IDLab – Ghent University – imec) -
- -
Author:
- Dylan Van Assche - - - - (IDLab – Ghent University – imec) -
-
Feedback:
- GitHub kg-construct/rml-cc - (pull requests, - new issue, - open issues) -
- -
- - -
-
- - - -

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

-
- -

Status of This Document

- This specification was published by the - Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it - on the W3C Standards Track. - - Please note that under the - W3C Community Contributor License Agreement (CLA) - there is a limited opt-out and other conditions apply. - - Learn more about - W3C Community and Business Groups. -

- GitHub Issues are preferred for - discussion of this specification. - - -

- -

1. Introduction

-

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). -The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

-
- -

2. Data model

-

The test cases are semantically described for re-usability and shareability following the W3C Test case description. -Each test:Testcase as the following properties:

-
    -
  • dcterms:identifier: unique ID of the test case.
  • -
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • -
  • rmltest:input: One or more input data of the test case.
  • -
  • rmltest:output: One or more output data of the test case.
  • -
  • rmltest:inputFormat: the input data format.
  • -
  • rmltest:outputFormat: the output data format.
  • -
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • -
-
- -

3. Test cases

-

This section describes the RML-CC test cases. These descriptions are also available as RDF. -The files are available on GitHub in the folder test-cases. -Each test case is contained in a single folder, containing three types of files:

-
    -
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • -
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • -
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • -
-
- - -

4. RMLTC-CC-0001-Alt

-

Title: Generate a rdf:Alt as an object

-

Description: Tests if a rdf:Alt is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Alt ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-
-
-

5. RMLTC-CC-0001-Bag

-

Title: Generate a rdf:Bag as an object

-

Description: Tests if a rdf:Bag is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

6. RMLTC-CC-0001-List

-

Title: Generate a rdf:List as an object

-

Description: Tests if a rdf:List is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

7. RMLTC-CC-0001-Seq

-

Title: Generate a rdf:Seq as an object

-

Description: Tests if a rdf:Seq is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Seq ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

8. RMLTC-CC-0002-Bag

-

Title: Generate a named rdf:Bag as an object

-

Description: Tests if a named rdf:Bag is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-
-
-

9. RMLTC-CC-0002-List

-

Title: Generate a named rdf:List as an object

-

Description: Tests if a named rdf:List is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
-<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
-_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
-_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
-_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
-_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

10. RMLTC-CC-0003-EB

-

Title: Allow the generation of empty bags

-

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-
-

11. RMLTC-CC-0003-EL

-

Title: Allow the generation of empty lists

-

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

12. RMLTC-CC-0003-NEB

-

Title: Empty bags are not generated

-

Description: Tests if empty containers are not generated (expected default behavior).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-
-
-

13. RMLTC-CC-0003-NEL

-

Title: Empty lists are not generated

-

Description: Tests if empty lists are not generated (expected default behavior).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
-_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-
-
-

14. RMLTC-CC-0003-NELb

-

Title: Empty lists are not generated II

-

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer false ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
-_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-
-
-

15. RMLTC-CC-0004-SM1

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:createdBy ;
-        rml:object ex:JohnDoe ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

16. RMLTC-CC-0004-SM2

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

17. RMLTC-CC-0004-SM3

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

18. RMLTC-CC-0004-SM4

-

Title: GatherMap in subject map (bag)

-

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:Bag ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:createdBy ;
-        rml:object ex:JohnDoe ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-
-
-

19. RMLTC-CC-0004-SM5

-

Title: GatherMap in subject map (bag)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:Bag ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-
-

20. RMLTC-CC-0005-App1

-

Title: Append values of multiple term maps

-

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

21. RMLTC-CC-0005-App2

-

Title: Append values of multiple term maps

-

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
-_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
-_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
-_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
-_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
-_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
-_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
-_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-
-
-

22. RMLTC-CC-0005-Car1

-

Title: Cartesian product of values from multiple term maps of a gather map.

-

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-            rml:strategy rml:cartesianProduct ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
-_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
-_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
-_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
-_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

23. RMLTC-CC-0005-Car2

-

Title: Cartesian product of values from multiple term maps of a gather map.

-

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-            rml:strategy rml:cartesianProduct ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

24. RMLTC-CC-0006-IT0

-

Title: Gather values accross iterations.

-

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection or container.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

25. RMLTC-CC-0006-IT1

-

Title: Gather values accross iterations.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
-_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
-_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
-_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
-_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

26. RMLTC-CC-0006-IT2

-

Title: Gather values accross iterations.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
-_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
-_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
-_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
-_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
-_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
-_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
-_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
-_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
-_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
-_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
-_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

27. RMLTC-CC-0007-NES

-

Title: Nested gather maps

-

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather (
-                [
-                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-                    rml:gatherAs rdf:Bag ;
-                ]
-                [
-                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
-                    rml:gatherAs rdf:Bag ;
-                ]
-            ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
-
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-
-_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
-_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
-_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
-
-_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
-_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
-_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
-_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
-
-_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
-_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-
-

28. RMLTC-CC-0008-ROMa

-

Title: Elements via reference object-map.

-

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

-

Mapping

-
@prefix ex: <http://example.com/> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-
-_:b273446 a rml:RelativePathSource ;
-    rml:path "student.csv" .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
-    rml:logicalSource [ a rml:LogicalSource ;
-            rml:referenceFormulation rml:CSV ;
-            rml:source _:b273446 ] ;
-            
-    rml:predicateObjectMap [ 
-        rml:objectMap [
-                rml:reference "ID" ; rml:termType rml:BlankNode ;
-                rml:gather ( 
-                    [ 
-                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
-                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
-                    ] 
-                ) ;
-                rml:gatherAs rdf:List;
-            ] ;    
-        rml:predicate ex:sameSportAs 
-    ] ;
-
-    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
-_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
-_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
-_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
-
-
-

29. RMLTC-CC-0008-ROMb

-

Title: Elements via reference object-map with default join condition

-

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

-

Mapping

-
@prefix ex: <http://example.com/> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-
-_:b273446 a rml:RelativePathSource ;
-    rml:path "student.csv" .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
-    rml:logicalSource [ a rml:LogicalSource ;
-            rml:referenceFormulation rml:CSV ;
-            rml:source _:b273446 ] ;
-            
-    rml:predicateObjectMap [
-        rml:objectMap [
-            rml:reference "ID" ; rml:termType rml:BlankNode ;
-            rml:gather ( 
-                [ 
-                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
-                ] 
-            ) ;
-            rml:gatherAs rdf:List;
-        ] ;
-        rml:predicate ex:sameSportAs 
-    ] ;
-        
-    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
-
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
-
-
-

30. RMLTC-CC-0009-DUP-Bag

-

Title: Gather duplicate values in an RDF Bag

-

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

31. RMLTC-CC-0009-DUP-List

-

Title: Gather duplicate values in an RDF List

-

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

32. RMLTC-CC-0010-Lista

-

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

-

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
-
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
-
-
-

33. RMLTC-CC-0010-Listb

-

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

-

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
-
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
-
-
- - - - - \ No newline at end of file diff --git a/src/test/resources/rml-cc/docs/20250225/index.html b/src/test/resources/rml-cc/docs/20250225/index.html deleted file mode 100644 index cfe40fdb..00000000 --- a/src/test/resources/rml-cc/docs/20250225/index.html +++ /dev/null @@ -1,2472 +0,0 @@ - - - - - - -RML-CC: Test Cases - - - - - - - - - - - - - - - - - - -

Abstract

This document describes the [RML] vocabulary and approach to generating RDF containers and collections [RDF11-Concepts].

-
- -

Status of This Document

- This specification was published by the - Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it - on the W3C Standards Track. - - Please note that under the - W3C Community Contributor License Agreement (CLA) - there is a limited opt-out and other conditions apply. - - Learn more about - W3C Community and Business Groups. -

- -

1. Introduction

-

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). -The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

-
- -

2. Data model

-

The test cases are semantically described for re-usability and shareability following the W3C Test case description. -Each test:Testcase as the following properties:

-
    -
  • dcterms:identifier: unique ID of the test case.
  • -
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • -
  • rmltest:input: One or more input data of the test case.
  • -
  • rmltest:output: One or more output data of the test case.
  • -
  • rmltest:inputFormat: the input data format.
  • -
  • rmltest:outputFormat: the output data format.
  • -
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • -
-
- -

3. Test cases

-

This section describes the RML-CC test cases. These descriptions are also available as RDF. -The files are available on GitHub in the folder test-cases. -Each test case is contained in a single folder, containing three types of files:

-
    -
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • -
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • -
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • -
-
- - -

4. RMLTC-CC-0001-Alt

-

Title: Generate a rdf:Alt as an object

-

Description: Tests if a rdf:Alt is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Alt ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-
-
-

5. RMLTC-CC-0001-Bag

-

Title: Generate a rdf:Bag as an object

-

Description: Tests if a rdf:Bag is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

6. RMLTC-CC-0001-List

-

Title: Generate a rdf:List as an object

-

Description: Tests if a rdf:List is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

7. RMLTC-CC-0001-Seq

-

Title: Generate a rdf:Seq as an object

-

Description: Tests if a rdf:Seq is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Seq ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

8. RMLTC-CC-0002-Bag

-

Title: Generate a named rdf:Bag as an object

-

Description: Tests if a named rdf:Bag is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-
-
-

9. RMLTC-CC-0002-List

-

Title: Generate a named rdf:List as an object

-

Description: Tests if a named rdf:List is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
-<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
-_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
-_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
-_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
-_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

10. RMLTC-CC-0003-EB

-

Title: Allow the generation of empty bags

-

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-
-

11. RMLTC-CC-0003-EL

-

Title: Allow the generation of empty lists

-

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

12. RMLTC-CC-0003-EL-BN

-

Title: Allow the generation of empty lists identified by blank node identifiers.

-

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ; rml:termType rml:BlankNode ;
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

13. RMLTC-CC-0003-EL-Named

-

Title: Allow the generation of empty lists identified by IRIs.

-

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

14. RMLTC-CC-0003-NEB

-

Title: Empty bags are not generated

-

Description: Tests if empty containers are not generated (expected default behavior).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-
-
-

15. RMLTC-CC-0003-NEL

-

Title: Empty lists are not generated

-

Description: Tests if empty lists are not generated (expected default behavior).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
-_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-
-
-

16. RMLTC-CC-0003-NELb

-

Title: Empty lists are not generated II

-

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer false ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
-_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-
-
-

17. RMLTC-CC-0004-SM1

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:createdBy ;
-        rml:object ex:JohnDoe ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

18. RMLTC-CC-0004-SM2

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

19. RMLTC-CC-0004-SM3

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

20. RMLTC-CC-0004-SM4

-

Title: GatherMap in subject map (bag)

-

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:Bag ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:createdBy ;
-        rml:object ex:JohnDoe ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-
-
-

21. RMLTC-CC-0004-SM5

-

Title: GatherMap in subject map (bag)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:Bag ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-
-

22. RMLTC-CC-0005-App1

-

Title: Append values of multiple term maps

-

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

23. RMLTC-CC-0005-App2

-

Title: Append values of multiple term maps

-

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
-_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
-_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
-_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
-_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
-_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
-_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
-_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-
-
-

24. RMLTC-CC-0005-Car1

-

Title: Cartesian product of values from multiple term maps of a gather map.

-

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-            rml:strategy rml:cartesianProduct ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
-_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
-_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
-_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
-_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

25. RMLTC-CC-0005-Car2

-

Title: Cartesian product of values from multiple term maps of a gather map.

-

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-            rml:strategy rml:cartesianProduct ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

26. RMLTC-CC-0006-IT0

-

Title: Gather values across iterations to create a collection.

-

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

27. RMLTC-CC-0006-IT1

-

Title: Gather values across iterations to create a collection.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
-_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
-_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
-_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
-_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

28. RMLTC-CC-0006-IT2

-

Title: Gather values across iterations to create a collection.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
-_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
-_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
-_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
-_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
-_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
-_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
-_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
-_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
-_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
-_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
-_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

29. RMLTC-CC-0006-IT3

-

Title: Gather values across iterations to create a container.

-

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different container.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:a .
-_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:b .
-_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:c .
-_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "5" .
-_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "6" .
-
-
-

30. RMLTC-CC-0006-IT4

-

Title: Gather values across iterations to create a container.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "5" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "6" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-
-
-

31. RMLTC-CC-0006-IT5

-

Title: Gather values across iterations to create a container.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "a" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "b" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5> "5" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_6> "6" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_7> "d" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> "e" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "c" .
-
-
-

32. RMLTC-CC-0007-NES

-

Title: Nested gather maps

-

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather (
-                [
-                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-                    rml:gatherAs rdf:Bag ;
-                ]
-                [
-                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
-                    rml:gatherAs rdf:Bag ;
-                ]
-            ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
-
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-
-_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
-_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
-_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
-
-_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
-_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
-_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
-_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
-
-_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
-_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-
-

33. RMLTC-CC-0008-ROMa

-

Title: Elements via reference object-map.

-

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

-

Mapping

-
@prefix ex: <http://example.com/> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-
-_:b273446 a rml:RelativePathSource ;
-    rml:path "student.csv" .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
-    rml:logicalSource [ a rml:LogicalSource ;
-            rml:referenceFormulation rml:CSV ;
-            rml:source _:b273446 ] ;
-            
-    rml:predicateObjectMap [ 
-        rml:objectMap [
-                rml:reference "ID" ; rml:termType rml:BlankNode ;
-                rml:gather ( 
-                    [ 
-                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
-                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
-                    ] 
-                ) ;
-                rml:gatherAs rdf:List;
-            ] ;    
-        rml:predicate ex:sameSportAs 
-    ] ;
-
-    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
-_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
-_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
-_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
-
-
-

34. RMLTC-CC-0008-ROMb

-

Title: Elements via reference object-map with default join condition

-

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

-

Mapping

-
@prefix ex: <http://example.com/> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-
-_:b273446 a rml:RelativePathSource ;
-    rml:path "student.csv" .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
-    rml:logicalSource [ a rml:LogicalSource ;
-            rml:referenceFormulation rml:CSV ;
-            rml:source _:b273446 ] ;
-            
-    rml:predicateObjectMap [
-        rml:objectMap [
-            rml:reference "ID" ; rml:termType rml:BlankNode ;
-            rml:gather ( 
-                [ 
-                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
-                ] 
-            ) ;
-            rml:gatherAs rdf:List;
-        ] ;
-        rml:predicate ex:sameSportAs 
-    ] ;
-        
-    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
-
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
-
-
-

35. RMLTC-CC-0009-DUP-Bag

-

Title: Gather duplicate values in an RDF Bag

-

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

36. RMLTC-CC-0009-DUP-List

-

Title: Gather duplicate values in an RDF List

-

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

37. RMLTC-CC-0010-Lista

-

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

-

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
-
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
-
-
-

38. RMLTC-CC-0010-Listb

-

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

-

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
-
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
-
-
- - - - -

A. References

A.1 Informative references

- -
[RDF11-Concepts]
- RDF 1.1 Concepts and Abstract Syntax. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf11-concepts/ -
[RML]
- RDF Mapping Language. https://rml.io. 06 October 2020. Unofficial draft. URL: https://rml.io/specs/rml/ -
-
\ No newline at end of file diff --git a/src/test/resources/rml-cc/docs/index.html b/src/test/resources/rml-cc/docs/index.html deleted file mode 100644 index cfe40fdb..00000000 --- a/src/test/resources/rml-cc/docs/index.html +++ /dev/null @@ -1,2472 +0,0 @@ - - - - - - -RML-CC: Test Cases - - - - - - - - - - - - - - - - - - -

Abstract

This document describes the [RML] vocabulary and approach to generating RDF containers and collections [RDF11-Concepts].

-
- -

Status of This Document

- This specification was published by the - Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it - on the W3C Standards Track. - - Please note that under the - W3C Community Contributor License Agreement (CLA) - there is a limited opt-out and other conditions apply. - - Learn more about - W3C Community and Business Groups. -

- -

1. Introduction

-

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). -The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

-
- -

2. Data model

-

The test cases are semantically described for re-usability and shareability following the W3C Test case description. -Each test:Testcase as the following properties:

-
    -
  • dcterms:identifier: unique ID of the test case.
  • -
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • -
  • rmltest:input: One or more input data of the test case.
  • -
  • rmltest:output: One or more output data of the test case.
  • -
  • rmltest:inputFormat: the input data format.
  • -
  • rmltest:outputFormat: the output data format.
  • -
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • -
-
- -

3. Test cases

-

This section describes the RML-CC test cases. These descriptions are also available as RDF. -The files are available on GitHub in the folder test-cases. -Each test case is contained in a single folder, containing three types of files:

-
    -
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • -
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • -
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • -
-
- - -

4. RMLTC-CC-0001-Alt

-

Title: Generate a rdf:Alt as an object

-

Description: Tests if a rdf:Alt is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Alt ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-
-
-

5. RMLTC-CC-0001-Bag

-

Title: Generate a rdf:Bag as an object

-

Description: Tests if a rdf:Bag is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

6. RMLTC-CC-0001-List

-

Title: Generate a rdf:List as an object

-

Description: Tests if a rdf:List is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

7. RMLTC-CC-0001-Seq

-

Title: Generate a rdf:Seq as an object

-

Description: Tests if a rdf:Seq is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Seq ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

8. RMLTC-CC-0002-Bag

-

Title: Generate a named rdf:Bag as an object

-

Description: Tests if a named rdf:Bag is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-
-
-

9. RMLTC-CC-0002-List

-

Title: Generate a named rdf:List as an object

-

Description: Tests if a named rdf:List is generated as an object

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
-<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
-_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
-_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
-_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
-<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
-_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

10. RMLTC-CC-0003-EB

-

Title: Allow the generation of empty bags

-

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-
-

11. RMLTC-CC-0003-EL

-

Title: Allow the generation of empty lists

-

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

12. RMLTC-CC-0003-EL-BN

-

Title: Allow the generation of empty lists identified by blank node identifiers.

-

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ; rml:termType rml:BlankNode ;
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

13. RMLTC-CC-0003-EL-Named

-

Title: Allow the generation of empty lists identified by IRIs.

-

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:allowEmptyListAndContainer true ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-
-
-

14. RMLTC-CC-0003-NEB

-

Title: Empty bags are not generated

-

Description: Tests if empty containers are not generated (expected default behavior).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-
-
-

15. RMLTC-CC-0003-NEL

-

Title: Empty lists are not generated

-

Description: Tests if empty lists are not generated (expected default behavior).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
-_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-
-
-

16. RMLTC-CC-0003-NELb

-

Title: Empty lists are not generated II

-

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:allowEmptyListAndContainer false ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
-_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
-_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-
-
-

17. RMLTC-CC-0004-SM1

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:createdBy ;
-        rml:object ex:JohnDoe ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

18. RMLTC-CC-0004-SM2

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

19. RMLTC-CC-0004-SM3

-

Title: GatherMap in subject map (list)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:List ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

20. RMLTC-CC-0004-SM4

-

Title: GatherMap in subject map (bag)

-

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:Bag ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:createdBy ;
-        rml:object ex:JohnDoe ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
-_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
-_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-
-
-

21. RMLTC-CC-0004-SM5

-

Title: GatherMap in subject map (bag)

-

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-        rml:gatherAs rdf:Bag ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
-
-
-

22. RMLTC-CC-0005-App1

-

Title: Append values of multiple term maps

-

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

23. RMLTC-CC-0005-App2

-

Title: Append values of multiple term maps

-

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
-_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
-_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
-_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
-_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
-_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
-_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
-_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-
-
-

24. RMLTC-CC-0005-Car1

-

Title: Cartesian product of values from multiple term maps of a gather map.

-

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-            rml:strategy rml:cartesianProduct ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
-_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
-_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
-_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
-_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

25. RMLTC-CC-0005-Car2

-

Title: Cartesian product of values from multiple term maps of a gather map.

-

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-            rml:strategy rml:cartesianProduct ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

26. RMLTC-CC-0006-IT0

-

Title: Gather values across iterations to create a collection.

-

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

27. RMLTC-CC-0006-IT1

-

Title: Gather values across iterations to create a collection.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
-_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
-_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
-_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
-_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

28. RMLTC-CC-0006-IT2

-

Title: Gather values across iterations to create a collection.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
-_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
-_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
-_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
-_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
-_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
-_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
-_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
-_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
-_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
-_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
-_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
-_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
-_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
-_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
-_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
-_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

29. RMLTC-CC-0006-IT3

-

Title: Gather values across iterations to create a container.

-

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different container.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:a .
-_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:b .
-_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:c .
-_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "5" .
-_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "6" .
-
-
-

30. RMLTC-CC-0006-IT4

-

Title: Gather values across iterations to create a container.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "5" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "6" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-
-
-

31. RMLTC-CC-0006-IT5

-

Title: Gather values across iterations to create a container.

-

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "c/{$.id}" ;
-            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "a" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "b" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5> "5" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_6> "6" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_7> "d" .
-<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> "e" .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "c" .
-
-
-

32. RMLTC-CC-0007-NES

-

Title: Nested gather maps

-

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather (
-                [
-                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
-                    rml:gatherAs rdf:Bag ;
-                ]
-                [
-                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
-                    rml:gatherAs rdf:Bag ;
-                ]
-            ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
-_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
-
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
-_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
-
-_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
-
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
-_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
-_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
-
-_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
-_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
-_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
-_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
-
-_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
-_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-
-

33. RMLTC-CC-0008-ROMa

-

Title: Elements via reference object-map.

-

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

-

Mapping

-
@prefix ex: <http://example.com/> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-
-_:b273446 a rml:RelativePathSource ;
-    rml:path "student.csv" .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
-    rml:logicalSource [ a rml:LogicalSource ;
-            rml:referenceFormulation rml:CSV ;
-            rml:source _:b273446 ] ;
-            
-    rml:predicateObjectMap [ 
-        rml:objectMap [
-                rml:reference "ID" ; rml:termType rml:BlankNode ;
-                rml:gather ( 
-                    [ 
-                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
-                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
-                    ] 
-                ) ;
-                rml:gatherAs rdf:List;
-            ] ;    
-        rml:predicate ex:sameSportAs 
-    ] ;
-
-    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
-_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
-_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
-_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
-
-
-

34. RMLTC-CC-0008-ROMb

-

Title: Elements via reference object-map with default join condition

-

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

-

Mapping

-
@prefix ex: <http://example.com/> .
-@prefix rml: <http://w3id.org/rml/> .
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-
-_:b273446 a rml:RelativePathSource ;
-    rml:path "student.csv" .
-
-<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
-    rml:logicalSource [ a rml:LogicalSource ;
-            rml:referenceFormulation rml:CSV ;
-            rml:source _:b273446 ] ;
-            
-    rml:predicateObjectMap [
-        rml:objectMap [
-            rml:reference "ID" ; rml:termType rml:BlankNode ;
-            rml:gather ( 
-                [ 
-                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
-                ] 
-            ) ;
-            rml:gatherAs rdf:List;
-        ] ;
-        rml:predicate ex:sameSportAs 
-    ] ;
-        
-    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
-
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
-_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
-
-
-

35. RMLTC-CC-0009-DUP-Bag

-

Title: Gather duplicate values in an RDF Bag

-

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:Bag ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
-<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
-<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
-_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
-_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
-_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
-
-
-

36. RMLTC-CC-0009-DUP-List

-

Title: Gather duplicate values in an RDF List

-

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
-_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
-
-
-

37. RMLTC-CC-0010-Lista

-

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

-

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
-
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
-
-
-

38. RMLTC-CC-0010-Listb

-

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

-

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

-

Error expected? No

-

Input - http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

-

Mapping

-
@prefix rml: <http://w3id.org/rml/>.
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
-@prefix ex:  <http://example.com/ns#>.
-@base        <http://example.com/>.
-
-<#TM> a rml:TriplesMap;
-    rml:logicalSource [
-        rml:source _:b738439 ;
-        rml:referenceFormulation rml:JSONPath ;
-        rml:iterator "$.*" ;
-    ] ;
-
-    rml:subjectMap [
-        rml:template "e/{$.id}" ;
-    ] ;
-
-    rml:predicateObjectMap [
-        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
-        rml:predicate ex:with ;
-        rml:objectMap [
-            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
-            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
-            rml:gatherAs rdf:List ;
-        ] ;
-    ] ;
-.
-
-_:b738439 a rml:RelativePathSource ;
-    rml:path "data.json" .
-
-

Output

-
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
-_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
-_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
-
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
-_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
-<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
-
-
- - - - -

A. References

A.1 Informative references

- -
[RDF11-Concepts]
- RDF 1.1 Concepts and Abstract Syntax. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf11-concepts/ -
[RML]
- RDF Mapping Language. https://rml.io. 06 October 2020. Unofficial draft. URL: https://rml.io/specs/rml/ -
-
\ No newline at end of file diff --git a/src/test/resources/rml-lv/RMLLVTC0008d/README.md b/src/test/resources/rml-lv/RMLLVTC0008d/README.md new file mode 100644 index 00000000..34577f8e --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008d/README.md @@ -0,0 +1,39 @@ +## RMLLVTC0008a + +**Title**: Cycle: Fields + +**Description**: Test a cycle in nested fields + +**Error expected?** Yes + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field :field1 . + +:field1 a rml:IterableField ; + rml:fieldName "item" ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.items[*]" ; + rml:field :field2. + +:field2 a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + rml:field :field1. + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0008d/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0008d/mapping.ttl new file mode 100644 index 00000000..6d32c26e --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008d/mapping.ttl @@ -0,0 +1,26 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field :field1 . + +:field1 a rml:IterableField ; + rml:fieldName "item" ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.items[*]" ; + rml:field :field2. + +:field2 a rml:ExpressionField ; + rml:fieldName "type" ; + rml:reference "$.type" ; + rml:field :field1. diff --git a/src/test/resources/rml-lv/RMLLVTC0008d/people.json b/src/test/resources/rml-lv/RMLLVTC0008d/people.json new file mode 100644 index 00000000..87d56294 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0008d/people.json @@ -0,0 +1,26 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} diff --git a/src/test/resources/rml-lv/metadata.csv b/src/test/resources/rml-lv/metadata.csv index bff25c5c..c482acb9 100644 --- a/src/test/resources/rml-lv/metadata.csv +++ b/src/test/resources/rml-lv/metadata.csv @@ -31,3 +31,4 @@ RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,http://w3id.org/rml/lv/,mapping.ttl,,,,,,,,,,,,,true RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,http://w3id.org/rml/lv/,mapping.ttl,application/json,text/csv,,,,,people.json,people.csv,,,,,true RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,,,,people.json,,,,,,true +RMLLVTC0008d,Cycle: Self-Join,Test a cycle in nested fields: self-join,http://w3id.org/rml/lv/,mapping.ttl,application/json,,,,,,people.json,,,,,,true \ No newline at end of file From e8696ae57fa7fda08c1c39ad9e5d5a001b2e43cf Mon Sep 17 00:00:00 2001 From: Christophe Debruyne Date: Fri, 31 Oct 2025 16:20:13 +0100 Subject: [PATCH 25/28] Support for new test cases. 34/35 test cases of LV pass --- src/test/resources/rml-lv/README.md | 2 +- .../resources/rml-lv/RMLLVTC0008d/README.md | 33 +- .../resources/rml-lv/RMLLVTC0009a/README.md | 65 + .../resources/rml-lv/RMLLVTC0009a/mapping.ttl | 35 + .../resources/rml-lv/RMLLVTC0009a/people.json | 12 + .../resources/rml-lv/RMLLVTC0009b/README.md | 118 + .../resources/rml-lv/RMLLVTC0009b/mapping.ttl | 72 + .../resources/rml-lv/RMLLVTC0009b/people.csv | 4 + .../resources/rml-lv/RMLLVTC0009b/people.json | 19 + .../resources/rml-lv/RMLLVTC0009c/README.md | 156 + .../resources/rml-lv/RMLLVTC0009c/mapping.ttl | 105 + .../resources/rml-lv/RMLLVTC0009c/people.csv | 4 + .../resources/rml-lv/RMLLVTC0009c/people.json | 17 + .../resources/rml-lv/RMLLVTC0009c/people2.csv | 3 + src/test/resources/rml-lv/config.js | 2 +- src/test/resources/rml-lv/descriptions.csv | 74 +- src/test/resources/rml-lv/dev.html | 5 +- .../resources/rml-lv/docs/20251029/index.html | 3850 +++++++++++++++++ src/test/resources/rml-lv/docs/index.html | 416 +- src/test/resources/rml-lv/manifest.ttl | 212 +- src/test/resources/rml-lv/metadata.csv | 5 +- 21 files changed, 5040 insertions(+), 169 deletions(-) create mode 100644 src/test/resources/rml-lv/RMLLVTC0009a/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0009a/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0009a/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0009b/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0009b/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0009b/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0009b/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0009c/README.md create mode 100644 src/test/resources/rml-lv/RMLLVTC0009c/mapping.ttl create mode 100644 src/test/resources/rml-lv/RMLLVTC0009c/people.csv create mode 100644 src/test/resources/rml-lv/RMLLVTC0009c/people.json create mode 100644 src/test/resources/rml-lv/RMLLVTC0009c/people2.csv create mode 100644 src/test/resources/rml-lv/docs/20251029/index.html diff --git a/src/test/resources/rml-lv/README.md b/src/test/resources/rml-lv/README.md index 57adbc3f..03fa4f76 100644 --- a/src/test/resources/rml-lv/README.md +++ b/src/test/resources/rml-lv/README.md @@ -9,4 +9,4 @@ The test cases publication (html pages) can be generated as followed: 4. Download burp: `curl -LO https://github.com/kg-construct/BURP/releases/download/v0.1.1/burp.jar` 5. Generate the manifest with [Burp](https://github.com/kg-construct/BURP): `java -jar burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/lv/test/` 6. Run list.sh and insert output in dev.html -7. To publish the new HTML verson of the test cases, export `dev.html` as `index.html` in ./docs and in a subfolder with the date of the publication (maybe adapt the publication date) +7. To publish the new HTML verson of the test cases, run with `python3 -m http.server`, export `dev.html` as `index.html` in ./docs and in a subfolder with the date of the publication (maybe adapt the publication date) diff --git a/src/test/resources/rml-lv/RMLLVTC0008d/README.md b/src/test/resources/rml-lv/RMLLVTC0008d/README.md index 34577f8e..02362e36 100644 --- a/src/test/resources/rml-lv/RMLLVTC0008d/README.md +++ b/src/test/resources/rml-lv/RMLLVTC0008d/README.md @@ -1,4 +1,4 @@ -## RMLLVTC0008a +## RMLLVTC0008d **Title**: Cycle: Fields @@ -6,6 +6,37 @@ **Error expected?** Yes +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + { + "type": "sword", + "weight": 1500 + }, + { + "type": "shield", + "weight": 2500 + } + ] + }, + { + "name": "bob", + "items": [ + { + "type": "flower", + "weight": 15 + } + ] + } + ] +} + +``` + **Mapping** ``` @prefix rml: . diff --git a/src/test/resources/rml-lv/RMLLVTC0009a/README.md b/src/test/resources/rml-lv/RMLLVTC0009a/README.md new file mode 100644 index 00000000..547b9108 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009a/README.md @@ -0,0 +1,65 @@ +## RMLLVTC0009a + +**Title**: Name collision: between Fields with the same Parent + +**Description**: Test a name collision between fields with the same parent + +**Error expected?** Yes + +**Input** +``` +{ + "people": [ + { + "givenName": "Alice", + "familyName": "Smith" + }, + { + "givenName": "Bob", + "familyName": "Johnson" + } + ] +} + +``` + +**Mapping** +``` +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.givenName" ; + ], [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.familyName" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name" ; + ] ; + ] . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0009a/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0009a/mapping.ttl new file mode 100644 index 00000000..a5e46121 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009a/mapping.ttl @@ -0,0 +1,35 @@ +@prefix rml: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.givenName" ; + ], [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.familyName" ; + ] . + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :jsonView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasName ; + rml:objectMap [ + rml:reference "name" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0009a/people.json b/src/test/resources/rml-lv/RMLLVTC0009a/people.json new file mode 100644 index 00000000..2361327a --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009a/people.json @@ -0,0 +1,12 @@ +{ + "people": [ + { + "givenName": "Alice", + "familyName": "Smith" + }, + { + "givenName": "Bob", + "familyName": "Johnson" + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0009b/README.md b/src/test/resources/rml-lv/RMLLVTC0009b/README.md new file mode 100644 index 00000000..6916b82f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009b/README.md @@ -0,0 +1,118 @@ +## RMLLVTC0009b + +**Title**: Name collision: caused by Field from a Join + +**Description**: Test a name collision caused by a field from a join + +**Error expected?** Yes + +**Input** +``` +{ + "people": [ + { + "givenName": "alice", + "familyName": "smith", + "items": [ + "sword", + "shield" + ] + }, + { + "givenName": "bob", + "familyName": "johnson", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,birthyear +alice,1995 +bob,1999 +tobias,2005 + +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "givenName" ; + rml:reference "$.givenName" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "familyName" ; + rml:reference "$.familyName" ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "givenName" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "familyName" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0009b/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0009b/mapping.ttl new file mode 100644 index 00000000..458d72f0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009b/mapping.ttl @@ -0,0 +1,72 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "givenName" ; + rml:reference "$.givenName" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "familyName" ; + rml:reference "$.familyName" ; + ] . + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "birthyear" ; + rml:reference "birthyear" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "givenName" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "familyName" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{name}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasBirthYear ; + rml:objectMap [ + rml:reference "birthyear" ; + rml:datatype xsd:gYear ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0009b/people.csv b/src/test/resources/rml-lv/RMLLVTC0009b/people.csv new file mode 100644 index 00000000..edc942d0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009b/people.csv @@ -0,0 +1,4 @@ +name,birthyear +alice,1995 +bob,1999 +tobias,2005 diff --git a/src/test/resources/rml-lv/RMLLVTC0009b/people.json b/src/test/resources/rml-lv/RMLLVTC0009b/people.json new file mode 100644 index 00000000..35085f72 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009b/people.json @@ -0,0 +1,19 @@ +{ + "people": [ + { + "givenName": "alice", + "familyName": "smith", + "items": [ + "sword", + "shield" + ] + }, + { + "givenName": "bob", + "familyName": "johnson", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0009c/README.md b/src/test/resources/rml-lv/RMLLVTC0009c/README.md new file mode 100644 index 00000000..88b86d15 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009c/README.md @@ -0,0 +1,156 @@ +## RMLLVTC0009c + +**Title**: Name collision: between Fields from different Joins + +**Description**: Test a name collision between fields from different joins + +**Error expected?** Yes + +**Input** +``` +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} + +``` + +**Input 1** +``` +name,id +alice,123 +bob,456 +tobias,789 + +``` + +**Input 2** +``` +name,item +alice,lantern +bob,leaf +``` + +**Mapping** +``` +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "jsonitem" ; + rml:reference "$.items[*]" ; + ] . + +:additionalCsvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people2.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:additionalCsvView a rml:LogicalView ; + rml:viewOn :additionalCsvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csvitem" ; + rml:reference "item" ; + ] ; +. + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "id" ; + rml:reference "id" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "jsonitem" ; + ] ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :additionalCsvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "csvitem" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{id}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{id}/item/{item}" ; + ] ; + ] . + +``` + diff --git a/src/test/resources/rml-lv/RMLLVTC0009c/mapping.ttl b/src/test/resources/rml-lv/RMLLVTC0009c/mapping.ttl new file mode 100644 index 00000000..b5695694 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009c/mapping.ttl @@ -0,0 +1,105 @@ +@prefix rml: . +@prefix xsd: . +@prefix : . + +:jsonSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.json" ; + ] ; + rml:referenceFormulation rml:JSONPath ; + rml:iterator "$.people[*]" . + +:jsonView a rml:LogicalView ; + rml:viewOn :jsonSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "$.name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "jsonitem" ; + rml:reference "$.items[*]" ; + ] . + +:additionalCsvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people2.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:additionalCsvView a rml:LogicalView ; + rml:viewOn :additionalCsvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "csvitem" ; + rml:reference "item" ; + ] ; +. + +:csvSource a rml:LogicalSource ; + rml:source [ + a rml:RelativePathSource , rml:Source ; + rml:root rml:MappingDirectory ; + rml:path "people.csv" ; + ] ; + rml:referenceFormulation rml:CSV . + +:csvView a rml:LogicalView ; + rml:viewOn :csvSource ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "name" ; + rml:reference "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "id" ; + rml:reference "id" ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :jsonView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "jsonitem" ; + ] ; + ] ; + rml:leftJoin [ + rml:parentLogicalView :additionalCsvView ; + rml:joinCondition [ + rml:parent "name" ; + rml:child "name" ; + ] ; + rml:field [ + a rml:ExpressionField ; + rml:fieldName "item" ; + rml:reference "csvitem" ; + ] ; + ] . + + +:triplesMapPerson a rml:TriplesMap ; + rml:logicalSource :csvView ; + rml:subjectMap [ + rml:template "http://example.org/person/{id}" ; + ] ; + rml:predicateObjectMap [ + rml:predicate :hasItem ; + rml:objectMap [ + rml:template "http://example.org/person/{id}/item/{item}" ; + ] ; + ] . diff --git a/src/test/resources/rml-lv/RMLLVTC0009c/people.csv b/src/test/resources/rml-lv/RMLLVTC0009c/people.csv new file mode 100644 index 00000000..103cc9b0 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009c/people.csv @@ -0,0 +1,4 @@ +name,id +alice,123 +bob,456 +tobias,789 diff --git a/src/test/resources/rml-lv/RMLLVTC0009c/people.json b/src/test/resources/rml-lv/RMLLVTC0009c/people.json new file mode 100644 index 00000000..c2fd489f --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009c/people.json @@ -0,0 +1,17 @@ +{ + "people": [ + { + "name": "alice", + "items": [ + "sword", + "shield" + ] + }, + { + "name": "bob", + "items": [ + "flower" + ] + } + ] +} diff --git a/src/test/resources/rml-lv/RMLLVTC0009c/people2.csv b/src/test/resources/rml-lv/RMLLVTC0009c/people2.csv new file mode 100644 index 00000000..54d25229 --- /dev/null +++ b/src/test/resources/rml-lv/RMLLVTC0009c/people2.csv @@ -0,0 +1,3 @@ +name,item +alice,lantern +bob,leaf \ No newline at end of file diff --git a/src/test/resources/rml-lv/config.js b/src/test/resources/rml-lv/config.js index 7973ff32..938ddcd5 100644 --- a/src/test/resources/rml-lv/config.js +++ b/src/test/resources/rml-lv/config.js @@ -76,7 +76,7 @@ var respecConfig = { date: "12 March 2024", }, }, - publishDate: "2025-08-05", + publishDate: "2025-10-29", otherLinks: [], shortName: "RML-LV-Testcases", specStatus: "CG-DRAFT", diff --git a/src/test/resources/rml-lv/descriptions.csv b/src/test/resources/rml-lv/descriptions.csv index f95d42af..e389dc3c 100644 --- a/src/test/resources/rml-lv/descriptions.csv +++ b/src/test/resources/rml-lv/descriptions.csv @@ -1,41 +1,45 @@ RML ID,Title,Purpose,"Error -expected?","Input -1","Input +expected?","Input +1","Input 2","Input 3","Output default","Output 1","Output 2","Output -3",Comment -RMLLVTC0000a,Logical view on JSON source,Test a view on a hierarchical source,no,people.json,,,output.nq,,,, -RMLLVTC0000b,Logical view on CSV source,Test a view on a tabular source,no,people.csv,,,output.nq,,,, -RMLLVTC0000c,Logical View on Logical View,Test a view on a logical view,no,people.json,,,output.nq,,,, -RMLLVTC0001a,Expression Field: Reference,Test a reference in an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0001b,Expression Field: Template,Test a template in an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0001c,Expression Field: Constant,Test a constant expression in an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0001d,Expression Field Siblings,Test multiple expression fields with the same parent,no,people.json,,,output.nq,,,, -RMLLVTC0002a,Iterable Field,Test a nested field construction: iterable field with expression field as child,no,people.json,,,output.nq,,,, -RMLLVTC0002b,Iterable Field with Multiple Children,Test a nested field construction: iterable field with mulitple expression fields as children,no,people.json,,,output.nq,,,, -RMLLVTC0002c,Nested Iterable Fields,Test a nested field construction: iterable field with an iterable field as child,no,people.json,,,output.nq,,,, -RMLLVTC0003a,Index Key: #,Test a reference to the index key #,no,people.json,,,output.nq,,,, -RMLLVTC0003b,Index Key: Iterable Field,Test a reference to the index key of an iterable field,no,people.json,,,output.nq,,,, -RMLLVTC0003c,Index Key: Expression field,Test a reference to the index key of an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0004a,Natural Datatype: Index #,Test the natural datatype mapping for the index #,no,people.json,,,output.nq,,,, -RMLLVTC0004b,Natural Datatype: Index Expression Field,Test the natural datatype mapping for the index of an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0004c,Natural Datatype: Index Iterable Field,Test the natural datatype mapping for the index of an iterable field,no,people.json,,,output.nq,,,, -RMLLVTC0004d,Natural Datatype: Record Expression Field,Test the natural datatype mapping for a record of an expression field,no,people.json,,,output.nq,,,, -RMLLVTC0005a,Referencing a Non-Existing Key,Test a reference to a non-existing key,yes,people.json,,,,,,, -RMLLVTC0005b,Referencing the Record Key ,Test a reference to the record key ,yes,people.json,,,,,,, -RMLLVTC0005c,Referencing the Record Key of an Iterable Field,Test a reference to the record key of an iterable field,yes,people.json,,,,,,, -RMLLVTC0006a,Left Join,Test a left join,no,people.json,people.csv,,output.nq,,,, -RMLLVTC0006b,Inner Join,Test an inner join,no,people.json,people.csv,,output.nq,,,, -RMLLVTC0006c,Two Left Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, -RMLLVTC0006d,Inner Join and Left Join,Test an inner join and a left join in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, -RMLLVTC0006e,Two Inner Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, -RMLLVTC0006f,Index Key of Field in Join,Test references to indexes of fields from a join,no,people.json,people.csv,,output.nq,,,, -RMLLVTC0007a,Change Reference Formulations: CSV including JSON array,Test a change of reference formulations: csv source including json array,no,people.csv,,,output.nq,,,, -RMLLVTC0007b,Change Reference Formulations: CSV including JSON object,Test a change of reference formulations: csv source including json object,no,people.csv,,,output.nq,,,, -RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of reference formulations: json source including csv data,no,people.json,,,output.nq,,,, -RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,yes,,,,,,,, -RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,yes,people.json,people.csv,,,,,, -RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,yes,people.json,people.csv,,,,,, +3",Comment, +RMLLVTC0000a,Logical view on JSON source,Test a view on a hierarchical source,no,people.json,,,output.nq,,,,, +RMLLVTC0000b,Logical view on CSV source,Test a view on a tabular source,no,people.csv,,,output.nq,,,,, +RMLLVTC0000c,Logical View on Logical View,Test a view on a logical view,no,people.json,,,output.nq,,,,,"0,8125" +RMLLVTC0001a,Expression Field: Reference,Test a reference in an expression field,no,people.json,,,output.nq,,,,, +RMLLVTC0001b,Expression Field: Template,Test a template in an expression field,no,people.json,,,output.nq,,,,, +RMLLVTC0001c,Expression Field: Constant,Test a constant expression in an expression field,no,people.json,,,output.nq,,,,, +RMLLVTC0001d,Expression Field Siblings,Test multiple expression fields with the same parent,no,people.json,,,output.nq,,,,, +RMLLVTC0002a,Iterable Field,Test a nested field construction: iterable field with expression field as child,no,people.json,,,output.nq,,,,, +RMLLVTC0002b,Iterable Field with Multiple Children,Test a nested field construction: iterable field with mulitple expression fields as children,no,people.json,,,output.nq,,,,, +RMLLVTC0002c,Nested Iterable Fields,Test a nested field construction: iterable field with an iterable field as child,no,people.json,,,output.nq,,,,, +RMLLVTC0003a,Index Key: #,Test a reference to the index key #,no,people.json,,,output.nq,,,,, +RMLLVTC0003b,Index Key: Iterable Field,Test a reference to the index key of an iterable field,no,people.json,,,output.nq,,,,, +RMLLVTC0003c,Index Key: Expression field,Test a reference to the index key of an expression field,no,people.json,,,output.nq,,,,, +RMLLVTC0004a,Natural Datatype: Index #,Test the natural datatype mapping for the index #,no,people.json,,,output.nq,,,,, +RMLLVTC0004b,Natural Datatype: Index Expression Field,Test the natural datatype mapping for the index of an expression field,no,people.json,,,output.nq,,,,, +RMLLVTC0004c,Natural Datatype: Index Iterable Field,Test the natural datatype mapping for the index of an iterable field,no,people.json,,,output.nq,,,,, +RMLLVTC0004d,Natural Datatype: Record Expression Field,Test the natural datatype mapping for a record of an expression field,no,people.json,,,output.nq,,,,, +RMLLVTC0005a,Referencing a Non-Existing Key,Test a reference to a non-existing key,yes,people.json,,,,,,,, +RMLLVTC0005b,Referencing the Record Key ,Test a reference to the record key ,yes,people.json,,,,,,,, +RMLLVTC0005c,Referencing the Record Key of an Iterable Field,Test a reference to the record key of an iterable field,yes,people.json,,,,,,,, +RMLLVTC0006a,Left Join,Test a left join,no,people.json,people.csv,,output.nq,,,,, +RMLLVTC0006b,Inner Join,Test an inner join,no,people.json,people.csv,,output.nq,,,,, +RMLLVTC0006c,Two Left Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,,, +RMLLVTC0006d,Inner Join and Left Join,Test an inner join and a left join in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,,, +RMLLVTC0006e,Two Inner Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,,, +RMLLVTC0006f,Index Key of Field in Join,Test references to indexes of fields from a join,no,people.json,people.csv,,output.nq,,,,, +RMLLVTC0007a,Change Reference Formulations: CSV including JSON array,Test a change of reference formulations: csv source including json array,no,people.csv,,,output.nq,,,,, +RMLLVTC0007b,Change Reference Formulations: CSV including JSON object,Test a change of reference formulations: csv source including json object,no,people.csv,,,output.nq,,,,, +RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of reference formulations: json source including csv data,no,people.json,,,output.nq,,,,, +RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,yes,,,,,,,,, +RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,yes,people.json,people.csv,,,,,,, +RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,yes,people.json,,,,,,,, +RMLLVTC0008d,Cycle: Fields,Test a cycle in nested fields,yes,people.json,,,,,,,, +RMLLVTC0009a,Name collision: between Fields with the same Parent,Test a name collision between fields with the same parent,yes,people.json,,,,,,,, +RMLLVTC0009b,Name collision: caused by Field from a Join,Test a name collision caused by a field from a join,yes,people.json,people.csv,,,,,,, +RMLLVTC0009c,Name collision: between Fields from different Joins,Test a name collision between fields from different joins,yes,people.json,people.csv,people2.csv,,,,,, \ No newline at end of file diff --git a/src/test/resources/rml-lv/dev.html b/src/test/resources/rml-lv/dev.html index 9868a5e3..abcbacc6 100644 --- a/src/test/resources/rml-lv/dev.html +++ b/src/test/resources/rml-lv/dev.html @@ -126,7 +126,10 @@
- +
+
+
+
diff --git a/src/test/resources/rml-lv/docs/20251029/index.html b/src/test/resources/rml-lv/docs/20251029/index.html new file mode 100644 index 00000000..9cc552ae --- /dev/null +++ b/src/test/resources/rml-lv/docs/20251029/index.html @@ -0,0 +1,3850 @@ + + + + + + +RML-LV: Test Cases + + + + + + + + + + + + + + + +
+ +

RML-LV: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-LV-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/lv/test-cases/
+ + + + +
Editors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+ +
Authors:
+ (Skemu) +
+ (Ghent University – imec – IDLab) +
+
Feedback:
+ GitHub kg-construct/rml-lv + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-LV test cases to the determine the RML-LV specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-LV test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-LV specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-LV test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLLVTC0000a

+

Title: Logical view on JSON source

+

Description: Test a view on a hierarchical source

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

5. RMLLVTC0000b

+

Title: Logical view on CSV source

+

Description: Test a view on a tabular source

+

Error expected? No

+

Input

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+<http://example.org/person/tobias> <http://example.org/hasName> "tobias" .
+
+
+

6. RMLLVTC0000c

+

Title: Logical View on Logical View

+

Description: Test a view on a logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:jsonViewOnJsonView a rml:LogicalView ;
+  rml:viewOn :jsonView ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "newName" ;
+    rml:reference "name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonViewOnJsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

7. RMLLVTC0001a

+

Title: Expression Field: Reference

+

Description: Test a reference in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasName> "alice" .
+<http://example.org/person/bob> <http://example.org/hasName> "bob" .
+
+
+

8. RMLLVTC0001b

+

Title: Expression Field: Template

+

Description: Test a template in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "race" ;
+    rml:constant "human" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasRace ;
+    rml:objectMap [
+      rml:reference "race" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasRace> "human" .
+<http://example.org/person/bob> <http://example.org/hasRace> "human" .
+
+
+

9. RMLLVTC0001c

+

Title: Expression Field: Constant

+

Description: Test a constant expression in an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "fullName" ;
+    rml:template "{name} {lastName}" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:reference "fullName" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

10. RMLLVTC0001d

+

Title: Expression Field Siblings

+

Description: Test multiple expression fields with the same parent

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "lastName": "smith",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "lastName": "jones",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "lastName" ;
+    rml:reference "$.lastName" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasFullName ;
+    rml:objectMap [
+      rml:template "{name} {lastName}" ;
+      rml:termType rml:Literal ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasFullName> "alice smith" .
+<http://example.org/person/bob> <http://example.org/hasFullName> "bob jones" .
+
+
+

11. RMLLVTC0002a

+

Title: Iterable Field

+

Description: Test a nested field construction: iterable field with expression field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{item.type}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

12. RMLLVTC0002b

+

Title: Iterable Field with Multiple Children

+

Description: Test a nested field construction: iterable field with mulitple expression fields as children

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "weight" ;
+      rml:reference "$.weight" ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasName> "sword" .
+<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasName> "shield" .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasName> "flower" .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

13. RMLLVTC0002c

+

Title: Nested Iterable Fields

+

Description: Test a nested field construction: iterable field with an iterable field as child

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "measures": {
+            "weight": 1500,
+            "length": 30
+          }
+        },
+        {
+          "type": "shield",
+          "measures": {
+            "weight": 2500
+          }
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "measures" : {
+            "weight": 15,
+            "length" : 15
+          }
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+    rml:field [
+      a rml:IterableField ;
+      rml:fieldName "measures";
+      rml:iterator "$.measures";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+        ];
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.measures.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

14. RMLLVTC0003a

+

Title: Index Key: #

+

Description: Test a reference to the index key #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

15. RMLLVTC0003b

+

Title: Index Key: Iterable Field

+

Description: Test a reference to the index key of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.type" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+
+

16. RMLLVTC0003c

+

Title: Index Key: Expression field

+

Description: Test a reference to the index key of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/0> <http://example.org/hasType> "sword" .
+<http://example.org/person/alice/item/1> <http://example.org/hasType> "shield" .
+<http://example.org/person/bob/item/0> <http://example.org/hasType> "flower" .
+
+
+

17. RMLLVTC0004a

+

Title: Natural Datatype: Index #

+

Description: Test the natural datatype mapping for the index #

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

18. RMLLVTC0004b

+

Title: Natural Datatype: Index Expression Field

+

Description: Test the natural datatype mapping for the index of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item.type}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

19. RMLLVTC0004c

+

Title: Natural Datatype: Index Iterable Field

+

Description: Test the natural datatype mapping for the index of an iterable field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}/item/{item}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasSequenceNumber ;
+    rml:objectMap [
+      rml:reference "item.#" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice/item/sword> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/alice/item/shield> <http://example.org/hasSequenceNumber> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob/item/flower> <http://example.org/hasSequenceNumber> "0"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

20. RMLLVTC0004d

+

Title: Natural Datatype: Record Expression Field

+

Description: Test the natural datatype mapping for a record of an expression field

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "birth_year": 1995
+    },
+    {
+      "name": "bob",
+      "birth_year": 1999
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "$.birth_year" ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

21. RMLLVTC0005a

+

Title: Referencing a Non-Existing Key

+

Description: Test a reference to a non-existing key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{Name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "Name" ;
+    ] ;
+  ] .
+
+
+

22. RMLLVTC0005b

+

Title: Referencing the Record Key

+

Description: Test a reference to the record key

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :isDerivedFrom ;
+    rml:objectMap [
+      rml:reference "<it>" ;
+    ] ;
+  ] .
+
+
+

23. RMLLVTC0005c

+

Title: Referencing the Record Key of an Iterable Field

+

Description: Test a reference to the record key of an iterable field

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:IterableField ;
+    rml:fieldName "item" ;
+    rml:iterator "$.items[*]" ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "type" ;
+      rml:reference "$.type" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/{item}" ;
+    ] ;
+  ] .
+
+
+

24. RMLLVTC0006a

+

Title: Left Join

+

Description: Test a left join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+<http://example.org/person/tobias> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

25. RMLLVTC0006b

+

Title: Inner Join

+

Description: Test an inner join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/alice> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/sword> .
+<http://example.org/person/alice> <http://example.org/hasItem> <http://example.org/person/alice/item/shield> .
+<http://example.org/person/bob> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/bob> <http://example.org/hasItem> <http://example.org/person/bob/item/flower> .
+
+
+

26. RMLLVTC0006c

+

Title: Two Left Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+<http://example.org/person/789> <http://example.org/hasBirthYear> "2005"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+
+
+

27. RMLLVTC0006d

+

Title: Inner Join and Left Join

+

Description: Test an inner join and a left join in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+<http://example.org/person/456> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/456> <http://example.org/hasItem> <http://example.org/person/456/item/flower> .
+
+
+

28. RMLLVTC0006e

+

Title: Two Inner Joins

+

Description: Test two left joins in one logical view

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Input 2

+
name,id
+alice,123
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "id" ;
+     rml:reference "id" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv2_id" ;
+      rml:reference "id" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{csv2_id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{csv2_id}/item/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/123> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/sword> .
+<http://example.org/person/123> <http://example.org/hasItem> <http://example.org/person/123/item/shield> .
+
+
+

29. RMLLVTC0006f

+

Title: Index Key of Field in Join

+

Description: Test references to indexes of fields from a join

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+tobias,2005
+bob,1999
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:innerJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{#}/item/{json_item.#}/{json_item}" ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/person/0> <http://example.org/hasBirthYear> "1995"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/0/sword> .
+<http://example.org/person/0> <http://example.org/hasItem> <http://example.org/person/0/item/1/shield> .
+<http://example.org/person/2> <http://example.org/hasBirthYear> "1999"^^<http://www.w3.org/2001/XMLSchema#gYear> .
+<http://example.org/person/2> <http://example.org/hasItem> <http://example.org/person/2/item/0/flower> .
+
+
+
+

30. RMLLVTC0007a

+

Title: Change Reference Formulations: CSV including JSON array

+

Description: Test a change of reference formulations: csv source including json array

+

Error expected? No

+

Input

+
name,items
+alice,"[{""type"":""sword"",""weight"":1500},{""type"":""shield"",""weight"":2500}]"
+bob,"[{""type"":""flower"",""weight"":15}]"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$[*]" ;
+      rml:fieldName "item" ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ;
+      ] ;
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

31. RMLLVTC0007b

+

Title: Change Reference Formulations: CSV including JSON object

+

Description: Test a change of reference formulations: csv source including json object

+

Error expected? No

+

Input

+
name,item
+alice,"{""type"":""sword"",""weight"":1500}"
+alice,"{""type"":""shield"",""weight"":2500}"
+bob,"{""type"":""flower"",""weight"":15}"
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedCSVSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:mixedCSVView a rml:LogicalView ;
+  rml:viewOn :mixedCSVSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "item" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:JSONPath ;
+      rml:iterator "$" ;
+      rml:fieldName "itemJson" ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "type" ;
+        rml:reference "$.type" ; ] ;
+      rml:field [
+        a rml:ExpressionField;
+        rml:fieldName "weight" ;
+        rml:reference "$.weight" ;
+      ] ;
+    ] ;
+  ] .
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedCSVView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "item.itemJson.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "item.itemJson.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "shield" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_2_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_2_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

32. RMLLVTC0007c

+

Title: Change Reference Formulations: JSON including CSV

+

Description: Test a change of reference formulations: json source including csv data

+

Error expected? No

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": "type,weight\nsword,1500\nshield,2500"
+    },
+    {
+      "name": "bob",
+      "items": "type,weight\nflower,15"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:mixedJSONSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:mixedJSONView a rml:LogicalView ;
+  rml:viewOn :mixedJSONSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+    ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "items" ;
+    rml:reference "$.items" ;
+    rml:field [
+      a rml:IterableField ;
+      rml:referenceFormulation rml:CSV ;
+      rml:fieldName "item";
+      rml:field [
+        a rml:ExpressionField ;
+        rml:fieldName "type" ;
+        rml:reference "type" ;
+      ] ;
+      rml:field [
+        a rml:expressionField ;
+        rml:fieldName "weight" ;
+        rml:reference "weight" ;
+      ] ;
+    ] ;
+  ].
+
+:triplesMapItem a rml:TriplesMap ;
+  rml:logicalSource :mixedJSONView ;
+  rml:subjectMap [
+    rml:template "http://example.org/item_{#}_{items.item.#}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasType ;
+    rml:objectMap [
+      rml:reference "items.item.type" ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasWeight ;
+    rml:objectMap [
+      rml:reference "items.item.weight" ;
+      rml:datatype xsd:integer ;
+    ] ;
+  ] .
+
+

Output

+
<http://example.org/item_0_0> <http://example.org/hasType> "sword" .
+<http://example.org/item_0_0> <http://example.org/hasWeight> "1500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_0_1> <http://example.org/hasType> "shield" .
+<http://example.org/item_0_1> <http://example.org/hasWeight> "2500"^^<http://www.w3.org/2001/XMLSchema#integer> .
+<http://example.org/item_1_0> <http://example.org/hasType> "flower" .
+<http://example.org/item_1_0> <http://example.org/hasWeight> "15"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

33. RMLLVTC0008a

+

Title: Cycle: Abstract Logical Source

+

Description: Test a cycle in the abstract logical source of a logical view

+

Error expected? Yes

+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:view1 a rml:LogicalView ;
+  rml:viewOn :view2 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name1" ;
+    rml:reference "name2" ;
+  ] .
+
+:view2 a rml:LogicalView ;
+  rml:viewOn :view1 ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name2" ;
+    rml:reference "name1" ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :view2 ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name2}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name2" ;
+    ] ;
+  ] .
+
+
+

34. RMLLVTC0008b

+

Title: Cycle: Joins

+

Description: Test a cycle in two joins of two logical views

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "item" ;
+    rml:reference "$.items[*]" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :csvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "csv_birthyear" ;
+      rml:reference "birthyear" ;
+    ] ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "json_item" ;
+      rml:reference "item" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{name}/item/{json_item}" ;
+    ] ;
+  ] .
+
+
+

35. RMLLVTC0008c

+

Title: Cycle: Self-Join

+

Description: Test a cycle in a join of a logical view: self-join

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "newName" ;
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{newName}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "newName" ;
+    ] ;
+  ] .
+
+
+

36. RMLLVTC0008d

+

Title: Cycle: Fields

+

Description: Test a cycle in nested fields

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        {
+          "type": "sword",
+          "weight": 1500
+        },
+        {
+          "type": "shield",
+          "weight": 2500
+        }
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        {
+          "type": "flower",
+          "weight": 15
+        }
+      ]
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field :field1 .
+
+:field1 a rml:IterableField ;
+  rml:fieldName "item" ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.items[*]" ;
+  rml:field :field2.
+
+:field2 a rml:ExpressionField ;
+  rml:fieldName "type" ;
+  rml:reference "$.type" ;
+  rml:field :field1.
+
+
+

37. RMLLVTC0009a

+

Title: Name collision: between Fields with the same Parent

+

Description: Test a name collision between fields with the same parent

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "givenName": "Alice",
+      "familyName": "Smith"
+    },
+    {
+      "givenName": "Bob",
+      "familyName": "Johnson"
+    }
+  ]
+}
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.givenName" ;
+  ], [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.familyName" ;
+  ]  .
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :jsonView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasName ;
+    rml:objectMap [
+      rml:reference "name" ;
+    ] ;
+  ] .
+
+
+

38. RMLLVTC0009b

+

Title: Name collision: caused by Field from a Join

+

Description: Test a name collision caused by a field from a join

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "givenName": "alice",
+      "familyName": "smith",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "givenName": "bob",
+      "familyName": "johnson",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,birthyear
+alice,1995
+bob,1999
+tobias,2005
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "givenName" ;
+    rml:reference "$.givenName" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "familyName" ;
+    rml:reference "$.familyName" ;
+  ] .
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "birthyear" ;
+    rml:reference "birthyear" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "givenName" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "name" ;
+      rml:reference "familyName" ;
+    ] ; 
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{name}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasBirthYear ;
+    rml:objectMap [
+      rml:reference "birthyear" ;
+      rml:datatype xsd:gYear ;
+    ] ;
+  ] .
+
+
+

39. RMLLVTC0009c

+

Title: Name collision: between Fields from different Joins

+

Description: Test a name collision between fields from different joins

+

Error expected? Yes

+

Input

+
{
+  "people": [
+    {
+      "name": "alice",
+      "items": [
+        "sword",
+        "shield"
+      ]
+    },
+    {
+      "name": "bob",
+      "items": [
+        "flower"
+      ]
+    }
+  ]
+}
+
+

Input 1

+
name,id
+alice,123
+bob,456
+tobias,789
+
+

Input 2

+
name,item
+alice,lantern
+bob,leaf
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+
+:jsonSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.json" ;
+  ] ;
+  rml:referenceFormulation rml:JSONPath ;
+  rml:iterator "$.people[*]" .
+
+:jsonView a rml:LogicalView ;
+  rml:viewOn :jsonSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "$.name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "jsonitem" ;
+    rml:reference "$.items[*]" ;
+  ] .
+
+:additionalCsvSource a rml:LogicalSource ;
+  rml:source [
+   a rml:RelativePathSource , rml:Source ;
+   rml:root rml:MappingDirectory ;
+   rml:path "people2.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:additionalCsvView a rml:LogicalView ;
+  rml:viewOn :additionalCsvSource ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "name" ;
+     rml:reference "name" ;
+    ] ;
+    rml:field [
+     a rml:ExpressionField ;
+     rml:fieldName "csvitem" ;
+     rml:reference "item" ;
+    ] ;
+.
+
+:csvSource a rml:LogicalSource ;
+  rml:source [
+    a rml:RelativePathSource , rml:Source ;
+    rml:root rml:MappingDirectory ;
+    rml:path "people.csv" ;
+  ] ;
+  rml:referenceFormulation rml:CSV .
+
+:csvView a rml:LogicalView ;
+  rml:viewOn :csvSource ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "name" ;
+    rml:reference "name" ;
+  ] ;
+  rml:field [
+    a rml:ExpressionField ;
+    rml:fieldName "id" ;
+    rml:reference "id" ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :jsonView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item" ;
+      rml:reference "jsonitem" ;
+    ] ;
+  ] ;
+  rml:leftJoin [
+    rml:parentLogicalView :additionalCsvView ;
+    rml:joinCondition [
+      rml:parent "name" ;
+      rml:child "name" ;
+    ] ;
+    rml:field [
+      a rml:ExpressionField ;
+      rml:fieldName "item" ;
+      rml:reference "csvitem" ;
+    ] ;
+  ] .
+
+
+:triplesMapPerson a rml:TriplesMap ;
+  rml:logicalSource :csvView ;
+  rml:subjectMap [
+    rml:template "http://example.org/person/{id}" ;
+  ] ;
+  rml:predicateObjectMap [
+    rml:predicate :hasItem ;
+    rml:objectMap [
+      rml:template "http://example.org/person/{id}/item/{item}" ;
+    ] ;
+  ] .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/docs/index.html b/src/test/resources/rml-lv/docs/index.html index c74314d0..9cc552ae 100644 --- a/src/test/resources/rml-lv/docs/index.html +++ b/src/test/resources/rml-lv/docs/index.html @@ -1,6 +1,6 @@ - + + +RML-CC: Test Cases + + + + + + + + + + + + + + +
+ +

RML-CC: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-CC-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/cc/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-cc + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

13. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

14. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

15. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

16. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

17. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

19. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

20. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

21. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

22. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

24. RMLTC-CC-0006-IT0

+

Title: Gather values accross iterations.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection or container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0006-IT1

+

Title: Gather values accross iterations.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT2

+

Title: Gather values accross iterations.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

28. RMLTC-CC-0008-ROMa

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

29. RMLTC-CC-0008-ROMb

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

30. RMLTC-CC-0009-DUP-Bag

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

31. RMLTC-CC-0009-DUP-List

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

32. RMLTC-CC-0010-Lista

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

33. RMLTC-CC-0010-Listb

+

Title:

+

Description:

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + + diff --git a/src/test/resources/rml-cc/docs/20250206/index.html b/src/test/resources/rml-cc/docs/20250206/index.html new file mode 100644 index 00000000..abe1c494 --- /dev/null +++ b/src/test/resources/rml-cc/docs/20250206/index.html @@ -0,0 +1,2158 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + +
+ +

RML-CC: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-CC-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/cc/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-cc + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowTemptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

13. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

14. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

15. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

16. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

17. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

19. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

20. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

21. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

22. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

24. RMLTC-CC-0006-IT0

+

Title: Gather values accross iterations.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection or container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0006-IT1

+

Title: Gather values accross iterations.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT2

+

Title: Gather values accross iterations.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

28. RMLTC-CC-0008-ROMa

+

Title: Elements via reference object-map.

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

29. RMLTC-CC-0008-ROMb

+

Title: Elements via reference object-map with default join condition

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

30. RMLTC-CC-0009-DUP-Bag

+

Title: Gather duplicate values in an RDF Bag

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

31. RMLTC-CC-0009-DUP-List

+

Title: Gather duplicate values in an RDF List

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

32. RMLTC-CC-0010-Lista

+

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

33. RMLTC-CC-0010-Listb

+

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-cc/docs/20250225/index.html b/src/test/resources/rml-cc/docs/20250225/index.html new file mode 100644 index 00000000..cfe40fdb --- /dev/null +++ b/src/test/resources/rml-cc/docs/20250225/index.html @@ -0,0 +1,2472 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + + + + + +

Abstract

This document describes the [RML] vocabulary and approach to generating RDF containers and collections [RDF11-Concepts].

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-EL-BN

+

Title: Allow the generation of empty lists identified by blank node identifiers.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

13. RMLTC-CC-0003-EL-Named

+

Title: Allow the generation of empty lists identified by IRIs.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

14. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

15. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

16. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

17. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

19. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

20. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

21. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

22. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

24. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT0

+

Title: Gather values across iterations to create a collection.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0006-IT1

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

28. RMLTC-CC-0006-IT2

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

29. RMLTC-CC-0006-IT3

+

Title: Gather values across iterations to create a container.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:a .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:b .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:c .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "5" .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "6" .
+
+
+

30. RMLTC-CC-0006-IT4

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "6" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+
+

31. RMLTC-CC-0006-IT5

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "a" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "b" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_6> "6" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_7> "d" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> "e" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "c" .
+
+
+

32. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

33. RMLTC-CC-0008-ROMa

+

Title: Elements via reference object-map.

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

34. RMLTC-CC-0008-ROMb

+

Title: Elements via reference object-map with default join condition

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

35. RMLTC-CC-0009-DUP-Bag

+

Title: Gather duplicate values in an RDF Bag

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

36. RMLTC-CC-0009-DUP-List

+

Title: Gather duplicate values in an RDF List

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

37. RMLTC-CC-0010-Lista

+

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

38. RMLTC-CC-0010-Listb

+

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+@base        <http://example.com/>.
+
+<#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + +

A. References

A.1 Informative references

+ +
[RDF11-Concepts]
+ RDF 1.1 Concepts and Abstract Syntax. W3C. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf11-concepts/ +
[RML]
+ RDF Mapping Language. https://rml.io. 06 October 2020. Unofficial draft. URL: https://rml.io/specs/rml/ +
+
\ No newline at end of file diff --git a/src/test/resources/rml-cc/docs/20250915/index.html b/src/test/resources/rml-cc/docs/20250915/index.html new file mode 100644 index 00000000..2ad784eb --- /dev/null +++ b/src/test/resources/rml-cc/docs/20250915/index.html @@ -0,0 +1,2544 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + + + + + + +

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-EL-BN

+

Title: Allow the generation of empty lists identified by blank node identifiers.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

13. RMLTC-CC-0003-EL-Named

+

Title: Allow the generation of empty lists identified by IRIs.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

14. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

15. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

16. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

17. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

19. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

20. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

21. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

22. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

24. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT0

+

Title: Gather values across iterations to create a collection.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0006-IT1

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

28. RMLTC-CC-0006-IT2

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

29. RMLTC-CC-0006-IT3

+

Title: Gather values across iterations to create a container.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:a .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:b .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:c .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "5" .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "6" .
+
+
+

30. RMLTC-CC-0006-IT4

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "6" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+
+

31. RMLTC-CC-0006-IT5

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "a" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "b" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_6> "6" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_7> "d" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> "e" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "c" .
+
+
+

32. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

33. RMLTC-CC-0008-ROMa

+

Title: Elements via reference object-map.

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

34. RMLTC-CC-0008-ROMb

+

Title: Elements via reference object-map with default join condition

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

35. RMLTC-CC-0009-DUP-Bag

+

Title: Gather duplicate values in an RDF Bag

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

36. RMLTC-CC-0009-DUP-List

+

Title: Gather duplicate values in an RDF List

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

37. RMLTC-CC-0010-Lista

+

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

38. RMLTC-CC-0010-Listb

+

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-cc/docs/index.html b/src/test/resources/rml-cc/docs/index.html new file mode 100644 index 00000000..2ad784eb --- /dev/null +++ b/src/test/resources/rml-cc/docs/index.html @@ -0,0 +1,2544 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + + + + + + +

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-EL-BN

+

Title: Allow the generation of empty lists identified by blank node identifiers.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

13. RMLTC-CC-0003-EL-Named

+

Title: Allow the generation of empty lists identified by IRIs.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

14. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

15. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

16. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

17. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

19. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

20. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

21. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

22. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

24. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT0

+

Title: Gather values across iterations to create a collection.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0006-IT1

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

28. RMLTC-CC-0006-IT2

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

29. RMLTC-CC-0006-IT3

+

Title: Gather values across iterations to create a container.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:a .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:b .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:c .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "5" .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "6" .
+
+
+

30. RMLTC-CC-0006-IT4

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "6" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+
+

31. RMLTC-CC-0006-IT5

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "a" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "b" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_6> "6" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_7> "d" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> "e" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "c" .
+
+
+

32. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

33. RMLTC-CC-0008-ROMa

+

Title: Elements via reference object-map.

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

34. RMLTC-CC-0008-ROMb

+

Title: Elements via reference object-map with default join condition

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

35. RMLTC-CC-0009-DUP-Bag

+

Title: Gather duplicate values in an RDF Bag

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

36. RMLTC-CC-0009-DUP-List

+

Title: Gather duplicate values in an RDF List

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

37. RMLTC-CC-0010-Lista

+

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

38. RMLTC-CC-0010-Listb

+

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-cc/publish.js b/src/test/resources/rml-cc/publish.js new file mode 100644 index 00000000..a747165b --- /dev/null +++ b/src/test/resources/rml-cc/publish.js @@ -0,0 +1,59 @@ +/** + * Created by bjdmeest on 10/06/2016. + * Modified by Dylan Van Assche on 12/02/2021. + */ + +var fs = require('fs'); +var path = require('path'); + +var dateString = (new Date()).toISOString().split('T')[0].replace(/-/g, ''); + +try { + if (!fs.existsSync (path.resolve(__dirname, 'docs'))) { + fs.mkdirSync (path.resolve(__dirname, 'docs')); + } + fs.mkdirSync (path.resolve(__dirname, 'docs', dateString)); +} catch (e) { + +} + +var files = fs.readdirSync (path.resolve(__dirname, 'docs')); +var dirs = []; +for (var i = 0; i < files.length; i++) { + if (fs.lstatSync (path.resolve(__dirname, 'docs', files[i])).isDirectory()) { + dirs.push(files[i]); + } +} + +dirs.sort(); +dirs.reverse(); + +if (dirs[0] === "resources") { + dirs.splice (0, 1); +} + +if (dirs[0] === dateString) { + dirs.splice (0, 1); +} + +// First version, set previous version to this one +if (dirs.length == 0) { + dirs.push (dateString) +} + +var html = fs.readFileSync ('./rendered.html', 'utf8'); +html = html.replace (/%thisDate%/g, dateString); +html = html.replace (/%prevDate%/g, dirs[0]); +fs.writeFileSync (path.resolve (__dirname, 'docs', 'index.html'), html); +html = html.replace (/\.\/resources/g, '../resources'); +fs.writeFileSync (path.resolve(__dirname, 'docs', dateString, 'index.html'), html); + +// Copy assets +// fs.copyFileSync('Supergirl.xml', path.resolve(__dirname, 'docs', dateString, 'Supergirl.xml')) +// fs.copyFileSync('Supergirl.xml', path.resolve(__dirname, 'docs', 'Supergirl.xml')) +// fs.copyFileSync('Leverage.csv', path.resolve(__dirname, 'docs', dateString, 'Leverage.csv')) +// fs.copyFileSync('Leverage.csv', path.resolve(__dirname, 'docs', 'Leverage.csv')) +// fs.copyFileSync('Friends.json', path.resolve(__dirname, 'docs', dateString, 'Friends.json')) +// fs.copyFileSync('Friends.json', path.resolve(__dirname, 'docs', 'Friends.json')) +// fs.copyFileSync('DBPedia.csv', path.resolve(__dirname, 'docs', dateString, 'DBPedia.csv')) +// fs.copyFileSync('DBPedia.csv', path.resolve(__dirname, 'docs', 'DBPedia.csv')) diff --git a/src/test/resources/rml-cc/rendered.html b/src/test/resources/rml-cc/rendered.html new file mode 100644 index 00000000..2ad784eb --- /dev/null +++ b/src/test/resources/rml-cc/rendered.html @@ -0,0 +1,2544 @@ + + + + + + +RML-CC: Test Cases + + + + + + + + + + + + + + + + + + + +

Abstract

This document defines the RML-CC test cases to the determine the RML-CC specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ +

1. Introduction

+

This document defines the RML-CC test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-CC specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-CC test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLTC-CC-0001-Alt

+

Title: Generate a rdf:Alt as an object

+

Description: Tests if a rdf:Alt is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Alt/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Alt ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Alt> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+
+
+

5. RMLTC-CC-0001-Bag

+

Title: Generate a rdf:Bag as an object

+

Description: Tests if a rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

6. RMLTC-CC-0001-List

+

Title: Generate a rdf:List as an object

+

Description: Tests if a rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

7. RMLTC-CC-0001-Seq

+

Title: Generate a rdf:Seq as an object

+

Description: Tests if a rdf:Seq is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0001-Seq/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Seq ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

8. RMLTC-CC-0002-Bag

+

Title: Generate a named rdf:Bag as an object

+

Description: Tests if a named rdf:Bag is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+
+
+

9. RMLTC-CC-0002-List

+

Title: Generate a named rdf:List as an object

+

Description: Tests if a named rdf:List is generated as an object

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0002-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b2 .
+<http://example.com/base/e/c> <http://example.com/ns#with> <http://example.com/base/c/c> .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b4 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+_:nb73dd869d6bb47a5b865ee632fe27453b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b3 .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nb73dd869d6bb47a5b865ee632fe27453b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b6 .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nb73dd869d6bb47a5b865ee632fe27453b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nb73dd869d6bb47a5b865ee632fe27453b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b1 .
+<http://example.com/base/c/c> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nb73dd869d6bb47a5b865ee632fe27453b5 .
+_:nb73dd869d6bb47a5b865ee632fe27453b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

10. RMLTC-CC-0003-EB

+

Title: Allow the generation of empty bags

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nfecac3cfe48c4afa99539cc809138e96b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b1 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfecac3cfe48c4afa99539cc809138e96b2 .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nfecac3cfe48c4afa99539cc809138e96b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

11. RMLTC-CC-0003-EL

+

Title: Allow the generation of empty lists

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

12. RMLTC-CC-0003-EL-BN

+

Title: Allow the generation of empty lists identified by blank node identifiers.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a blank node identifier generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-BN/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n302eecc856b44ed5b76965d9be2f5213b1 .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

13. RMLTC-CC-0003-EL-Named

+

Title: Allow the generation of empty lists identified by IRIs.

+

Description: Tests if the use of rml:allowEmptyListAndContainer yields an empty list. The lists are identified by a IRI generated in the mapping.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-EL-Named/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:allowEmptyListAndContainer true ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+
+
+

14. RMLTC-CC-0003-NEB

+

Title: Empty bags are not generated

+

Description: Tests if empty containers are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEB/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n2bd72de9c571444081890e41009d92d4b1 .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n2bd72de9c571444081890e41009d92d4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+
+
+

15. RMLTC-CC-0003-NEL

+

Title: Empty lists are not generated

+

Description: Tests if empty lists are not generated (expected default behavior).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NEL/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

16. RMLTC-CC-0003-NELb

+

Title: Empty lists are not generated II

+

Description: Tests if empty lists are not generated (expected default behavior). This test cases uses the predicate rml:allowEmptyListAndContainer.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0003-NELb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:allowEmptyListAndContainer false ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb2 .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n434c2c54e09e4a259604ba1188ce038fb1 .
+_:n434c2c54e09e4a259604ba1188ce038fb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n434c2c54e09e4a259604ba1188ce038fb3 .
+_:n434c2c54e09e4a259604ba1188ce038fb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n434c2c54e09e4a259604ba1188ce038fb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+
+
+

17. RMLTC-CC-0004-SM1

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

18. RMLTC-CC-0004-SM2

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It still needs to generate triples as the lists consists of at least one cons-pair.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n302eecc856b44ed5b76965d9be2f5213b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b2 .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n302eecc856b44ed5b76965d9be2f5213b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n302eecc856b44ed5b76965d9be2f5213b3 .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n302eecc856b44ed5b76965d9be2f5213b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b2 .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d393f12e993411498da676131f81ca4b3 .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d393f12e993411498da676131f81ca4b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

19. RMLTC-CC-0004-SM3

+

Title: GatherMap in subject map (list)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. Only one list needs to be generated as the other has no values and we only retain non-empty lists.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:List ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb2 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n648f8cf4c58149e8a0feea26fb2a5b5bb3 .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n648f8cf4c58149e8a0feea26fb2a5b5bb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

20. RMLTC-CC-0004-SM4

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test generates a bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:createdBy ;
+        rml:object ex:JohnDoe ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "5" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "4" .
+_:n1d393f12e993411498da676131f81ca4b1 <http://example.com/ns#createdBy> <http://example.com/ns#JohnDoe> .
+_:n1d393f12e993411498da676131f81ca4b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:n1d393f12e993411498da676131f81ca4b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+
+
+

21. RMLTC-CC-0004-SM5

+

Title: GatherMap in subject map (bag)

+

Description: Tests if the use of a gather map in the subject map is supported. This test has no predicate-object maps and no class declarations in the subject map. It should generate a non-empty bag and an empty bag. The reason being that a container has at least one triple ; it's type (bag, seq, or alt).

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0004-SM5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+        rml:gatherAs rdf:Bag ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:ne32066984b71404a953025d001cd3cdfb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "3" .
+
+
+

22. RMLTC-CC-0005-App1

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b1 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b2 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b4 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b5 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1ee4a5a2b1344422919d171ab2cd6c39b6 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b7 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1ee4a5a2b1344422919d171ab2cd6c39b8 .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n1ee4a5a2b1344422919d171ab2cd6c39b8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

23. RMLTC-CC-0005-App2

+

Title: Append values of multiple term maps

+

Description: Tests appending of values from multiple term maps in an iteration. In this example, one of the arrays is empty and the expected behavior is to concatinate a list with the empty list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-App2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab2 .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab5 .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab4 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n1d9b8ef217cb44f299a062d746116deab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n1d9b8ef217cb44f299a062d746116deab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n1d9b8ef217cb44f299a062d746116deab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:n1d9b8ef217cb44f299a062d746116deab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab3 .
+_:n1d9b8ef217cb44f299a062d746116deab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab1 .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n1d9b8ef217cb44f299a062d746116deab6 .
+_:n1d9b8ef217cb44f299a062d746116deab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab8 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n1d9b8ef217cb44f299a062d746116deab7 .
+_:n1d9b8ef217cb44f299a062d746116deab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+
+
+

24. RMLTC-CC-0005-Car1

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where all sets of values are non-empty.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb9 .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:nfc398e5692654ca98dfb3fb5432d277cb9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb10 .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb11 .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nfc398e5692654ca98dfb3fb5432d277cb11 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb12 .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:nfc398e5692654ca98dfb3fb5432d277cb12 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

25. RMLTC-CC-0005-Car2

+

Title: Cartesian product of values from multiple term maps of a gather map.

+

Description: Tests generating the Cartesian product of values from multiple term maps in a gather map. This test covers the case where one of the sets is empty. The Cartesian product of a set with an empty set is empty. This entry should thus not yield a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0005-Car2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+            rml:strategy rml:cartesianProduct ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb1 .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb2 .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+_:nfc398e5692654ca98dfb3fb5432d277cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb3 .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:nfc398e5692654ca98dfb3fb5432d277cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb4 .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb5 .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb6 .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:nfc398e5692654ca98dfb3fb5432d277cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nfc398e5692654ca98dfb3fb5432d277cb7 .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nfc398e5692654ca98dfb3fb5432d277cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nfc398e5692654ca98dfb3fb5432d277cb8 .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:nfc398e5692654ca98dfb3fb5432d277cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

26. RMLTC-CC-0006-IT0

+

Title: Gather values across iterations to create a collection.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different collection.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT0/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b1 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b2 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b5 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b6 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:n9d785cd672d3484cb5d9fd831e6dfc07b3 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n9d785cd672d3484cb5d9fd831e6dfc07b4 .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n9d785cd672d3484cb5d9fd831e6dfc07b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

27. RMLTC-CC-0006-IT1

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT1/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b1 .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:nab8f496caee443c5ac19ce3a109f4b22b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b2 .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:nab8f496caee443c5ac19ce3a109f4b22b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b3 .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:nab8f496caee443c5ac19ce3a109f4b22b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab8f496caee443c5ac19ce3a109f4b22b4 .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:nab8f496caee443c5ac19ce3a109f4b22b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

28. RMLTC-CC-0006-IT2

+

Title: Gather values across iterations to create a collection.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the list. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT2/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab1 .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n0cbb21ce98464358963007f95dc35c0ab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab2 .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
+_:n0cbb21ce98464358963007f95dc35c0ab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab3 .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
+_:n0cbb21ce98464358963007f95dc35c0ab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab4 .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "5" .
+_:n0cbb21ce98464358963007f95dc35c0ab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab5 .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n0cbb21ce98464358963007f95dc35c0ab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab6 .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "d" .
+_:n0cbb21ce98464358963007f95dc35c0ab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab7 .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "e" .
+_:n0cbb21ce98464358963007f95dc35c0ab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab8 .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "4" .
+_:n0cbb21ce98464358963007f95dc35c0ab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n0cbb21ce98464358963007f95dc35c0ab9 .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
+_:n0cbb21ce98464358963007f95dc35c0ab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

29. RMLTC-CC-0006-IT3

+

Title: Gather values across iterations to create a container.

+

Description: When no template, constant, or reference is given to a gather map, then each iteration yields a different container.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT3/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:a .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:a <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:b .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:b <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:c .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "5" .
+_:c <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "6" .
+
+
+

30. RMLTC-CC-0006-IT4

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers one term map in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT4/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "6" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+
+

31. RMLTC-CC-0006-IT5

+

Title: Gather values across iterations to create a container.

+

Description: When using a template, constant, or reference for a gather map, this tests determines whether the values are correctly appended to the container. The natural order of the term maps inside the gather map as well as the iteration are respected. This test covers two term maps in the gather map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0006-IT5/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "c/{$.id}" ;
+            rml:gather ( [ rml:reference "$.v1.*" ; ] [ rml:reference "$.v2.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> <http://example.com/base/c/a> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "a" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_4> "b" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_5> "5" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_6> "6" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_7> "d" .
+<http://example.com/base/c/a> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_8> "e" .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> <http://example.com/base/c/b> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+<http://example.com/base/c/b> <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "c" .
+
+
+

32. RMLTC-CC-0007-NES

+

Title: Nested gather maps

+

Description: Testing whether nested gather maps are created. The mapping should generate a list of bags.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0007-NES/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather (
+                [
+                    rml:gather ( [ rml:reference "$.v1.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+                [
+                    rml:gather ( [ rml:reference "$.v2.*" ; ] ) ;
+                    rml:gatherAs rdf:Bag ;
+                ]
+            ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+_:nab9af1206e584ab2afd457e8a605872cb1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "a" .
+_:nab9af1206e584ab2afd457e8a605872cb2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "b" .
+
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "3" .
+_:nab9af1206e584ab2afd457e8a605872cb5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "4" .
+
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nab9af1206e584ab2afd457e8a605872cb6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "c" .
+
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb3 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb1 .
+_:nab9af1206e584ab2afd457e8a605872cb3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb4 .
+
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb2 .
+_:nab9af1206e584ab2afd457e8a605872cb4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nab9af1206e584ab2afd457e8a605872cb7 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb5 .
+_:nab9af1206e584ab2afd457e8a605872cb7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:nab9af1206e584ab2afd457e8a605872cb8 .
+
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:nab9af1206e584ab2afd457e8a605872cb6 .
+_:nab9af1206e584ab2afd457e8a605872cb8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+
+

33. RMLTC-CC-0008-ROMa

+

Title: Elements via reference object-map.

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMa/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [ 
+        rml:objectMap [
+                rml:reference "ID" ; rml:termType rml:BlankNode ;
+                rml:gather ( 
+                    [ 
+                        rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                        rml:joinCondition [ rml:child "Sport" ; rml:parent "Sport" ] ;
+                    ] 
+                ) ;
+                rml:gatherAs rdf:List;
+            ] ;    
+        rml:predicate ex:sameSportAs 
+    ] ;
+
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid1 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid4 .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid3 .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid5 .
+
+
+

34. RMLTC-CC-0008-ROMb

+

Title: Elements via reference object-map with default join condition

+

Description: Testing whether gather maps generate an RDF list whose members are generated by a referencing object-map with a default join condition.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0008-ROMb/Friends.json

+

Mapping

+
@prefix ex: <http://example.com/> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+
+_:b273446 a rml:RelativePathSource ;
+    rml:path "student.csv" .
+
+<http://example.com/base/TriplesMap1> a rml:TriplesMap ;
+    rml:logicalSource [ a rml:LogicalSource ;
+            rml:referenceFormulation rml:CSV ;
+            rml:source _:b273446 ] ;
+            
+    rml:predicateObjectMap [
+        rml:objectMap [
+            rml:reference "ID" ; rml:termType rml:BlankNode ;
+            rml:gather ( 
+                [ 
+                    rml:parentTriplesMap <http://example.com/base/TriplesMap1> ;
+                ] 
+            ) ;
+            rml:gatherAs rdf:List;
+        ] ;
+        rml:predicate ex:sameSportAs 
+    ] ;
+        
+    rml:subjectMap [ rml:template "http://example.com/Student/{ID}/{Name}" ] .
+
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/30/Loena%20Hendrickx> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/30/Loena%20Hendrickx> <http://example.com/sameSportAs> _:genid1 .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/20/Serena%20Williams> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/20/Serena%20Williams> <http://example.com/sameSportAs> _:genid2 .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://example.com/Student/10/Venus%20Williams> .
+_:genid3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+<http://example.com/Student/10/Venus%20Williams> <http://example.com/sameSportAs> _:genid3 .
+
+
+

35. RMLTC-CC-0009-DUP-Bag

+

Title: Gather duplicate values in an RDF Bag

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create an RDF Bag.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-Bag/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:Bag ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag> .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "9" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "1" .
+<http://example.com/base/e/b> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b2 .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "1" .
+<http://example.com/base/e/c> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b3 .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:nc808fbd2e11a4baa939c61c8210b5909b1 .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "2" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1> "7" .
+_:nc808fbd2e11a4baa939c61c8210b5909b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "6" .
+_:nc808fbd2e11a4baa939c61c8210b5909b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3> "1" .
+_:nc808fbd2e11a4baa939c61c8210b5909b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2> "8" .
+
+
+

36. RMLTC-CC-0009-DUP-List

+

Title: Gather duplicate values in an RDF List

+

Description: Testing the expected behavior of multi-valued expression maps containing duplicate values when these expression maps are used in a gather map to create a list.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0009-DUP-List/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
<http://example.com/base/e/a> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab1 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab2 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab3 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/b> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab4 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab5 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab6 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "6" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab6 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+<http://example.com/base/e/c> <http://example.com/ns#with> _:n988e0f11d19c486fa3b3255f94c9b3bab7 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "7" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab7 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab8 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "8" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab8 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:n988e0f11d19c486fa3b3255f94c9b3bab9 .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "9" .
+_:n988e0f11d19c486fa3b3255f94c9b3bab9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
+
+
+

37. RMLTC-CC-0010-Lista

+

Title: Combining graph maps and gather maps (graph map has a template and gather map does not)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, a blank node for each list is expected.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Lista/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid2 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+

38. RMLTC-CC-0010-Listb

+

Title: Combining graph maps and gather maps (both graph map and gather map have a template)

+

Description: Tests the behavior of combining graph- and gather maps. In this example, lists are concatinated in some named graphs via blank node identifiers constructed with templates.

+

Error expected? No

+

Input + http://w3id.org/rml/resources/rml-io/RMLTC-CC-0010-Listb/Friends.json

+

Mapping

+
@prefix rml: <http://w3id.org/rml/>.
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix ex:  <http://example.com/ns#>.
+
+<http://example.com/base#TM> a rml:TriplesMap;
+    rml:logicalSource [
+        rml:source _:b738439 ;
+        rml:referenceFormulation rml:JSONPath ;
+        rml:iterator "$.*" ;
+    ] ;
+
+    rml:subjectMap [
+        rml:template "e/{$.id}" ;
+    ] ;
+
+    rml:predicateObjectMap [
+        rml:graphMap [ rml:template "g/{$.graph}" ; ] ;
+        rml:predicate ex:with ;
+        rml:objectMap [
+            rml:template "l/{$.id}" ; rml:termType rml:BlankNode ;
+            rml:gather ( [ rml:reference "$.values.*" ; ] ) ;
+            rml:gatherAs rdf:List ;
+        ] ;
+    ] ;
+.
+
+_:b738439 a rml:RelativePathSource ;
+    rml:path "data.json" .
+
+

Output

+
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "1" <http://example.com/base/g/1> .
+_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid2 <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "3" <http://example.com/base/g/1> .
+_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/1> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genid1 <http://example.com/base/g/1> .
+
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "2" <http://example.com/base/g/2> .
+_:genidx1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://example.com/base/g/2> .
+<http://example.com/base/e/a> <http://example.com/ns#with> _:genidx1 <http://example.com/base/g/2> .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-lv/README.md b/src/test/resources/rml-lv/README.md index 03fa4f76..57adbc3f 100644 --- a/src/test/resources/rml-lv/README.md +++ b/src/test/resources/rml-lv/README.md @@ -9,4 +9,4 @@ The test cases publication (html pages) can be generated as followed: 4. Download burp: `curl -LO https://github.com/kg-construct/BURP/releases/download/v0.1.1/burp.jar` 5. Generate the manifest with [Burp](https://github.com/kg-construct/BURP): `java -jar burp.jar -m manifest.rml.ttl -o manifest.ttl -b http://w3id.org/rml/lv/test/` 6. Run list.sh and insert output in dev.html -7. To publish the new HTML verson of the test cases, run with `python3 -m http.server`, export `dev.html` as `index.html` in ./docs and in a subfolder with the date of the publication (maybe adapt the publication date) +7. To publish the new HTML verson of the test cases, export `dev.html` as `index.html` in ./docs and in a subfolder with the date of the publication (maybe adapt the publication date) diff --git a/src/test/resources/rml-lv/config.js b/src/test/resources/rml-lv/config.js index 938ddcd5..7973ff32 100644 --- a/src/test/resources/rml-lv/config.js +++ b/src/test/resources/rml-lv/config.js @@ -76,7 +76,7 @@ var respecConfig = { date: "12 March 2024", }, }, - publishDate: "2025-10-29", + publishDate: "2025-08-05", otherLinks: [], shortName: "RML-LV-Testcases", specStatus: "CG-DRAFT", diff --git a/src/test/resources/rml-lv/descriptions.csv b/src/test/resources/rml-lv/descriptions.csv index e389dc3c..f95d42af 100644 --- a/src/test/resources/rml-lv/descriptions.csv +++ b/src/test/resources/rml-lv/descriptions.csv @@ -1,45 +1,41 @@ RML ID,Title,Purpose,"Error -expected?","Input -1","Input +expected?","Input +1","Input 2","Input 3","Output default","Output 1","Output 2","Output -3",Comment, -RMLLVTC0000a,Logical view on JSON source,Test a view on a hierarchical source,no,people.json,,,output.nq,,,,, -RMLLVTC0000b,Logical view on CSV source,Test a view on a tabular source,no,people.csv,,,output.nq,,,,, -RMLLVTC0000c,Logical View on Logical View,Test a view on a logical view,no,people.json,,,output.nq,,,,,"0,8125" -RMLLVTC0001a,Expression Field: Reference,Test a reference in an expression field,no,people.json,,,output.nq,,,,, -RMLLVTC0001b,Expression Field: Template,Test a template in an expression field,no,people.json,,,output.nq,,,,, -RMLLVTC0001c,Expression Field: Constant,Test a constant expression in an expression field,no,people.json,,,output.nq,,,,, -RMLLVTC0001d,Expression Field Siblings,Test multiple expression fields with the same parent,no,people.json,,,output.nq,,,,, -RMLLVTC0002a,Iterable Field,Test a nested field construction: iterable field with expression field as child,no,people.json,,,output.nq,,,,, -RMLLVTC0002b,Iterable Field with Multiple Children,Test a nested field construction: iterable field with mulitple expression fields as children,no,people.json,,,output.nq,,,,, -RMLLVTC0002c,Nested Iterable Fields,Test a nested field construction: iterable field with an iterable field as child,no,people.json,,,output.nq,,,,, -RMLLVTC0003a,Index Key: #,Test a reference to the index key #,no,people.json,,,output.nq,,,,, -RMLLVTC0003b,Index Key: Iterable Field,Test a reference to the index key of an iterable field,no,people.json,,,output.nq,,,,, -RMLLVTC0003c,Index Key: Expression field,Test a reference to the index key of an expression field,no,people.json,,,output.nq,,,,, -RMLLVTC0004a,Natural Datatype: Index #,Test the natural datatype mapping for the index #,no,people.json,,,output.nq,,,,, -RMLLVTC0004b,Natural Datatype: Index Expression Field,Test the natural datatype mapping for the index of an expression field,no,people.json,,,output.nq,,,,, -RMLLVTC0004c,Natural Datatype: Index Iterable Field,Test the natural datatype mapping for the index of an iterable field,no,people.json,,,output.nq,,,,, -RMLLVTC0004d,Natural Datatype: Record Expression Field,Test the natural datatype mapping for a record of an expression field,no,people.json,,,output.nq,,,,, -RMLLVTC0005a,Referencing a Non-Existing Key,Test a reference to a non-existing key,yes,people.json,,,,,,,, -RMLLVTC0005b,Referencing the Record Key ,Test a reference to the record key ,yes,people.json,,,,,,,, -RMLLVTC0005c,Referencing the Record Key of an Iterable Field,Test a reference to the record key of an iterable field,yes,people.json,,,,,,,, -RMLLVTC0006a,Left Join,Test a left join,no,people.json,people.csv,,output.nq,,,,, -RMLLVTC0006b,Inner Join,Test an inner join,no,people.json,people.csv,,output.nq,,,,, -RMLLVTC0006c,Two Left Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,,, -RMLLVTC0006d,Inner Join and Left Join,Test an inner join and a left join in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,,, -RMLLVTC0006e,Two Inner Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,,, -RMLLVTC0006f,Index Key of Field in Join,Test references to indexes of fields from a join,no,people.json,people.csv,,output.nq,,,,, -RMLLVTC0007a,Change Reference Formulations: CSV including JSON array,Test a change of reference formulations: csv source including json array,no,people.csv,,,output.nq,,,,, -RMLLVTC0007b,Change Reference Formulations: CSV including JSON object,Test a change of reference formulations: csv source including json object,no,people.csv,,,output.nq,,,,, -RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of reference formulations: json source including csv data,no,people.json,,,output.nq,,,,, -RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,yes,,,,,,,,, -RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,yes,people.json,people.csv,,,,,,, -RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,yes,people.json,,,,,,,, -RMLLVTC0008d,Cycle: Fields,Test a cycle in nested fields,yes,people.json,,,,,,,, -RMLLVTC0009a,Name collision: between Fields with the same Parent,Test a name collision between fields with the same parent,yes,people.json,,,,,,,, -RMLLVTC0009b,Name collision: caused by Field from a Join,Test a name collision caused by a field from a join,yes,people.json,people.csv,,,,,,, -RMLLVTC0009c,Name collision: between Fields from different Joins,Test a name collision between fields from different joins,yes,people.json,people.csv,people2.csv,,,,,, \ No newline at end of file +3",Comment +RMLLVTC0000a,Logical view on JSON source,Test a view on a hierarchical source,no,people.json,,,output.nq,,,, +RMLLVTC0000b,Logical view on CSV source,Test a view on a tabular source,no,people.csv,,,output.nq,,,, +RMLLVTC0000c,Logical View on Logical View,Test a view on a logical view,no,people.json,,,output.nq,,,, +RMLLVTC0001a,Expression Field: Reference,Test a reference in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001b,Expression Field: Template,Test a template in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001c,Expression Field: Constant,Test a constant expression in an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0001d,Expression Field Siblings,Test multiple expression fields with the same parent,no,people.json,,,output.nq,,,, +RMLLVTC0002a,Iterable Field,Test a nested field construction: iterable field with expression field as child,no,people.json,,,output.nq,,,, +RMLLVTC0002b,Iterable Field with Multiple Children,Test a nested field construction: iterable field with mulitple expression fields as children,no,people.json,,,output.nq,,,, +RMLLVTC0002c,Nested Iterable Fields,Test a nested field construction: iterable field with an iterable field as child,no,people.json,,,output.nq,,,, +RMLLVTC0003a,Index Key: #,Test a reference to the index key #,no,people.json,,,output.nq,,,, +RMLLVTC0003b,Index Key: Iterable Field,Test a reference to the index key of an iterable field,no,people.json,,,output.nq,,,, +RMLLVTC0003c,Index Key: Expression field,Test a reference to the index key of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0004a,Natural Datatype: Index #,Test the natural datatype mapping for the index #,no,people.json,,,output.nq,,,, +RMLLVTC0004b,Natural Datatype: Index Expression Field,Test the natural datatype mapping for the index of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0004c,Natural Datatype: Index Iterable Field,Test the natural datatype mapping for the index of an iterable field,no,people.json,,,output.nq,,,, +RMLLVTC0004d,Natural Datatype: Record Expression Field,Test the natural datatype mapping for a record of an expression field,no,people.json,,,output.nq,,,, +RMLLVTC0005a,Referencing a Non-Existing Key,Test a reference to a non-existing key,yes,people.json,,,,,,, +RMLLVTC0005b,Referencing the Record Key ,Test a reference to the record key ,yes,people.json,,,,,,, +RMLLVTC0005c,Referencing the Record Key of an Iterable Field,Test a reference to the record key of an iterable field,yes,people.json,,,,,,, +RMLLVTC0006a,Left Join,Test a left join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0006b,Inner Join,Test an inner join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0006c,Two Left Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006d,Inner Join and Left Join,Test an inner join and a left join in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006e,Two Inner Joins,Test two left joins in one logical view,no,people.json,people.csv,people2.csv,output.nq,,,, +RMLLVTC0006f,Index Key of Field in Join,Test references to indexes of fields from a join,no,people.json,people.csv,,output.nq,,,, +RMLLVTC0007a,Change Reference Formulations: CSV including JSON array,Test a change of reference formulations: csv source including json array,no,people.csv,,,output.nq,,,, +RMLLVTC0007b,Change Reference Formulations: CSV including JSON object,Test a change of reference formulations: csv source including json object,no,people.csv,,,output.nq,,,, +RMLLVTC0007c,Change Reference Formulations: JSON including CSV,Test a change of reference formulations: json source including csv data,no,people.json,,,output.nq,,,, +RMLLVTC0008a,Cycle: Abstract Logical Source,Test a cycle in the abstract logical source of a logical view,yes,,,,,,,, +RMLLVTC0008b,Cycle: Joins,Test a cycle in two joins of two logical views,yes,people.json,people.csv,,,,,, +RMLLVTC0008c,Cycle: Self-Join,Test a cycle in a join of a logical view: self-join,yes,people.json,people.csv,,,,,, diff --git a/src/test/resources/rml-lv/dev.html b/src/test/resources/rml-lv/dev.html index abcbacc6..9868a5e3 100644 --- a/src/test/resources/rml-lv/dev.html +++ b/src/test/resources/rml-lv/dev.html @@ -126,10 +126,7 @@
-
-
-
-
+ diff --git a/src/test/resources/rml-lv/docs/index.html b/src/test/resources/rml-lv/docs/index.html index 9cc552ae..c74314d0 100644 --- a/src/test/resources/rml-lv/docs/index.html +++ b/src/test/resources/rml-lv/docs/index.html @@ -1,6 +1,6 @@ - + + +RML-Star: Test Cases + + + + + + + + + + + + + + + +
+ +

RML-Star: Test Cases

+

+ Draft Community Group Report + +

+
+ +
Latest published version:
+ https://www.w3.org/RML-Star-Testcases/ +
+
Latest editor's draft:
https://w3id.org/rml/star/test-cases/
+ + + + +
Editor:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+ +
Author:
+ Dylan Van Assche + + + + (IDLab – Ghent University – imec) +
+
Feedback:
+ GitHub kg-construct/rml-io + (pull requests, + new issue, + open issues) +
+ +
+ + +
+
+ + + +

Abstract

This document defines the RML-Star test cases to the determine the RML-Star specification conformance of tools.

+
+ +

Status of This Document

+ This specification was published by the + Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it + on the W3C Standards Track. + + Please note that under the + W3C Community Contributor License Agreement (CLA) + there is a limited opt-out and other conditions apply. + + Learn more about + W3C Community and Business Groups. +

+ GitHub Issues are preferred for + discussion of this specification. + + +

+ +

1. Introduction

+

This document defines the RML-Star test cases, consisting of a collection of test case documents (input and expected output). +The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML-Star specification.

+
+ +

2. Data model

+

The test cases are semantically described for re-usability and shareability following the W3C Test case description. +Each test:Testcase as the following properties:

+
    +
  • dcterms:identifier: unique ID of the test case.
  • +
  • rmltest:hasError: if an error of the RML Processor is expected or not.
  • +
  • rmltest:input: One or more input data of the test case.
  • +
  • rmltest:output: One or more output data of the test case.
  • +
  • rmltest:inputFormat: the input data format.
  • +
  • rmltest:outputFormat: the output data format.
  • +
  • rmltest:mappingDocument: the RML mapping rules in Turtle.
  • +
+
+ +

3. Test cases

+

This section describes the RML-Star test cases. These descriptions are also available as RDF. +The files are available on GitHub in the folder test-cases. +Each test case is contained in a single folder, containing three types of files:

+
    +
  • Zero or more files containing the data sources, in the case of JSON, XML, CSV, or containing the SQL statements to create the necessary tables, in the case of MySQL, PostgreSQL, and SQL Server.
  • +
  • One file with the RML rules, called mapping.ttl, in the Turtle format.
  • +
  • Zero or more files with the expected RDF. No file is provided if an error is expected that must halt the generation of the RDF because of an error.
  • +
+
+ + +

4. RMLSTARTC001a

+

Title: quoted triple in subject, one source, blank node in quoted subject

+

Description: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+b0,o,ABC
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:reference "c1" ;
+        rml:termType rml:BlankNode
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c3"
+        ]
+    ] .
+
+

Output

+
_:b0 <http://example/p> <http://example/o> .
+<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
+
+
+

5. RMLSTARTC001b

+

Title: quoted triple in subject, two sources, blank node in quoted subject

+

Description: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+b0,o,1
+
+

Input 1

+
**Input 1**
+c2-1,c2-2
+ABC,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:reference "c1-1" ;
+        rml:termType rml:BlankNode
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM ;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-3" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1"
+        ]
+    ] .
+
+

Output

+
_:b0 <http://example/p> <http://example/o> .
+<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .
+
+
+

6. RMLSTARTC002a

+

Title: quoted triple in subject, one source, blank node in quoted object

+

Description: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,b1,456
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:reference "c2" ;
+            rml:termType rml:BlankNode
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c3";
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> _:b1 .
+<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

7. RMLSTARTC002b

+

Title: quoted triple in subject, two sources, blank node in quoted object

+

Description: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,b1,1
+
+

Input 1

+
**Input 1**
+c2-1,c2-2
+456,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:reference "c1-2" ;
+            rml:termType rml:BlankNode
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM ;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-3" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1";
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> _:b1 .
+<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

8. RMLSTARTC003a

+

Title: two-level quoted triple in subject, one source

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s,o,z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c3}"
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c4" ;
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
+<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

9. RMLSTARTC003b

+

Title: two-level quoted triple in subject, two sources

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4
+s,o,z,1
+
+

Input 1

+
**Input 1**
+c2-1,c2-2
+1,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c1-3}"
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-4" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:reference "c2-1" ;
+            rml:datatype xsd:integer
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
+<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .
+
+
+

10. RMLSTARTC004a

+

Title: two-level quoted triple in subject and object, one source

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s,o,a,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> .
+<< <http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> >> <http://example/r> <http://example/z> .
+
+
+

11. RMLSTARTC004b

+

Title: two-level quoted triple in subject and object, two sources

+

Description: Tests the creation of two-level recursiveness of asserted quoted triples as first as object, second as subject with data from two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4
+s,o,a,1
+
+

Input 1

+
**Input 1**
+c2-1,c2-2
+z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+:thirdTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:quotedTriplesMap :secondTM;
+        rml:joinCondition [
+          rml:child "c2-2" ;
+          rml:parent "c1-4" ;
+        ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:r ;
+        rml:objectMap [
+            rml:template "http://example/{c2-1}"
+        ]
+    ] .
+
+

Output

+
<http://example/s> <http://example/p> <http://example/o> .
+<http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> .
+<< <http://example/a> <http://example/q> << <http://example/s> <http://example/p> <http://example/o> >> >> <http://example/r> <http://example/z> .
+
+
+

12. RMLSTARTC005a

+

Title: non-asserted quoted triple in subject, one source

+

Description: Tests the creation of a non-asserted quoted triple in the position of subject with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,o,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:template "http://example/{c3}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
+
+
+

13. RMLSTARTC005b

+

Title: non-asserted quoted triple in subject, two sources

+

Description: Tests the creation of a non-asserted quoted triple in the position of subject with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,o,1
+
+

Input 1

+
**Input 1**
+c2-1,c2-2
+z,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-2" ;
+              rml:parent "c1-3" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q ;
+        rml:objectMap [
+            rml:template "http://example/{c2-1}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/q> <http://example/z> .
+
+
+

14. RMLSTARTC006a

+

Title: non-asserted quoted triple in object, one source

+

Description: Tests the creation of a non-asserted quoted triple in the position of object with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3
+s,o,x
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;  # This refers to the x statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM
+        ]
+    ] .
+
+

Output

+
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
+
+
+

15. RMLSTARTC006b

+

Title: non-asserted quoted triple in object, two sources

+

Description: Tests the creation of a non-asserted quoted triple in the position of object with data from two files

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s,o,1
+
+

Input 1

+
**Input 1**
+c2-1,c2-2
+x,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ; # This refers to the y statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ; # This refers to the x statement in the rdf-star
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-2" ;
+              rml:parent "c1-3" ;
+            ];
+        ]
+    ] .
+
+

Output

+
<http://example/x> <http://example/p> << <http://example/s> <http://example/p> <http://example/o> >> .
+
+
+

16. RMLSTARTC007a

+

Title: non-asserted quoted triples in subject and object, one source

+

Description: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from one file

+

Error expected? No

+

Input

+
c1,c2,c3,c4
+s1,o1,s2,o2
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :thirdTM
+        ]
+    ] .
+
+:thirdTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
+
+
+

17. RMLSTARTC007b

+

Title: non-asserted quoted triples in subject and object, two sources

+

Description: Tests the creation of a two non-asserted quoted triples, one in the position of subject and other in object with data from two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3
+s1,o1,1
+
+

Input 1

+
**Input 1**
+c2-1,c2-2,c2-3
+s2,o2,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:secondTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstTM ;
+            rml:joinCondition [
+              rml:child "c2-3" ;
+              rml:parent "c1-3" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :thirdTM
+        ]
+    ] .
+
+:thirdTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-2}"
+        ]
+    ] .
+
+

Output

+
<< <http://example/s1> <http://example/p1> <http://example/o1> >> <http://example/q> << <http://example/s2> <http://example/p2> <http://example/o2> >> .
+
+
+

18. RMLSTARTC008a

+

Title: two-level non-asserted quoted triple in subject and object two-fold, one source

+

Description: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form one source

+

Error expected? No

+

Input

+
c1,c2,c3,c4,c5,c6,c7,c8
+s1,o1,s2,o2,s3,o3,s4,o4
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:elementaryTM1 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c2}"
+        ]
+    ] .
+
+:firstJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM1
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q1; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM2
+        ]
+    ] .
+
+:elementaryTM2 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+:centralJoinTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstJoinTM
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q2;
+        rml:objectMap [
+            rml:quotedTriplesMap :secondJoinTM
+        ]
+    ] .
+
+:elementaryTM3 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c5}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p3 ;
+        rml:objectMap [
+            rml:template "http://example/{c6}"
+        ]
+    ] .
+
+:secondJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM3
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q3; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM4
+        ]
+    ] .
+
+:elementaryTM4 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c7}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p4 ;
+        rml:objectMap [
+            rml:template "http://example/{c8}"
+        ]
+    ] .
+
+

Output

+
<<<<<http://example/s1><http://example/p1><http://example/o1>>><http://example/q1><<<http://example/s2><http://example/p2><http://example/o2>>>>><http://example/q2><<<<<http://example/s3><http://example/p3><http://example/o3>>><http://example/q3><<<http://example/s4><http://example/p4><http://example/o4>>>>>.
+
+
+

19. RMLSTARTC008b

+

Title: two-level non-asserted quoted triple in subject and object two-fold, two sources

+

Description: Tests the creation of a triple with non-asserted quoted triples as subject and object, both triples have in turn non-asserted quoted triples in subject and object with data form two sources

+

Error expected? No

+

Input

+
c1-1,c1-2,c1-3,c1-4,c1-5
+s1,o1,s2,o2,1
+
+

Input 1

+
**Input 1**
+c2-1,c2-2,c2-3,c2-4,c2-5
+s3,o3,s4,o4,1
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:elementaryTM1 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p1 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-2}"
+        ]
+    ] .
+
+:firstJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM1
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q1; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM2
+        ]
+    ] .
+
+:elementaryTM2 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data1.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p2 ;
+        rml:objectMap [
+            rml:template "http://example/{c1-4}"
+        ]
+    ] .
+
+:centralJoinTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :firstJoinTM ;
+            rml:joinCondition [
+              rml:child "c2-5" ;
+              rml:parent "c1-5" ;
+            ];
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q2;
+        rml:objectMap [
+            rml:quotedTriplesMap :secondJoinTM
+        ]
+    ] .
+
+:elementaryTM3 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-1}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p3 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-2}"
+        ]
+    ] .
+
+:secondJoinTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+            rml:quotedTriplesMap :elementaryTM3
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:q3; ;
+        rml:objectMap [
+            rml:quotedTriplesMap :elementaryTM4
+        ]
+    ] .
+
+:elementaryTM4 a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data2.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2-3}"
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p4 ;
+        rml:objectMap [
+            rml:template "http://example/{c2-4}"
+        ]
+    ] .
+
+

Output

+
<<<<<http://example/s1><http://example/p1><http://example/o1>>><http://example/q1><<<http://example/s2><http://example/p2><http://example/o2>>>>><http://example/q2><<<<<http://example/s3><http://example/p3><http://example/o3>>><http://example/q3><<<http://example/s4><http://example/p4><http://example/o4>>>>>.
+
+
+

20. RMLSTARTC009

+

Title: Quoted triples as predicate map

+

Description: Test the use quoted triples for generating the predicates, which is not possible

+

Error expected? Yes

+

Input

+
c1,c2,c3,c4
+a,s,o,z
+
+

Mapping

+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rml: <http://w3id.org/rml/> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}" 
+    ];
+    rml:predicateObjectMap [
+        rml:quotedTriplesMap :secondTM ;
+        rml:objectMap [
+            rml:template "http://example/{c4}"
+        ]
+    ] .
+
+:secondTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c3}" 
+        ]
+    ] .
+
+
+

21. RMLSTARTC010

+

Title: Quoted triples as object without object map

+

Description: Test the use quoted triples for generating the object maps but without defining the object map, which is not possible

+

Error expected? Yes

+

Input

+
c1,c2,c3,c4
+a,s,o,z
+
+

Mapping

+
@prefix rml: <http://w3id.org/rml/> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix ex: <http://example/> .
+@prefix : <http://example.org/> .
+@base <http://example.org/> .
+
+:firstTM a rml:AssertedTriplesMap, rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c1}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p;
+        rml:quotedTriplesMap :secondTM ;
+    ] .
+
+:secondTM a rml:NonAssertedTriplesMap ;
+    rml:logicalSource [
+        rml:source [ a rml:Source, rml:RelativePathSource;
+            rml:path "data.csv";
+        ];
+        rml:referenceFormulation rml:CSV
+    ];
+    rml:subjectMap [
+        rml:template "http://example/{c2}" 
+    ];
+    rml:predicateObjectMap [
+        rml:predicate ex:p ;
+        rml:objectMap [
+            rml:template "http://example/{c3}" 
+        ]
+    ] .
+
+
+ + + + + \ No newline at end of file diff --git a/src/test/resources/rml-star/docs/index.html b/src/test/resources/rml-star/docs/index.html index d764af76..189b11a8 100644 --- a/src/test/resources/rml-star/docs/index.html +++ b/src/test/resources/rml-star/docs/index.html @@ -1,6 +1,6 @@ - + +